Re: PerSessionPageStore thread-safety

2020-03-21 Thread Thomas Heigl
Hi all, In case anyone else is running into this: I have successfully implemented a `PageAccessSynchronizer` for Spring Session that keeps locks in application scope. We have been running it in production for a couple of days now and have served millions of requests without any issues. Spring

Re: PerSessionPageStore thread-safety

2020-02-28 Thread Thomas Heigl
Hi Martin, I created https://github.com/apache/wicket/pull/411 with my suggested changes. Feedback would be greatly appreciated ;) Best regards, Thomas On Fri, Feb 28, 2020 at 10:14 AM Martin Grigorov wrote: > On Thu, Feb 27, 2020 at 3:58 PM Thomas Heigl wrote: > > > Hi Martin, > > > >

Re: PerSessionPageStore thread-safety

2020-02-28 Thread Martin Grigorov
On Thu, Feb 27, 2020 at 3:58 PM Thomas Heigl wrote: > Hi Martin, > > Could you please explain how exactly Spring Session works ? This will help > > us both understand where the problem comes from. > > > > Sure. From the docs >

Re: PerSessionPageStore thread-safety

2020-02-27 Thread Thomas Heigl
Hi Martin, Could you please explain how exactly Spring Session works ? This will help > us both understand where the problem comes from. > Sure. From the docs : Spring Session provides an API and implementations for managing

Re: PerSessionPageStore thread-safety

2020-02-27 Thread Martin Grigorov
Hi Thomas, Could you please explain how exactly Spring Session works ? This will help us both understand where the problem comes from. Also how exactly do you integrate it with Wicket ? Which extension points do you use ? Since it is backed by Redis it means that it is distributed. But at the

Re: PerSessionPageStore thread-safety

2020-02-27 Thread Thomas Heigl
I created https://issues.apache.org/jira/projects/WICKET/issues/WICKET-6751 Feedback would be very welcome. Best regards, Thomas On Thu, Feb 27, 2020 at 10:08 AM Thomas Heigl wrote: > Hi all, > > I can confirm that my analysis was correct. I implemented a quick version > of

Re: PerSessionPageStore thread-safety

2020-02-27 Thread Thomas Heigl
Hi all, I can confirm that my analysis was correct. I implemented a quick version of ApplicationScopedPageAccessSynchronizer and everything works as expected. Providing a custom PageAccessSynchronizer is very cumbersome at the moment. I had to override all concrete methods in the base class and

Re: PerSessionPageStore thread-safety

2020-02-26 Thread Thomas Heigl
Hi Sven, Thanks for the link but I'm not using asynchronous serialization. I thought some more about the issue and I think I figured it out. My setup looks like this: 1. Spring Session Redis 2. [Session Cache] (Not used because it is transient and stored with writeObject/readObject and does not

Re: PerSessionPageStore thread-safety

2020-02-26 Thread Sven Meier
Hi Thomas, Im wondering whether you're running into https://issues.apache.org/jira/browse/WICKET-6702 I've been working on a solution to that problem, which is caused by pages being asynchronously serialized while another request is already coming in. Or maybe it is something different. Could

Re: PerSessionPageStore thread-safety

2020-02-25 Thread Thomas Heigl
Hi again, I investigated a bit and it does not seem to have anything to do with the PerSessionPageStore. I implemented a completely synchronized version of it and the problems still exist. If I switch to the default second-level cache that stores serialized pages in application scope, everything

PerSessionPageStore thread-safety

2020-02-25 Thread Thomas Heigl
Hi all, I'm currently experimenting with PerSessionPageStore as a second-level cache. We are moving our page store from memory (i.e. session) to Redis and keeping 1-2 pages per session in memory speeds up ajax requests quite a bit because network roundtrips and (de)serialization can be skipped