Um.... Yes, probably.
[I deleted a half-typed-rant on this subject (and the related, growing
trend to think
"virtualizing solves all my problems") before posting it... on the
theory that I
was just being old and crotchety.... suffice it to say that if you
consider what is going to happen the day you have a billion requests
pending and you need
to switch out your interpreter/hardware/shared-libs/OS/whatever to one
that can't unpickle them anymore
because you aren't really sure of their data structure... (or, heaven
forbid, there is a
subtle bug in your unpickle-and-upgrade code!). well... ]
On Mar 26, 2009, at 3:29 PM, Rana Biswas wrote:
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.
Won't saving the data in a database be a better idea in this scenario.
--Rana Biswas
2009/3/26 Andrew Francis <[email protected]>
Hi Kristjan:
> Is pickling really necessary?
YES!
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.
Cheers,
Andrew
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless