On 2005-11-15, at 03.11, Peter1 Alvin wrote:
Using mod_perl, how do you keep Perl objects in RAM from page to page?
I don't want to re-instantiate my objects on every page request, and I
don't want the overhead of serializing my objects to a persistent store
from page to page (I use A LOT of objects).
IMHO, if I create a lot of objects, I don't want to put them all in RAM. I'd
rather create the objects on every request, i.e.: only store the needed
objects in RAM. It is a CPU-Memory trade off. As someone has already noted
in this thread, storing everything in RAM isn't scalable.
I've done extensive reseach and I've not found any "application space"
to store objects indefinitly.
To store objects indefinitely, you must serialize it into persistent
storage. What happen when the computer goes down?
I can't believe Perl doesn't support keeping objects in RAM. This would
de-qualify Perl for half of the projects I need to develop.
Objects only exist in RAM and nowhere else. If you want to make them to
persist between request, you need to put them somewhere that can be accessed
by different processes (and different servers, in the future). Those places
are: filesystem, database, or memcached. Or at the least: shared memory.
Have looked around like you for a solution to this, without finding one and
after discussing it internally, we thought that the optimal can be to write
a custom reversed modproxy server that "talks" directly to the perl code
....... perhaps as a open software project ....
What do you mean by 'a custom reversed modproxy server that "talks" directly
to the perl code'?
---
Badai Aqrandista
Cheepy (?)
_________________________________________________________________
REALESTATE: biggest buy/rent/share listings
http://ninemsn.realestate.com.au