good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Sharing data structures among http processes?by TravelByRoad (Acolyte) |
on Jun 28, 2001 at 18:45 UTC ( [id://92296]=note: print w/replies, xml ) | Need Help?? |
One technique that comes to mind is to stamp each record
in the disk database as to when it was most recently changed, with the timestamp an indexed field.
When the server responds to a page request, it would first query the database for recently changed records (since the last page request by this process), weave them into the in-memory data structure before doing the requested query in-memory. This approach would task the database server to maintain a consistent state among processes, with each process synchronizing its in-memory state with that consistent state on start of each page request response. TbR
In Section
Seekers of Perl Wisdom
|
|