[Stackless] Bug in stackless.tasklet C API?

Kevin Kelley kelleyk at MIT.EDU
Wed Apr 23 15:48:25 CEST 2008

I had a similar feeling while looking at options for my project.  I 
chose to use a custom-written module, implemented in C and exposed to 
Python, that handles networking.  The Python script receives a callback 
whenever a client connects, and can then set a delivery point for 
messages related to that client.  (This can be a deque to which messages 
are appended or a channel across which they are sent.)  Messages include 
packets received from the client and status updates (e.g., disconnects, 
timeouts, what have you).  It does get a bit more complex--I've added an 
RPC layer and a broadcast layer, as well as functionality to allow 
seamless migration of clients between servers (for load balancing, or 
when a server needs to drop out of the cluster).

I don't have firm performance numbers to give you right now, but it 
seems speedy enough.

Lucas Meijer wrote:
> Richard Tew wrote:
>> Any chance you can share with us what you are doing with Stackless?
>> Anyone else who is doing with Stackless and can share with the list, please
>> chime in :)
> I'm seriously considering writing the game logic of my upcoming 
> multiplayer game in stackless.
> It's a turn based game, and while doing some initial test 
> implementations, to get a bit of an idea of the actual problem domain,
> I've been completely amazed at how closely stackless code maps to the 
> logic I'm trying to desciribe. It's totally cool.
> The thing that might prevent me from actually using it, is that I'm 
> having a very hard time finding a solution to
> hook up stackless to network sockets, in a way that will reliably deal 
> with thousands if not much more, of connections.
> Richard's stacklessocket, Phoenix's attempt at socketlibevent socket, 
> and the recent Twisted network hookups all don't feel like
> they'd hold up when things start to scale up. Mind you, this is very 
> much a feeling, so if anybody is actually using any of these
> in a similar environment, with loads of connections, I'd love to hear 
> about it.
> I'm looking at that Yield server now. If anybody has advice on how to 
> implement the connection between stackless and OS network support,
> I'm all ears.
> PS not sure if it's considered bad form, but if we can figure out a way 
> to use stackless for the backend, we'll be looking for a network
> programmer, preferrably with a good understanding of stackless. If that 
> sounds like you, please drop me a line.
> Bye, Lucas
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless

Kevin Kelley
kelleyk at mit.edu
+1 919 259 2290

Massachusetts Institute of Technology
Department of Electrical Engineering and Computer Science
Candidate, S.B. Computer Science (Course VI-3), c/o 2009

More information about the Stackless mailing list