[Stackless] Google Application Engine Thread on Stackless

Andrew Francis andrewfr_ice at yahoo.com
Thu Mar 26 19:10:36 CET 2009

Hi Kristjan:

> Is pickling really necessary?  


In the world of WS-BPEL, some form of pickling is highly desirable (Microsoft and ODE Apache use the term - hydration).

>Can't you just have the tasklet sleeping, until a HTTP request comes back? >You can put a tasklet to sleep by calling stackless.schedule_remove() or >by calling receive() on a channel.

Having the tasklet block on a channel is fine if you expecting the transaction to end in a reasonable amount of time...

In the world of WS-BPEL, a transaction can take *days* or *weeks* to occur (imagine in reality, a product is back-ordered or you are waiting for M out of N vendors to respond). For the moment, let us put aside issue of what sort of underlying protocol is used. In these situations, you would want, after a certain amount of time, to pickle the tasklets that constitute the process and free up memory. When the message comes back in, depickle the tasklets and they will resume where they left off.

Then there is the case of the underlying computer going down... 

I would figure something like EVE-Online would pickle players and NPCs that are inactive. 

In the near future, I will need to write the code for this - so far I have little tests not a complete system. If people are interested, I can write and post an example. 

> I can't see pickling being required unless you need to pass
> it to a different process.

That is highly useful too.



More information about the Stackless mailing list