[Stackless] rough PyCon'07 draft; feedback wanted

Andrew Francis andrewfr_ice at yahoo.com
Tue Feb 13 18:53:06 CET 2007


Hello Andrew:

--- Andrew Dalke <dalke at dalkescientific.com> wrote:

> I couldn't think of a good example for that. The
> examples I came up with, like for parsing or network
> I/O, didn't need 100s of threads.  Even if I was
> writing a spider, my network speed would be the
> throttle and not the number of threads.

...

> The advantage of my factorial example, which I'm
> dropping for time's sake, is that it shows using
> 1000 tasklets, which would kill most machines if
> replaced with threads.

I think simple example like your factorial example
would do the trick. The idea is to illustrate
Stackless Python's "lightweightness." In the process
show the differences in speed and memory usage.


> I'm not a game person. 

I am not either. I am using Stackless Python for
service oriented architectures (read business, Web
2.0, etc).
 
> Really? There's no way I know to do that using
> generators. It's going through the C stack because
>of Expat so the callbacks can't yield control.

Granted. I'm assuming generators could change the push
based SAX parser into a pull based system. Let me look
into this. I would be surprised if someone like Uche
Ogbuji or David Mertz hasn't done this already. 

> But I don't know Twisted, don't know how to make a
> socket module equivalent in Twisted, and don't know
> of one that's ready for use like stacklesssocket is.
> 
> Can you help?

Yes I can! I have already posted examples of using
Twisted with Stackless. However give me a few days to
modify some examples out of the Abe Fettig book and
get them to you. Also the examples can serve as the
basis for a Wiki page. 

> I also wanted to get people able to do basic I/O
> without having to download other packages, and I
> liked that I could build directly off of the
> asyncore example for doing an http request.

Andrew, I have no problem with this. I benefited from
Richard Tew's MUD example and I can understand
developing a general solution to I/O. 

I guess my attitude is that Twisted is free and
provides a really powerful networking framework and
its model fits in relatively well with Stackless. I
feel if you want to sell a solution, show the average
programmer how to solve a complex problem in a simple
way. 

> What's an example of using it?  

One of my practical uses for pickling is to swap out
programmes that are waiting a long time for I/O and
reconstitute them later. I have small experiments.
This is why I have been bothering Richard and
Christian over the past year about channels :-)

Unfortunately I am about a month away from having a
fairly complete prototype that can demonstrate
everything I have done with Stackless Python.

To recap, I feel I can commit to Twisted examples.
Give me a hard date for stuff you would like.

Cheers,
Andrew



 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list