stack Posted November 1, 2007 Share Posted November 1, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/75657-persisting-objects-in-php-with-resource-handles-intact/ Share on other sites More sharing options...
trq Posted November 1, 2007 Share Posted November 1, 2007 I don't think anything like that exists already for php, but it sounds to me like your thinking along the same / or simular lines to this. maybe that thread will help you a bit. Its way over my head I'm afraid. Quote Link to comment https://forums.phpfreaks.com/topic/75657-persisting-objects-in-php-with-resource-handles-intact/#findComment-382856 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.