Jump to content

Recommended Posts

I'm looking for a way to share a memory space between all my application servers so that once I create an object and attach related objects to it I can let it 'float' around for other processes to use. The thought of several application servers accessing the object breaks my mind

 

Searching for 'object persistence PHP' in a search engine returns results about ORMs like propel or links to a few MVC frameworks and I already have one and I'm looking for real persistence as in keeping the object intact in its unserialized form.

 

Has anyone tried to tackle this memory share issue? Is it a crazy pipe dream?

 

Assuming what I'm looking for is non-existent right now or costs gobs and gobs of money this is what I've come up with instead and would like some feedback on it's implementation.

 

I envision a script that sits between the application servers and the memcache servers. I'll ask for data using a pattern along the lines of ActiveResource. The in between script will get from the memcache servers everything it can and anything it doesn't have from the database, taking care to cache anything new it pulls up. Once it has everything it packages it up for delivery with serialize() and sends it back to the application servers. After the application server request is done it sends the whole chunk of data back to the in between script which then walks the object looking for dirty or modified data and writes it both back to the database and the cache.

 

Maybe this exists already as an open source PHP script but I can't find it or maybe one of you have done something similar inhousefor your company.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.