9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
[parent not found: <mailman.1.1244808001.26495.9fans@9fans.net>]
[parent not found: <b0a72b5826eb44300d3603f585859910@quanstro.net>]
* Re: [9fans] critique of sockets API
@ 2009-06-11 12:16 erik quanstrom
  0 siblings, 0 replies; 23+ messages in thread
From: erik quanstrom @ 2009-06-11 12:16 UTC (permalink / raw)
  To: eris.discordia, 9fans

On Thu Jun 11 04:12:13 EDT 2009, eris.discordia@gmail.com wrote:
> > i don't think i understand what you're getting at.
> > it could be that the blog was getting at the fact that select
> > funnels a bunch of independent i/o down to one process.
> > it's an effective technique when (a) threads are not available
> > and (b) processing is very fast.
>
> This might help: what he is getting at is probably the question of why not
> make possible network applications that consist of a bunch of callbacks or
> a mix of callbacks and listener/worker threads. Windows implements both
> synchronous and asynchronous I/O. Threads are available. Callbacks, too, as
> well as message queues.

are you saying the author(s) had their windows blinders on
and might not have considered other options?

my windows-fu is very low.  but according to microsoft
http://msdn.microsoft.com/en-us/library/aa365683(VS.85).aspx
windows "asynchronous" (overlapped) i/o signals the calling thread, so
the signal context is the original calling thread.  unless
ms' diagram is incorrect, this is a single threaded operation;
only the i/o originator can process the event.  so the plan 9
model would seem to me to be better threaded and i think
the CSP-style of the plan 9 model makes it easier to
reason about.  and has already been implemented under
unix without changing the kernel.  see p9p.

> Ideally, it is the programmer's informed choice
> based on their understanding of their application's priorities whether to
> use callbacks, listener/worker threads, message queues, or a combination.
> Someone may find it worth the effort to compare these approaches on a
> platform that provides both. (COM is notorious for implementing things
> through callback that get some wrapping of one's head around them before
> making sense.)

there's plenty of overlapped i/o in plan 9 — it's in the
disk and network device drivers.  even stripping away
the register fiddling, it's not an i/o model that's attractive;
that's the reason all the details are hidden in the kernel.

- erik



^ permalink raw reply	[flat|nested] 23+ messages in thread
[parent not found: <mailman.1007.1244590421.1513.9fans@9fans.net>]
[parent not found: <mailman.998.1244574121.1513.9fans@9fans.net>]
* [9fans] critique of sockets API
@ 2009-06-09 18:49 Bhanu Nagendra Pisupati
  2009-06-09 18:59 ` erik quanstrom
  2009-06-09 22:11 ` Russ Cox
  0 siblings, 2 replies; 23+ messages in thread
From: Bhanu Nagendra Pisupati @ 2009-06-09 18:49 UTC (permalink / raw)
  To: 9fans

Interesting read:
http://cacm.acm.org/magazines/2009/6/28495-whither-sockets/fulltext

If I am right, the filesystem based networking interface offered by Plan 9
has the three limitations discussed here:
* performance overhead: app requesting data from a socket typically needs
to perform 2 system calls (select/read or alt/read)
* lack of an "kernel up-call API": which allows the kernel to inform an
app each time network data is available
* hard to implement "multi homing" with support for multiple network
interfaces

Any thoughts/comments?

Thanks,
-Bhanu



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

end of thread, other threads:[~2009-06-13  1:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1.1244635201.19660.9fans@9fans.net>
2009-06-10 23:46 ` [9fans] critique of sockets API Bhanu Nagendra Pisupati
     [not found] <mailman.1.1244808001.26495.9fans@9fans.net>
2009-06-13  1:39 ` Bhanu Nagendra Pisupati
     [not found] <b0a72b5826eb44300d3603f585859910@quanstro.net>
2009-06-11 14:54 ` Eris Discordia
2009-06-11 18:24   ` erik quanstrom
2009-06-11 21:21     ` Eris Discordia
2009-06-11 23:41       ` erik quanstrom
2009-06-12  4:32         ` Paul Lalonde
2009-06-12  7:19         ` Eris Discordia
     [not found]     ` <D9FE8C51EE2D568C05E555DD@192.168.1.2>
2009-06-11 23:34       ` Devon H. O'Dell
2009-06-12  7:21         ` Eris Discordia
2009-06-11 12:16 erik quanstrom
     [not found] <mailman.1007.1244590421.1513.9fans@9fans.net>
2009-06-10 22:50 ` Bhanu Nagendra Pisupati
2009-06-11 12:34   ` erik quanstrom
     [not found] <mailman.998.1244574121.1513.9fans@9fans.net>
2009-06-09 23:20 ` Bhanu Nagendra Pisupati
2009-06-09 23:24   ` J.R. Mauro
2009-06-09 23:33   ` Devon H. O'Dell
2009-06-10  3:33     ` Gary Wright
2009-06-10  0:07   ` erik quanstrom
2009-06-10  0:34     ` erik quanstrom
2009-06-11  7:07     ` Eris Discordia
  -- strict thread matches above, loose matches on Subject: below --
2009-06-09 18:49 Bhanu Nagendra Pisupati
2009-06-09 18:59 ` erik quanstrom
2009-06-09 22:11 ` Russ Cox

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).