On Wed, Feb 15, 2006 at 08:31:17AM +1300, CrazyChris wrote:
> We may be at crossed paths...  I'm wanting to save the :memory: database to
> the session, not the other way round, so that when the 2nd page loads, the
> :memory: database can be recreated and available as it was on the last page
> load.

What is a "session"?  I assume that's some special PHP or Apache
feature, but which?  How is a "session" implemented really?
Inter-process shared memory on Unix?  Process-wide memory in a
multi-threaded Apache 2.x build?  What? 

Having an in-memory database (or in-memory anything) persist across
multiple page hits in a web server is certainly feasible, but for
anyone not using the exact same tools as you, you probably want to
give more background - basically, provide a mapping between
tool-specific jargon like "session", and more widely understood
programming terms.

> The advantage is that after some time, the session is deleted
> automatically by the server and the database goes with it, so short term,
> high-intensity data can be stored and queried quickly in :memory: and the
> add/edits remain through the entire user experience.

I don't see why that is any real advantage.  Periodically purging an
in-memory database of old values should be rather trivial.

> An alternative is to create the :memory: database and populate it from
> session data each time, then save back to session on script close.

That sounds like a bizarre hack.  (But then I don't know what your
sessions really are, nor do I really understand your application
requirements, so perhaps I am missing something.)

-- 
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com/

Reply via email to