Re: WOSession serialisation redux
I have not been seeing any serialization errors, but perhaps my code is eating them somehow. The pages where my app uses Ajax are fairly complicated, but it does exhibit the problem on all of them. I will try to add the debug info flag from below and make sure I am not eating any exceptions. As Chuck suggested, I looked in ERXAjaxSession, but it does not seem to have any serialization related code or transient variables that should make any difference. Hopefully, I am just eating a serialization exception. I will report back after I do some more investigation. Thanks, Frank On Jul 2, 2015, at 1:21 PM, Ramsey Gurley rgur...@smarthealth.com wrote: When I did my demo at WOWODC, ERPersistentSessionStorage worked fine with ERModern look and that uses Ajax extensively. My guess is that you are encountering something Paul Hoadley ran into; Someone committed a serialization breaking change between then and now, and you are just the first to notice it. You might try -Dsun.io.serialization.extendedDebugInfo=true And static code analysis with the FindBugs plugin. FindBugs shows me 7 different serialization errors in the Ajax framework for the ~3 month old version of wonder I’m using. On Jul 1, 2015, at 9:12 PM, Frank Cobia frank_co...@me.com mailto:frank_co...@me.com wrote: I have been absent from the mailing list for a while, because apple automatically unsubscribed me for some reason. However, I noticed in the archives today the discussion about WOSession serialization. I have implemented for myself a session store based on the code in ERPersistentSessionStorage that uses ElastiCache as the backend. For most of my app, things seem to work well. I have even built in session timeouts and session locks (with timeouts). However, I have run into the issue that any of code that uses the Ajax framework does not work. It is as if the changes to the page made through Ajax get lost. I suspect that is has something to do with the page cache, because the Ajax framework does something special with that, but I have not been able to figure out what the problem is. I also, just tried using the ERPersistentSessionStorage framework and had the same problem, so I know the problem is not with my particular implementation. Has anyone ever solved this problem or even just have an idea where I might look for the problem? If I can get this fixed, I will happily share the code. Also, as a side note, I saw the discussions of using JGroups Synchronizer on EC2. I also created a synchronizer that uses ElastiCache and it seems to be working well. Regis has a built-in publish subscribe mechanism that seems to work well for this purpose. Thanks, Frank ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com This email sent to rgur...@smarthealth.com mailto:rgur...@smarthealth.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
When I did my demo at WOWODC, ERPersistentSessionStorage worked fine with ERModern look and that uses Ajax extensively. My guess is that you are encountering something Paul Hoadley ran into; Someone committed a serialization breaking change between then and now, and you are just the first to notice it. You might try -Dsun.io.serialization.extendedDebugInfo=true And static code analysis with the FindBugs plugin. FindBugs shows me 7 different serialization errors in the Ajax framework for the ~3 month old version of wonder I’m using. On Jul 1, 2015, at 9:12 PM, Frank Cobia frank_co...@me.com wrote: I have been absent from the mailing list for a while, because apple automatically unsubscribed me for some reason. However, I noticed in the archives today the discussion about WOSession serialization. I have implemented for myself a session store based on the code in ERPersistentSessionStorage that uses ElastiCache as the backend. For most of my app, things seem to work well. I have even built in session timeouts and session locks (with timeouts). However, I have run into the issue that any of code that uses the Ajax framework does not work. It is as if the changes to the page made through Ajax get lost. I suspect that is has something to do with the page cache, because the Ajax framework does something special with that, but I have not been able to figure out what the problem is. I also, just tried using the ERPersistentSessionStorage framework and had the same problem, so I know the problem is not with my particular implementation. Has anyone ever solved this problem or even just have an idea where I might look for the problem? If I can get this fixed, I will happily share the code. Also, as a side note, I saw the discussions of using JGroups Synchronizer on EC2. I also created a synchronizer that uses ElastiCache and it seems to be working well. Regis has a built-in publish subscribe mechanism that seems to work well for this purpose. Thanks, Frank ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/rgurley%40smarthealth.com This email sent to rgur...@smarthealth.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
Hi Frank, Welcome back! The mailing list does seem to do periodic, random unsubscriptions. Your problem is probably rooted in ERXAjaxSession - something that is not getting serialized properly or something that does not handle the instance changing. Chuck On 2015-07-01, 9:12 PM, Frank Cobia wrote: I have been absent from the mailing list for a while, because apple automatically unsubscribed me for some reason. However, I noticed in the archives today the discussion about WOSession serialization. I have implemented for myself a session store based on the code in ERPersistentSessionStorage that uses ElastiCache as the backend. For most of my app, things seem to work well. I have even built in session timeouts and session locks (with timeouts). However, I have run into the issue that any of code that uses the Ajax framework does not work. It is as if the changes to the page made through Ajax get lost. I suspect that is has something to do with the page cache, because the Ajax framework does something special with that, but I have not been able to figure out what the problem is. I also, just tried using the ERPersistentSessionStorage framework and had the same problem, so I know the problem is not with my particular implementation. Has anyone ever solved this problem or even just have an idea where I might look for the problem? If I can get this fixed, I will happily share the code. Also, as a side note, I saw the discussions of using JGroups Synchronizer on EC2. I also created a synchronizer that uses ElastiCache and it seems to be working well. Regis has a built-in publish subscribe mechanism that seems to work well for this purpose. Thanks, Frank ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.commailto:Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com This email sent to ch...@gevityinc.commailto:ch...@gevityinc.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
I have been absent from the mailing list for a while, because apple automatically unsubscribed me for some reason. However, I noticed in the archives today the discussion about WOSession serialization. I have implemented for myself a session store based on the code in ERPersistentSessionStorage that uses ElastiCache as the backend. For most of my app, things seem to work well. I have even built in session timeouts and session locks (with timeouts). However, I have run into the issue that any of code that uses the Ajax framework does not work. It is as if the changes to the page made through Ajax get lost. I suspect that is has something to do with the page cache, because the Ajax framework does something special with that, but I have not been able to figure out what the problem is. I also, just tried using the ERPersistentSessionStorage framework and had the same problem, so I know the problem is not with my particular implementation. Has anyone ever solved this problem or even just have an idea where I might look for the problem? If I can get this fixed, I will happily share the code. Also, as a side note, I saw the discussions of using JGroups Synchronizer on EC2. I also created a synchronizer that uses ElastiCache and it seems to be working well. Regis has a built-in publish subscribe mechanism that seems to work well for this purpose. Thanks, Frank ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
Can you just mark it as transient and re-create it on a lazy creation basis? I've not looked but that seems like an appropriate use of transient. Chuck On 2015-05-20, 6:45 PM, Paul Hoadley wrote: On 20 May 2015, at 9:21 am, Paul Hoadley pa...@logicsquad.netmailto:pa...@logicsquad.net wrote: On 20 May 2015, at 1:53 am, Ramsey Gurley rgur...@smarthealth.commailto:rgur...@smarthealth.com wrote: On May 19, 2015, at 4:03 AM, Paul Hoadley pa...@logicsquad.netmailto:pa...@logicsquad.net wrote: I've had a look at Ramsey's ERPersistentSessionStorage.framework, and my intention was to create something similar backed by memcached. I got it working to the proof-of-concept level on a trivial app, but using native Java serialisation seems brittle. (By which I mean it falls over pretty fast when you throw a serialisation-based approach into a substantial application.) I'm curious about the falls over pretty fast part. What sort of problems do you have? Serialization failures. (To be clear, I'm talking about testing with my own memcached-based approach, but it's really only some very minor changes to your work to use memcached instead of the database as the back-end.) Initially it was my own classes, which I could fix, but then I started hitting weirdness like this: Caused by: java.io.NotSerializableException: java.lang.reflect.Field It's not obvious to me where that's coming from, or how to fix it. Having just discovered this: -Dsun.io.serialization.extendedDebugInfo=true I can report that the java.lang.reflect.Field is in an ERXDisplayGroup. And here it is: public class ERXDisplayGroupT extends WODisplayGroup { private Field displayedObjectsField; So is ERXDisplayGroup simply not serializable, and hence I'd need to pull it from any application that wanted to use ERPersistentSessionStorage.framework? -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.commailto:Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com This email sent to ch...@gevityinc.commailto:ch...@gevityinc.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
On 20 May 2015, at 9:21 am, Paul Hoadley pa...@logicsquad.net wrote: On 20 May 2015, at 1:53 am, Ramsey Gurley rgur...@smarthealth.com wrote: On May 19, 2015, at 4:03 AM, Paul Hoadley pa...@logicsquad.net wrote: I’ve had a look at Ramsey’s ERPersistentSessionStorage.framework, and my intention was to create something similar backed by memcached. I got it working to the proof-of-concept level on a trivial app, but using native Java serialisation seems brittle. (By which I mean it falls over pretty fast when you throw a serialisation-based approach into a substantial application.) I’m curious about the falls over pretty fast part. What sort of problems do you have? Serialization failures. (To be clear, I’m talking about testing with my own memcached-based approach, but it’s really only some very minor changes to your work to use memcached instead of the database as the back-end.) Initially it was my own classes, which I could fix, but then I started hitting weirdness like this: Caused by: java.io.NotSerializableException: java.lang.reflect.Field It’s not obvious to me where that’s coming from, or how to fix it. Having just discovered this: -Dsun.io.serialization.extendedDebugInfo=true I can report that the java.lang.reflect.Field is in an ERXDisplayGroup. And here it is: public class ERXDisplayGroupT extends WODisplayGroup { private Field displayedObjectsField; So is ERXDisplayGroup simply not serializable, and hence I’d need to pull it from any application that wanted to use ERPersistentSessionStorage.framework? -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
On 21 May 2015, at 11:17 am, Chuck Hill ch...@gevityinc.com wrote: Can you just mark it as transient and re-create it on a lazy creation basis? I’ve not looked but that seems like an appropriate use of transient. Yep, that works. Thanks Chuck. -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
WOSession serialisation redux
Hello, This issue comes up every few years. (I just re-read an epic thread on this and other issues from 2010.) Here it is again. I have a really simple question: is _anyone_ successfully serialising WOSession objects (using _any_ method, and preferably _not_ native Java serialisation) with a view to using a WOSessionStore that’s not based in local memory in non-trivial, non-demo apps? I’ve had a look at Ramsey’s ERPersistentSessionStorage.framework, and my intention was to create something similar backed by memcached. I got it working to the proof-of-concept level on a trivial app, but using native Java serialisation seems brittle. (By which I mean it falls over pretty fast when you throw a serialisation-based approach into a substantial application.) Is this problem solved, unsolved, or unsolvable? Is _anyone_ using non-local session storage of _any_ kind? -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
On May 19, 2015, at 4:51 PM, Paul Hoadley pa...@logicsquad.net wrote: Hi Ramsey, On 20 May 2015, at 1:53 am, Ramsey Gurley rgur...@smarthealth.com wrote: On May 19, 2015, at 4:03 AM, Paul Hoadley pa...@logicsquad.net wrote: I’ve had a look at Ramsey’s ERPersistentSessionStorage.framework, and my intention was to create something similar backed by memcached. I got it working to the proof-of-concept level on a trivial app, but using native Java serialisation seems brittle. (By which I mean it falls over pretty fast when you throw a serialisation-based approach into a substantial application.) I’m curious about the falls over pretty fast part. What sort of problems do you have? Serialization failures. (To be clear, I’m talking about testing with my own memcached-based approach, but it’s really only some very minor changes to your work to use memcached instead of the database as the back-end.) Initially it was my own classes, which I could fix, but then I started hitting weirdness like this: Caused by: java.io.NotSerializableException: java.lang.reflect.Field It’s not obvious to me where that’s coming from, or how to fix it. Findbugs is really good at finding these. Install the plugin, run it on your code (and wonder code that you use), and look for the serialization issues it produces. It can be a bit tricky to find serialization errors if these non-serializable objects are stuffed inside a serializable object (NSArrayField). In any case, you can usually put an uncaught exception breakpoint in eclipse to stop the program on these exceptions so you can pick through the stack to find the culprit. In my testing and WOWODC demo, I had it working well enough to run all page configurations of R2D2W and ERModern apps. I had also formed the impression (perhaps erroneously!) that you had found serialization issues deeper inside the WebObjects frameworks that were going to be difficult or impossible to fix. The only major remaining issue I had was ECs serialization with related EOs. I had it mostly fixed in EOCustomObject in ERPersistentSessionStorage, but it would still pop up occasionally. A little jadclipse could go a long way here. Oh, and the session reaper puts something like a 2 week uptime limit on your apps if you used sessions that never expire. Just schedule restarts once a week or something for instances should work around that. I didn’t see any reason to replace the original wosessionstore super class just to fix that. Basically I wrote that framework to prove to myself that a component action/D2W app could be used as a “front end” app at scale and do a better job of it to boot. I succeeded in convincing myself that it was possible and left it there :-) What would it take to get you back into this? Let’s start with a show of hands: is anyone else interested in developing a robust solution to this problem? I’ve kinda moved on to other interests, but there’s little to stop you guys from doing it. I felt like I had it about 95% there. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
Hi Ramsey, On 20 May 2015, at 1:53 am, Ramsey Gurley rgur...@smarthealth.com wrote: On May 19, 2015, at 4:03 AM, Paul Hoadley pa...@logicsquad.net wrote: I’ve had a look at Ramsey’s ERPersistentSessionStorage.framework, and my intention was to create something similar backed by memcached. I got it working to the proof-of-concept level on a trivial app, but using native Java serialisation seems brittle. (By which I mean it falls over pretty fast when you throw a serialisation-based approach into a substantial application.) I’m curious about the falls over pretty fast part. What sort of problems do you have? Serialization failures. (To be clear, I’m talking about testing with my own memcached-based approach, but it’s really only some very minor changes to your work to use memcached instead of the database as the back-end.) Initially it was my own classes, which I could fix, but then I started hitting weirdness like this: Caused by: java.io.NotSerializableException: java.lang.reflect.Field It’s not obvious to me where that’s coming from, or how to fix it. I had also formed the impression (perhaps erroneously!) that you had found serialization issues deeper inside the WebObjects frameworks that were going to be difficult or impossible to fix. I had a few unresolved bugs that could have probably been fixed by rewriting EOEditingContext’s serialization routine, but I never bothered. That sounds a lot more promising. I was under the impression you had abandoned the idea because the problem was unsolvable. It became obvious to me that a) nobody was interested in fixing serialization in their legacy classes, I’m interested! and b) everyone was too proud of their one-off direct action workarounds to this particular problem to look at a new solution that works for everything. I am really interested in being able to decouple session persistence from the application server to allow for automated horizontal scaling of component action-based apps. Basically I wrote that framework to prove to myself that a component action/D2W app could be used as a “front end” app at scale and do a better job of it to boot. I succeeded in convincing myself that it was possible and left it there :-) What would it take to get you back into this? Let’s start with a show of hands: is anyone else interested in developing a robust solution to this problem? -- Paul Hoadley http://logicsquad.net/ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
On Wed, May 20, 2015, at 09:51 AM, Paul Hoadley wrote: Hi Ramsey, On 20 May 2015, at 1:53 am, Ramsey Gurley rgur...@smarthealth.com wrote: On May 19, 2015, at 4:03 AM, Paul Hoadley pa...@logicsquad.net wrote: I’ve had a look at Ramsey’s ERPersistentSessionStorage.framework, and my intention was to create something similar backed by memcached. I got it working to the proof-of-concept level on a trivial app, but using native Java serialisation seems brittle. (By which I mean it falls over pretty fast when you throw a serialisation-based approach into a substantial application.) I’m curious about the falls over pretty fast part. What sort of problems do you have? Serialization failures. (To be clear, I’m talking about testing with my own memcached-based approach, but it’s really only some very minor changes to your work to use memcached instead of the database as the back-end.) Initially it was my own classes, which I could fix, but then I started hitting weirdness like this: Caused by: java.io.NotSerializableException: java.lang.reflect.Field It’s not obvious to me where that’s coming from, or how to fix it. I had also formed the impression (perhaps erroneously!) that you had found serialization issues deeper inside the WebObjects frameworks that were going to be difficult or impossible to fix. I had a few unresolved bugs that could have probably been fixed by rewriting EOEditingContext’s serialization routine, but I never bothered. That sounds a lot more promising. I was under the impression you had abandoned the idea because the problem was unsolvable. It became obvious to me that a) nobody was interested in fixing serialization in their legacy classes, I’m interested! and b) everyone was too proud of their one-off direct action workarounds to this particular problem to look at a new solution that works for everything. I am really interested in being able to decouple session persistence from the application server to allow for automated horizontal scaling of component action-based apps. Basically I wrote that framework to prove to myself that a component action/D2W app could be used as a “front end” app at scale and do a better job of it to boot. I succeeded in convincing myself that it was possible and left it there :-) What would it take to get you back into this? Let’s start with a show of hands: is anyone else interested in developing a robust solution to this problem? -- Paul Hoadley http://logicsquad.net/ I'm most certainly interested :) As you know, I dabbled with the framework for a project but came across some serialization problems deep in the frameworks. I am really interested in the approach you mention above, Ramsey, with the EC serialization routine. My intention was to use ElastiCache. -- Matt http://logicsquad.net ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: WOSession serialisation redux
On May 19, 2015, at 4:03 AM, Paul Hoadley pa...@logicsquad.net wrote: I’ve had a look at Ramsey’s ERPersistentSessionStorage.framework, and my intention was to create something similar backed by memcached. I got it working to the proof-of-concept level on a trivial app, but using native Java serialisation seems brittle. (By which I mean it falls over pretty fast when you throw a serialisation-based approach into a substantial application.) I’m curious about the falls over pretty fast part. What sort of problems do you have? I had a few unresolved bugs that could have probably been fixed by rewriting EOEditingContext’s serialization routine, but I never bothered. It became obvious to me that a) nobody was interested in fixing serialization in their legacy classes, and b) everyone was too proud of their one-off direct action workarounds to this particular problem to look at a new solution that works for everything. Basically I wrote that framework to prove to myself that a component action/D2W app could be used as a “front end” app at scale and do a better job of it to boot. I succeeded in convincing myself that it was possible and left it there :-) ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com