9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] channels across machines
@ 2009-07-18  7:43 Bakul Shah
  2009-07-18 10:25 ` erik quanstrom
  2009-07-18 17:20 ` Skip Tavakkolian
  0 siblings, 2 replies; 13+ messages in thread
From: Bakul Shah @ 2009-07-18  7:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Has anyone extended the idea of channels where the
sender/receiver are on different machines (or at least in
different processes)?  A netcat equivalent for channels!

Actual plumbing seems easy: one can add a `proxy' thread in
each process to send a message via whatever inter process
mechanism is available. One issue would be for the two sides
to identify a specific channel.  I imagine something like the
following would work.

	// on the client:
	chan = chanconnect("<host>:<port>", elemsize, nelem);

	// on the server:
	x = chanbind("<port>", elemsize, nelem);
	chan = chanaccept(x); // to allow multiple connections

Or one can build this on top of a socket or file descriptor.

Another issue is endianness (unless all processors are the
same type). Yet another issue is sending variable size
things. In a single address space you can pass a pointer +
may be a size but that trick doesn't work across process (or
machine boundaries) -- so pretty much have to add some
marshalling/unmarshalling that knows about types.

Or is there a better idea?  This certainly seems preferable
to RPC or plain byte pipes for communicating structured
values.

Thanks!

--bakul



^ permalink raw reply	[flat|nested] 13+ messages in thread
* [9fans]  channels across machines
@ 2009-07-18  8:38 Akshat Kumar
  2009-07-18 16:53 ` J.R. Mauro
  0 siblings, 1 reply; 13+ messages in thread
From: Akshat Kumar @ 2009-07-18  8:38 UTC (permalink / raw)
  To: 9fans

The idea seems inviting at first, but have you
given a thought to using plumber(4) for
"interprocess messaging" (which is what you
want, from what I understand)? This seems
more appropriate for communication amongst
processes alien to one another than something
so code-level like a chan extension.


at least, in terms of Plan 9
ak



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-07-24 10:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-18  7:43 [9fans] channels across machines Bakul Shah
2009-07-18 10:25 ` erik quanstrom
2009-07-18 10:38   ` Mechiel Lukkien
2009-07-18 11:33     ` erik quanstrom
2009-07-18 18:52   ` Bakul Shah
2009-07-18 19:32     ` Eric Van Hensbergen
2009-07-18 17:20 ` Skip Tavakkolian
2009-07-18 17:22   ` J.R. Mauro
2009-07-18 21:02   ` Bakul Shah
2009-07-18  8:38 Akshat Kumar
2009-07-18 16:53 ` J.R. Mauro
2009-07-18 17:06   ` erik quanstrom
2009-07-24 10:23     ` maht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).