Stackless does not scale for multiple CPUs. It is only for cooperative multitasking. Stackless is meant to solve massive context switching costs, which I think Web2Py has very little of.
On Aug 17, 7:47 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > Just for fun I tried the following: > 1) Installed Stackless Python 2.6.2 > 2) downloaded stacklesswsgi.py server > fromhttp://code.google.com/p/stacklessexamples/wiki/StacklessWSGIinto > web2py/ > 3) create the following startup script > # file: stackless_web2py.py > import os > import sys > sys.path.append(os.path.dirname(__file__)) > import gluon.main > import stacklesswsgi > server = stacklesswsgi.Server(('127.0.0.1', 8001), > gluon.main.wsgibase) > server.start() > 4) Run it with: > /stackless/python2.6 stackless_web2py.py > > It works out of the box, except that stacklesswsgi does not support > ssl. > > I am not sure what the pros and cons of this are. In particular it is > not clear to me what happens when web2py calls thread.allocate_lock() > and acquires a lock. It would be interesting to benchmark (with ab) > normal python vs stackless python and try dig whether there is any > issue with multi-threading. I do not expect any advantage of stackless > over normal python in the case of web2py it may open the doors to > interesting applications (something like ninite for rails). This also > an interesting application: > > http://muharem.wordpress.com/2007/07/31/erlang-vs-stackless-python-a-... > > Massimo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---