[Stackless] Google's new Go programming language

Kristján Valur Jónsson kristjan at ccpgames.com
Tue Nov 17 20:41:02 CET 2009


First off, I don't understand what select does in go, but I assume some conceptual similarity to unix select()

One thing I'd like to point out is that the select() model of event handling is inherently non-scalable. Managing it is an O(N) process each time you want to send or handle an event.
This is why asynchronous programming models are moving away from the select mechanism.  For example windows only supports select() for sockets to maintain code compatibility.  The favored model on that platform is to use IOCompletion ports.
I believe that unix meanwhile has some similar way to avoid the scalability problems of select.

In stackless, an IO Completion port can be modeled as a channel.  The IO operations post event messages to the channel, and the event handler waits on the channel for an event to occur.  The complexity for the both the sender and receiver of those events is then O(1)

Not having select() helps guide the stackless programmer around a bad pattern.

K
  

> -----Original Message-----
> From: Andrew Francis [mailto:andrewfr_ice at yahoo.com]
> Sent: 17. nóvember 2009 16:51
> To: stackless at stackless.com
> Cc: Kristján Valur Jónsson
> Subject: Re: [Stackless] Google's new Go programming language
> 
> Hello Andrew:
> 
> Message: 2
> Date: Tue, 17 Nov 2009 00:37:37 +0100
> From: Andrew Dalke <dalke at dalkescientific.com>
> To: Stackless mailing list <stackless at stackless.com>
> Subject: Re: [Stackless] Google's new Go programming language
> Message-ID: <9BF4B07C-0882-41A0-B6A3-2AFCF9320D35 at dalkescientific.com>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
> 
> >It's interesting seeing the comments about my post as it makes its
> >away around the sites I read. I've seen a few people comment that
> >Stackless is crippled because it doesn't support a way to select on
> >multiple channels. I've pointed out my solution, but those who
> >complained haven't said one thing or another about it.
> 
> I haven't seen those posts but a lack of a select does not cripple
> Stackless. That is silly. Still I believe select makes it easier to
> write clutter free event handlers.
> 
> Since I want to get into PyPy and believe PyPy Stackless.py provides
> interesting opportunities for prototyping new features (i.e.,
> experimenting with new scheduling algorithms), what I would like to do
> sometime next month:
> 
> 1) Try to put Kristjan's changes into the PyPy Stackless.py module. I
> don't think that module has been worked on since 2007. Of course this
> would start of as a private copy of mine.
> 
> 
> 2) Write a scheduler.select() :  I believe it is easier if you have the
> scheduler's help.
> 
> 3) If I can pick up enough of tool chain, see if I can write select as
> a language feature.
> 
> 
> Cheers,
> Andrew
> 
> 
> 
> 





More information about the Stackless mailing list