Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Sharing data structures among http processes?

by TravelByRoad (Acolyte)
on Jun 28, 2001 at 18:45 UTC ( #92296=note: print w/replies, xml ) Need Help??


in reply to Sharing data structures among http processes?

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

  • Comment on Re: Sharing data structures among http processes?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://92296]
help
Chatterbox?
[1nickt]: choroba Understood. I'm wondering about the logic in a cpanfile. If the perl doesn't support threads, it's easy: require MCE. If the perl does support threads, as you say the user has a choice, so require both? Or, assume that irrespective of the choide
[1nickt]: ... choice, the threaded-perl user *probably* wants to use threads, therefore only require threads and leave MCE out, allowing the user to manually install if desired?
[choroba]: just require any of MCE and threads. Not sure if that's possible in the cpanfile, but should be possible early in the Makefile
[1nickt]: The app expects threads as default anyway, right?
[choroba]: that's true
[1nickt]: expects threads *to be* the default
[1nickt]: I think cpanfile can handle the logic. testing now.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-10-18 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (244 votes). Check out past polls.

    Notices?