-
Notifications
You must be signed in to change notification settings - Fork 0
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
IPC transport? #3
Comments
Don't worry about the issue vs discussion thing. It's probably time I set up discussions... To answer your question:
Regarding
That's true. TCP, for local services at least, is hardly the best option. With TCP you get all of the overhead of the network stack and the TCP protocol itself. However, I'm not quite sure I understand what you mean by "name generation", would you care to explain a bit further?
Performance is an interesting subject. A quick skim through the source code, particularly of PS: It would probably be possible to layer |
Thanks for those details - very useful and interesting.
ipc-channel provides a one-shot server to help establish a channel between two processes. When a one-shot server is created, a name of the server is generated. Under the covers this name could be a file system path (for Unix variants, which use Unix sockets as the IPC mechanism, with the file system path bound to the socket) or other kinds of generated names on macOS (which uses Mach ports) and Windows (which uses named pipes). The server process then calls accept() on the server to accept connect requests from clients and return a pair (receiver end of a new ipc-channel from client to server, first message received from the ipc-channel). The client process calls connect() passing the name and this establishes an ipc-channel from the client to the server and returns the sender end of the channel. Note that there is a restriction in ipc-channel: connect() may only be called at most once per one-shot server. |
PS. I tried linking to this repo in servo/ipc-channel#384. |
I think I understand now. So you create this one-shot server and it gives you a handle to the server object and the server name. And then you In any case, it is possible to achieve the same behavior with |
I'm not sure I understand the question, but the out of band information may be the server name, which needs to be passed to the client process somehow (e.g. using an environment variable or a command line argument). Maybe these sequence diagrams will give a clue:
I see, thanks. |
(Pardon this issue in lieu of a discussion.)
Is channels-rs limited to TCP as a transport?
Context: https://github.com/servo/ipc-channel implements channels based on operating system IPC constructs rather than TCP.
Possible advantages of an IPC transport:
Note: I'm more interested in positioning channels-rs relative to servo/ipc-channel rather than necessarily proposing a new feature for channels-rs.
The text was updated successfully, but these errors were encountered: