You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris Merrill <ch...@webperformance.com> on 2012/03/15 18:56:07 UTC

Page/Session persistence on AppEngine

So I've got a problem with my sessions getting too big on AppEngine. I've already
done some of the more obvious optimizations, but before going further, I'd like
to get some insight into how many pages are being stored in the page map and
how big they are.

I traversed down into PageStoreManager and found where the pages are serialized
in PageStoreManager.SessionEntry.writeObject() and think that I can put some
diagnostics in there to illuminate the situation.

However, I don't know how to convince GAE and/or Wicket to store the session
to persistent storage in the AppEngine development environment (or in Wicket?).

Can anyone point me in the right direction?  Perhaps somewhere I can read up
on the right parts of the mechanism?  I'm not even sure what keywords I should
be searching on...or if this is an AppEngine or Wicket topic...or both?

TIA!
Chris


-- 
------------------------------------------------------------------------ -
Chris Merrill                           |  Web Performance, Inc.
chris@webperformance.com                |  http://webperformance.com
919-433-1762                            |  919-845-7601

Web Performance: Website Load Testing Software & Services
------------------------------------------------------------------------ -

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Page/Session persistence on AppEngine

Posted by Per <pe...@hamburg.de>.
Hi Chris,

we encountered similar problems, and wrote two blogposts: One about tweaking
all the components, one about zipping the session. 

http://www.small-improvements.com/blog/technical/tuning-wicket-session-size
http://blog.small-improvements.com/2012/02/19/reducing-wicket-session-size-to-one-third/

You should use a proper profiler (e.g. JProfiler) to figure out the size of
your pages and objects, much more efficient than logging stuff youself. And
then also you can also write a custom IPageMapEvictionStrategy that takes
session size into consideration when evicting pages (e.g. you evict so many
pages until the session size is below 1MB again). That's the last resort
only, but helps avoiding the nasty blank exception page.

All combined, you should be able to work around the session size issue.

Cheers,
Per


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Page-Session-persistence-on-AppEngine-tp4475827p4518388.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Page/Session persistence on AppEngine

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Read https://cwiki.apache.org/confluence/display/WICKET/Page+Storage
You need custom IDataStore. By default Wicket uses DiskDataStore. With
GAE-initializer this is replaced with HttpSessionDataStore, see
org.apache.wicket.pageStore.memory.DataStoreEvictionStrategy as well.
You'll need to implement IDataStore impl based on
http://code.google.com/appengine/docs/java/datastore/

Good luck and as always - wicketstuff-gae-initializer will be glad to
accept your donations!

On Thu, Mar 15, 2012 at 7:56 PM, Chris Merrill <ch...@webperformance.com> wrote:
> So I've got a problem with my sessions getting too big on AppEngine. I've already
> done some of the more obvious optimizations, but before going further, I'd like
> to get some insight into how many pages are being stored in the page map and
> how big they are.
>
> I traversed down into PageStoreManager and found where the pages are serialized
> in PageStoreManager.SessionEntry.writeObject() and think that I can put some
> diagnostics in there to illuminate the situation.
>
> However, I don't know how to convince GAE and/or Wicket to store the session
> to persistent storage in the AppEngine development environment (or in Wicket?).
>
> Can anyone point me in the right direction?  Perhaps somewhere I can read up
> on the right parts of the mechanism?  I'm not even sure what keywords I should
> be searching on...or if this is an AppEngine or Wicket topic...or both?
>
> TIA!
> Chris
>
>
> --
> ------------------------------------------------------------------------ -
> Chris Merrill                           |  Web Performance, Inc.
> chris@webperformance.com                |  http://webperformance.com
> 919-433-1762                            |  919-845-7601
>
> Web Performance: Website Load Testing Software & Services
> ------------------------------------------------------------------------ -
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org