On 2011-12-02, at 10:21 AM, Ramsey Gurley wrote: > > On Dec 2, 2011, at 11:07 AM, Chuck Hill wrote: > >> >> On 2011-12-02, at 7:32 AM, Ramsey Gurley wrote: >> >>> I have a framework that is designed to serialize the session automatically, >>> save it to the database, and use distributed session storage. >>> Theoretically, you could set the session to almost never expire, allowing >>> an almost permanent login like this. >>> >>> It just doesn't work in practice, >> >> :-) I was really, really impressed up to this point! I was thinking "Wow, >> that seems barely possible" > > :-D I really, really wish I could have done that too. It would make managing > instances a lot easier. It might just be trading curses though. WO can be a > memory hog because it keeps all this stuff in memory. Dump it in the > database, and maybe WO becomes a cpu hog, serializing and deserializing all > those objects.
I think you would probably need to be a bit clever and only serialize the minimum to reconstitute the state. For example only save a GID if an EO did not have changes in an EC. Otherwise, the GID plus a dictionary of the changes. Even so, the CPU load could get overwhelming. You would want to keep the page cache small and aggressively dispose of ECs at the least. Components, I think, would only need the ivars serialized, not the page template or anything that could be re-generated. For the general case it is a very interesting problem. Chuck >>> because serializing the session requires serializing all the pages in the >>> backtrack cache as well as the session's ec. Turning off the backtrack >>> cache really isn't an option if you are using component actions, and most >>> components and EOs I've seen just aren't serializable. Bummer. >> >> Yeah, it is a very difficult problem for sure. You can't just use Java >> serialization. >> >> >> Chuck >> >>> >>> I put the framework on Github for posterity, just in case anyone wants to >>> dink around with it. Just add it to a project, turn on migrations and it >>> should handle the rest. >>> >>> https://github.com/nullterminated/ponder/tree/master/ERPersistentSessionStorage >>> >>> Ramsey >>> >>> On Dec 2, 2011, at 7:00 AM, Pascal Robert wrote: >>> >>>> I never saw a web app that do that, unless you go stateless. >>>> >>>>> Hi, >>>>> >>>>> Thanks for the reply. >>>>> >>>>> I don't really care about the timed out session. I am more looking for >>>>> restoring my whole context even with a new session. >>>>> >>>>> Ajax won't be helpful for me, because I want to plug such a behaviour to >>>>> an existing complex application. It won't be very convenient to review >>>>> all the forms and components. >>>>> >>>>> Mahdi >>>>> >>>>> On 2011-12-02, at 1:54 PM, Jérémy DE ROYER wrote: >>>>> >>>>>> I dont think its possible, timeout is timeout >>>>>> >>>>>> May be you could auto save the form with ajax and restore it in the new >>>>>> session ? >>>>>> >>>>>> Jeremy DE ROYER >>>>>> >>>>>> Le 2 déc. 2011 à 12:11, Mahdi Mankai >>>>>> <[email protected]> a écrit : >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I'd like to do something but I am not sure whether it's possible. >>>>>>> >>>>>>> I have a WO application that requires users to login. >>>>>>> >>>>>>> I am storing the user credentials in cookies to avoid having to login >>>>>>> each time. >>>>>>> >>>>>>> I'd like to handle the situation where a user tries to continue working >>>>>>> on the application after his session is timed out. >>>>>>> >>>>>>> Basically, whatever the request is (may be Direct Action or Component >>>>>>> request, with or without form values), I want to get the appropriate >>>>>>> response but with a new session (created using the credentials stored >>>>>>> in cookies). i.e. process the same request but with a different session >>>>>>> or (I don't know if it's possible) restore a timed out session. >>>>>>> >>>>>>> I don't want to extend the session timeout parameter. >>>>>>> >>>>>>> I tried to do something in >>>>>>> handleSessionRestorationErrorInContext(WOContext aContext) in >>>>>>> WOApplication class. But couldn't figure out how to reuse the same >>>>>>> context with a different session. The only thing I was able to do is to >>>>>>> redirect to a specific page. >>>>>>> >>>>>>> For example, I would like users to be able to fill a form, come back >>>>>>> tomorrow, hit save and my application should be able to handle that >>>>>>> smoothly. >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Mahdi >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Do not post admin requests to the list. They will be ignored. >>>>>>> Webobjects-dev mailing list ([email protected]) >>>>>>> Help/Unsubscribe/Update your Subscription: >>>>>>> http://lists.apple.com/mailman/options/webobjects-dev/jeremy.deroyer%40ingencys.net >>>>>>> >>>>>>> This email sent to [email protected] >>>>>> _______________________________________________ >>>>>> Do not post admin requests to the list. They will be ignored. >>>>>> Webobjects-dev mailing list ([email protected]) >>>>>> Help/Unsubscribe/Update your Subscription: >>>>>> http://lists.apple.com/mailman/options/webobjects-dev/mahdi.mankai%40fuegodigitalmedia.com >>>>>> >>>>>> This email sent to [email protected] >>>>> >>>>> _______________________________________________ >>>>> Do not post admin requests to the list. They will be ignored. >>>>> Webobjects-dev mailing list ([email protected]) >>>>> Help/Unsubscribe/Update your Subscription: >>>>> http://lists.apple.com/mailman/options/webobjects-dev/probert%40macti.ca >>>>> >>>>> This email sent to [email protected] >>>> >>>> _______________________________________________ >>>> Do not post admin requests to the list. They will be ignored. >>>> Webobjects-dev mailing list ([email protected]) >>>> Help/Unsubscribe/Update your Subscription: >>>> http://lists.apple.com/mailman/options/webobjects-dev/ramseygurley%40gmail.com >>>> >>>> This email sent to [email protected] >>> >>> _______________________________________________ >>> Do not post admin requests to the list. They will be ignored. >>> Webobjects-dev mailing list ([email protected]) >>> Help/Unsubscribe/Update your Subscription: >>> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net >>> >>> This email sent to [email protected] >> >> -- >> Chuck Hill Senior Consultant / VP Development >> >> Practical WebObjects - for developers who want to increase their overall >> knowledge of WebObjects or who are trying to solve specific problems. >> http://www.global-village.net/products/practical_webobjects >> >> >> >> >> >> >> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list ([email protected]) >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com >> >> This email sent to [email protected] > -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
