Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Sockets as Pipes #186

Closed
rennergade opened this issue Jan 26, 2022 · 6 comments
Closed

Local Sockets as Pipes #186

rennergade opened this issue Jan 26, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@rennergade
Copy link
Contributor

We've been successful at increasing IPC performance via pipes (and aim to do better through some mutex optimizations). On the other hand, things in the LAMP stack do IPC via sockets. WSGI uses network sockets locally, and libpq/postgres use local unix domain sockets.

We should be able to model local socket connections in RustPOSIX as a set of two pipes, one in each direction. We should be able to keep track of if a socket is A) created via NaCl/RustPOSIX and B) uses localhost. If so, we should direct RustPOSIX to use these pipes instead of actual sockets.

@rennergade rennergade added the enhancement New feature or request label Jan 26, 2022
@rennergade rennergade mentioned this issue Feb 2, 2022
24 tasks
This was referenced May 19, 2022
@rennergade
Copy link
Contributor Author

I spent some time between writing various things last week to work on this and now have a minimal version that compiles, now needs to be debugged.

From @Devansh-Patel work getting the LAMP stack up natively it seems like we can set up gunicorn/wsgi to use domain sockets so I think we won't have to do anything for the "local ip sockets" I reference above.

@rennergade
Copy link
Contributor Author

As of now I have the main implementation working and passing tests in safeposix/full Lind. Still need to test corner cases and auxiliary system calls that may interact with UD sockets.

@JustinCappos
Copy link
Member

JustinCappos commented Aug 1, 2022 via email

@rennergade
Copy link
Contributor Author

This branch has been sitting stagnant for awile unmerged while we were waiting to sort out other socket things in RustPOSIX. I think we're ready to try to bring this into the code base.

@TristanB22 can you attempt to reconcile the "domsocks-pipes" branch of rustposix with develop?

@rennergade
Copy link
Contributor Author

@TristanB22 has mostly reconciled these branches but it still needs to be debugged and tested. @justyoyo123 is going to take over from here.

@rennergade
Copy link
Contributor Author

This works now as of the mega-merge. Thank you to everyone who helped here including @TristanB22 @justyoyo123 @yizhuoliang !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants