Basically my idea was to maintain state using 2 things. On the server side i have an object, with appropiate data stored in it and functions and so forth, and a database. On the client side i have a unique 'session id', possibly a md-5 checksum or something highly random of that nature. When i first get a request, i would generate my object, generate a md-5 sum, some how store the md-5 sum client side, possibly via cookie, or maybe hidden input fields, or something of that nature, then use the Storable
's freeze() method to store the object in my database, using the md-5 sum as the key. Then on subsequent requests, i can quickly do a select from the database, and use the thaw() method to restore my object, then go on using the object for my purposes.
Now, my questions.
- Does anyone see any major flaw in this?
- How could i get Storable to read from a database, as opposed to a file
- And does anyone know how i could get Storable working on my win32 box, seeing as all i could find is the source, and i have not had much luck getting the .xs parts of the module to compile?