Re: [Wicket-user] Sessionless Wicket?

2007-07-23 Thread Jonathan Locke


this is generally in sync with what i know about session usage.  if you're
using 1.3 and detachable models and so forth, 20K sessions on a reasonable
box is not going to be a problem.  wicket pages really are pretty small.  a
very complex one might be 50-100K and i've never actually seen one much over
about 100K myself.  and since 1.3 pages everything but the most recent page
to disk, you've got maybe 50K per session.  complex pages could be 80-100K,
but simpler pages can also be 15K or less.  if you take 50K as an average,
that's 20 per MB * 1GB (1,000 MB) = 20,000.


Steven Zou wrote:
 
 Hi,Maciej,really? it's so exciting.
 we're choosing framework now,and I prefer wicket, but the heavy session is
 my care.
 but there're some questions:
 (1)where you result from? Is the 20,200 reality request and not from
 jmeter(or other stress test tool)?
 (2)300MB/20,000=15KB,Does it mean only 15KB per session? I think 15KB
 isn't enough for only one page.
 (3)Would you like give us some experience for so high load web
 application?
 
 thanks.
 
 
 Maciej Andreas Bednarz wrote:
 
 Hello Jeremy,
 
 try also to disable any versioning and use read only models. I have tuned
 my private wicket project this way and it now supports more than 20.000
 concurrent sessions on a single tomcat server. If everything in your
 model is serializable you can also use tomcats disk or jdbc persistence
 store for sessions. There is also a terracotta project, so you can
 cluster your wicket (1.3) application lineary. My average memory usage
 with 20.000 sessions in memory and very complex page structures (multiple
 including page object levels) is about 300MB. I think this could serve
 even a large community site :-)
 
 Maciej
   - Original Message - 
   From: Igor Vaynberg 
   To: [EMAIL PROTECTED] ;
 wicket-user@lists.sourceforge.net 
   Sent: Thursday, May 03, 2007 7:27 AM
   Subject: Re: [Wicket-user] Sessionless Wicket?
 
 
   detachable models are a must.
 
   in my experience a wicket page is only about 50kb on average. that
 would hardly cause an OOME on a server. 1.3 has second level session
 store that pages to disk, so that is something else you might want to
 try. 
 
   once you convert to detachable models oomes should go away.
 
   there is an example in wicket-examples on stateless stuff if you need
 to go that far.
 
   -igor
 
 
 
 
   On 5/2/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:
 I know that I read somewhere that there is, or is going to be, a way
 to run your wicket application without creating a session (until
 absolutely necessary).  We have a site that has mostly been converted to
 Wicket now, and almost all of it is state-less data  The URLs are all
 bookmarkable (98% of them are), so there is not much state to track.  We
 don't need a full object graph of all your pages and components, except
 for on very few pages once you have signed in.  
 
 We're experiencing out of memory problems increasingly with an
 increase in traffic.  I'm not holding much in the session, but objects
 are held in pages and components I now believe we should have used
 detachable models for many things rather than directly holding a
 reference to a DB-backed object.  Should I start by going back and
 retrofitting many of those private references within components to use
 detachable models so that the objects are not held in memory? 
 
 Any other suggestions?
 
 Thank you!
 Jeremy Thomerson
 texashuntfish.com
 
 
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now. 
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list 
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 
 
 
 --
 
 
  
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
 
 
 --
 
 
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2

Re: [Wicket-user] Sessionless Wicket?

2007-07-22 Thread Lec



 Yeah, you can give provide a HINT that they shouldn't be stored (that
 they are stateless) by overriding getStatelessHint on the components
 you put on the page. Note that if there is just one stateful component
 on the page, that'll trigger the page to be marked as stateful UNLESS
 you explicitly mark the page itself stateless (which is a bit cheaper
 by the way, as it won't iterate over it's children to find out whether
 it is stateless). 
 

i thought even if you explicitly mark a page as stateless that has stateful
components ( link, form, etc ), it 
would still render as stateful ( creating session ) ? isn't that
the behaviour? 


Eelco Hillenius wrote:
 
 Thanks to everyone for their help - I'm starting right away to convert
 everything to detachable models for all domain objects that are loaded
 into
 components...
 
 If you're only working with stateless pages, you don't detachable
 models as those pages won't be stored to start with. But if you want
 to reuse the models and components in stateful pages, it is better to
 have that.
 
 Eelco, I am curious about your statement when you have no callbacks,
 you're
 page will be stateless and not kept in memory...  Most of my pages have
 no
 callbacks (by callback, I'm assuming that you mean a link that would have
 reference to wicket components in the URL, meaning that it is storing the
 state of that component so that it can further interact with it).
 
 Yep. Normal Links, Forms, ajax requests etc.
 
 I have
 taken great care to control the URLs of the application, so almost every
 page has only components that have standard URLs, with no references to
 any
 components, etc.  The forms will obviously have a call back, and certain
 links (particularly if you are signed in as an administrator - a lot of
 links appear to edit and delete content that are all direct callbacks
 with
 obviously no direct URL encoding / decoding so that you can not use them
 outside of your session).
 
 Not sure what you're getting at...
 
 So, how do I know if it's storing the pages in memory?  Is there
 something I
 can do to tell it not to?
 
 Yeah, you can give provide a HINT that they shouldn't be stored (that
 they are stateless) by overriding getStatelessHint on the components
 you put on the page. Note that if there is just one stateful component
 on the page, that'll trigger the page to be marked as stateful UNLESS
 you explicitly mark the page itself stateless (which is a bit cheaper
 by the way, as it won't iterate over it's children to find out whether
 it is stateless).
 
 The method where this all happens is Page#isPageStateless.
 
 Also, if you want to keep track of when user sessions are created,
 create a custom session store by overriding newSessionStore on
 Application and let your custom store extend HttpSessionStore or
 SecondLevelCacheSessionStore and then override onBind which will be
 called when (new) sessions are bound to the HttpSession.
 
 Eelco
 
 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context: 
http://www.nabble.com/Sessionless-Wicket--tf3684664.html#a11738136
Sent from the Wicket - User mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-07-22 Thread Eelco Hillenius
 i thought even if you explicitly mark a page as stateless that has stateful
 components ( link, form, etc ), it
 would still render as stateful ( creating session ) ? isn't that
 the behaviour?

yes that is true.

Eelco

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-04 Thread Jeremy Thomerson

Should I be concerned that the numbers in the following URLs jump so much?
This is on a page signed in as an admin, where I do have some callback links
that are stateful.

On one page view, here is an admin link:
http://www.texashuntfish.dev/thf/app?wicket:interface=:12492:list:posts:0:postSummary:delete::ILinkListener
I refresh (no other page views in between), and it changes to:
http://www.texashuntfish.dev/thf/app?wicket:interface=:13999:list:posts:0:postSummary:delete::ILinkListener

That's an increase of 1500 in a single page view... I am concerned that
somehow this means that I have 1500 components going into memory for a
single page?  Is that number changing so drastically something to be alarmed
about?

Thank you!
Jeremy

On 5/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 Thanks to everyone for their help - I'm starting right away to convert
 everything to detachable models for all domain objects that are loaded
into
 components...

If you're only working with stateless pages, you don't detachable
models as those pages won't be stored to start with. But if you want
to reuse the models and components in stateful pages, it is better to
have that.

 Eelco, I am curious about your statement when you have no callbacks,
you're
 page will be stateless and not kept in memory...  Most of my pages have
no
 callbacks (by callback, I'm assuming that you mean a link that would
have
 reference to wicket components in the URL, meaning that it is storing
the
 state of that component so that it can further interact with it).

Yep. Normal Links, Forms, ajax requests etc.

 I have
 taken great care to control the URLs of the application, so almost every
 page has only components that have standard URLs, with no references to
any
 components, etc.  The forms will obviously have a call back, and certain
 links (particularly if you are signed in as an administrator - a lot of
 links appear to edit and delete content that are all direct callbacks
with
 obviously no direct URL encoding / decoding so that you can not use them
 outside of your session).

Not sure what you're getting at...

 So, how do I know if it's storing the pages in memory?  Is there
something I
 can do to tell it not to?

Yeah, you can give provide a HINT that they shouldn't be stored (that
they are stateless) by overriding getStatelessHint on the components
you put on the page. Note that if there is just one stateful component
on the page, that'll trigger the page to be marked as stateful UNLESS
you explicitly mark the page itself stateless (which is a bit cheaper
by the way, as it won't iterate over it's children to find out whether
it is stateless).

The method where this all happens is Page#isPageStateless.

Also, if you want to keep track of when user sessions are created,
create a custom session store by overriding newSessionStore on
Application and let your custom store extend HttpSessionStore or
SecondLevelCacheSessionStore and then override onBind which will be
called when (new) sessions are bound to the HttpSession.

Eelco


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-04 Thread Igor Vaynberg

that is actually the page id not component id. so either you create 1500
pages in between, or stateless pages generate random ids - which it didnt
look like from the code...

-igor


On 5/4/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:


Should I be concerned that the numbers in the following URLs jump so
much?  This is on a page signed in as an admin, where I do have some
callback links that are stateful.

On one page view, here is an admin link:
http://www.texashuntfish.dev/thf/app?wicket:interface=:12492:list:posts:0:postSummary:delete::ILinkListener
I refresh (no other page views in between), and it changes to:
http://www.texashuntfish.dev/thf/app?wicket:interface=:13999:list:posts:0:postSummary:delete::ILinkListener

That's an increase of 1500 in a single page view... I am concerned that
somehow this means that I have 1500 components going into memory for a
single page?  Is that number changing so drastically something to be alarmed
about?

Thank you!
Jeremy

On 5/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

  Thanks to everyone for their help - I'm starting right away to convert
  everything to detachable models for all domain objects that are loaded
 into
  components...

 If you're only working with stateless pages, you don't detachable
 models as those pages won't be stored to start with. But if you want
 to reuse the models and components in stateful pages, it is better to
 have that.

  Eelco, I am curious about your statement when you have no callbacks,
 you're
  page will be stateless and not kept in memory...  Most of my pages
 have no
  callbacks (by callback, I'm assuming that you mean a link that would
 have
  reference to wicket components in the URL, meaning that it is storing
 the
  state of that component so that it can further interact with it).

 Yep. Normal Links, Forms, ajax requests etc.

  I have
  taken great care to control the URLs of the application, so almost
 every
  page has only components that have standard URLs, with no references
 to any
  components, etc.  The forms will obviously have a call back, and
 certain
  links (particularly if you are signed in as an administrator - a lot
 of
  links appear to edit and delete content that are all direct callbacks
 with
  obviously no direct URL encoding / decoding so that you can not use
 them
  outside of your session).

 Not sure what you're getting at...

  So, how do I know if it's storing the pages in memory?  Is there
 something I
  can do to tell it not to?

 Yeah, you can give provide a HINT that they shouldn't be stored (that
 they are stateless) by overriding getStatelessHint on the components
 you put on the page. Note that if there is just one stateful component
 on the page, that'll trigger the page to be marked as stateful UNLESS
 you explicitly mark the page itself stateless (which is a bit cheaper
 by the way, as it won't iterate over it's children to find out whether
 it is stateless).

 The method where this all happens is Page#isPageStateless.

 Also, if you want to keep track of when user sessions are created,
 create a custom session store by overriding newSessionStore on
 Application and let your custom store extend HttpSessionStore or
 SecondLevelCacheSessionStore and then override onBind which will be
 called when (new) sessions are bound to the HttpSession.

 Eelco



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-03 Thread Matej Knopp
In 1.3 you can use stateless pages (with stateless links and stateless
forms). However, you'll have to sacrifice the programming model in
favor of statelessness a little. I'm not really sure it's worth it.

-Matej

On 5/3/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:
 I know that I read somewhere that there is, or is going to be, a way to run
 your wicket application without creating a session (until absolutely
 necessary).  We have a site that has mostly been converted to Wicket now,
 and almost all of it is state-less data  The URLs are all bookmarkable
 (98% of them are), so there is not much state to track.  We don't need a
 full object graph of all your pages and components, except for on very few
 pages once you have signed in.

 We're experiencing out of memory problems increasingly with an increase in
 traffic.  I'm not holding much in the session, but objects are held in pages
 and components I now believe we should have used detachable models for
 many things rather than directly holding a reference to a DB-backed object.
 Should I start by going back and retrofitting many of those private
 references within components to use detachable models so that the objects
 are not held in memory?

 Any other suggestions?

 Thank you!
 Jeremy Thomerson
 texashuntfish.com



 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-03 Thread Eelco Hillenius
Stateless pages are available even in 1.2, but much more limited.
Basically, when you have no callbacks, you're page will be stateless
and not kept in memory. You'd have to do everything with bookmarkable
pages, links and page parameters then.

In 1.3, you can use some callbacks while still keeping pages
stateless, e.g. using StatelessLink and StatelessForm. There's a
simple example showing this in wicket-examples:
org.apache.wicket.examples.stateless

In your case, if really most of your app is read-only, it's probably
worth using that. And finally, a big improvement in 1.3 over 1.2 is
that as long as users don't have a HttpSession assigned by the server,
and they are only accessing stateless pages, no session will be
created by Wicket either, giving you more options in clustering and
further decreasing the memory footprint.

It is possible to even further optimize bits by digging deeper in
Wicket, but for now, this should help quite a lot.

Eelco


On 5/3/07, Matej Knopp [EMAIL PROTECTED] wrote:
 In 1.3 you can use stateless pages (with stateless links and stateless
 forms). However, you'll have to sacrifice the programming model in
 favor of statelessness a little. I'm not really sure it's worth it.

 -Matej

 On 5/3/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:
  I know that I read somewhere that there is, or is going to be, a way to run
  your wicket application without creating a session (until absolutely
  necessary).  We have a site that has mostly been converted to Wicket now,
  and almost all of it is state-less data  The URLs are all bookmarkable
  (98% of them are), so there is not much state to track.  We don't need a
  full object graph of all your pages and components, except for on very few
  pages once you have signed in.
 
  We're experiencing out of memory problems increasingly with an increase in
  traffic.  I'm not holding much in the session, but objects are held in pages
  and components I now believe we should have used detachable models for
  many things rather than directly holding a reference to a DB-backed object.
  Should I start by going back and retrofitting many of those private
  references within components to use detachable models so that the objects
  are not held in memory?
 
  Any other suggestions?
 
  Thank you!
  Jeremy Thomerson
  texashuntfish.com
 
 
 
  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-03 Thread Jeremy Thomerson

Thanks to everyone for their help - I'm starting right away to convert
everything to detachable models for all domain objects that are loaded into
components...

Eelco, I am curious about your statement when you have no callbacks, you're
page will be stateless and not kept in memory...  Most of my pages have no
callbacks (by callback, I'm assuming that you mean a link that would have
reference to wicket components in the URL, meaning that it is storing the
state of that component so that it can further interact with it).  I have
taken great care to control the URLs of the application, so almost every
page has only components that have standard URLs, with no references to any
components, etc.  The forms will obviously have a call back, and certain
links (particularly if you are signed in as an administrator - a lot of
links appear to edit and delete content that are all direct callbacks with
obviously no direct URL encoding / decoding so that you can not use them
outside of your session).

So, how do I know if it's storing the pages in memory?  Is there something I
can do to tell it not to?

Thanks!
Jeremy

On 5/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


Stateless pages are available even in 1.2, but much more limited.
Basically, when you have no callbacks, you're page will be stateless
and not kept in memory. You'd have to do everything with bookmarkable
pages, links and page parameters then.

In 1.3, you can use some callbacks while still keeping pages
stateless, e.g. using StatelessLink and StatelessForm. There's a
simple example showing this in wicket-examples:
org.apache.wicket.examples.stateless

In your case, if really most of your app is read-only, it's probably
worth using that. And finally, a big improvement in 1.3 over 1.2 is
that as long as users don't have a HttpSession assigned by the server,
and they are only accessing stateless pages, no session will be
created by Wicket either, giving you more options in clustering and
further decreasing the memory footprint.

It is possible to even further optimize bits by digging deeper in
Wicket, but for now, this should help quite a lot.

Eelco


On 5/3/07, Matej Knopp [EMAIL PROTECTED] wrote:
 In 1.3 you can use stateless pages (with stateless links and stateless
 forms). However, you'll have to sacrifice the programming model in
 favor of statelessness a little. I'm not really sure it's worth it.

 -Matej

 On 5/3/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:
  I know that I read somewhere that there is, or is going to be, a way
to run
  your wicket application without creating a session (until absolutely
  necessary).  We have a site that has mostly been converted to Wicket
now,
  and almost all of it is state-less data  The URLs are all
bookmarkable
  (98% of them are), so there is not much state to track.  We don't need
a
  full object graph of all your pages and components, except for on very
few
  pages once you have signed in.
 
  We're experiencing out of memory problems increasingly with an
increase in
  traffic.  I'm not holding much in the session, but objects are held in
pages
  and components I now believe we should have used detachable models
for
  many things rather than directly holding a reference to a DB-backed
object.
  Should I start by going back and retrofitting many of those private
  references within components to use detachable models so that the
objects
  are not held in memory?
 
  Any other suggestions?
 
  Thank you!
  Jeremy Thomerson
  texashuntfish.com
 
 
 
 
-
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 


-
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-03 Thread Ayodeji Aladejebi

please we need something in wicket-examples on this wicket stateless best
pratice cuz it still kind of not easy pulling the whole stuff together at
times. it would be nice to have some 4-page example that shows best
practices for stateless arch.

thanks


On 5/3/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:


Thanks to everyone for their help - I'm starting right away to convert
everything to detachable models for all domain objects that are loaded into
components...

Eelco, I am curious about your statement when you have no callbacks,
you're page will be stateless and not kept in memory...  Most of my pages
have no callbacks (by callback, I'm assuming that you mean a link that would
have reference to wicket components in the URL, meaning that it is storing
the state of that component so that it can further interact with it).  I
have taken great care to control the URLs of the application, so almost
every page has only components that have standard URLs, with no references
to any components, etc.  The forms will obviously have a call back, and
certain links (particularly if you are signed in as an administrator - a lot
of links appear to edit and delete content that are all direct callbacks
with obviously no direct URL encoding / decoding so that you can not use
them outside of your session).

So, how do I know if it's storing the pages in memory?  Is there something
I can do to tell it not to?

Thanks!
Jeremy

On 5/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:

 Stateless pages are available even in 1.2, but much more limited.
 Basically, when you have no callbacks, you're page will be stateless
 and not kept in memory. You'd have to do everything with bookmarkable
 pages, links and page parameters then.

 In 1.3, you can use some callbacks while still keeping pages
 stateless, e.g. using StatelessLink and StatelessForm. There's a
 simple example showing this in wicket-examples:
 org.apache.wicket.examples.stateless

 In your case, if really most of your app is read-only, it's probably
 worth using that. And finally, a big improvement in 1.3 over 1.2 is
 that as long as users don't have a HttpSession assigned by the server,
 and they are only accessing stateless pages, no session will be
 created by Wicket either, giving you more options in clustering and
 further decreasing the memory footprint.

 It is possible to even further optimize bits by digging deeper in
 Wicket, but for now, this should help quite a lot.

 Eelco


 On 5/3/07, Matej Knopp [EMAIL PROTECTED] wrote:
  In 1.3 you can use stateless pages (with stateless links and stateless

  forms). However, you'll have to sacrifice the programming model in
  favor of statelessness a little. I'm not really sure it's worth it.
 
  -Matej
 
  On 5/3/07, Jeremy Thomerson  [EMAIL PROTECTED] wrote:
   I know that I read somewhere that there is, or is going to be, a way
 to run
   your wicket application without creating a session (until absolutely

   necessary).  We have a site that has mostly been converted to Wicket
 now,
   and almost all of it is state-less data  The URLs are all
 bookmarkable
   (98% of them are), so there is not much state to track.  We don't
 need a
   full object graph of all your pages and components, except for on
 very few
   pages once you have signed in.
  
   We're experiencing out of memory problems increasingly with an
 increase in
   traffic.  I'm not holding much in the session, but objects are held
 in pages
   and components I now believe we should have used detachable
 models for
   many things rather than directly holding a reference to a DB-backed
 object.
   Should I start by going back and retrofitting many of those private
   references within components to use detachable models so that the
 objects
   are not held in memory?
  
   Any other suggestions?
  
   Thank you!
   Jeremy Thomerson
   texashuntfish.com
  
  
  
  
 -
   This SF.net email is sponsored by DB2 Express
   Download DB2 Express C - the FREE version of DB2 express and take
   control of your XML. No limits. Just data. Click to get it now.
   http://sourceforge.net/powerbar/db2/
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
 
 
 -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express 

Re: [Wicket-user] Sessionless Wicket?

2007-05-03 Thread Eelco Hillenius
 Thanks to everyone for their help - I'm starting right away to convert
 everything to detachable models for all domain objects that are loaded into
 components...

If you're only working with stateless pages, you don't detachable
models as those pages won't be stored to start with. But if you want
to reuse the models and components in stateful pages, it is better to
have that.

 Eelco, I am curious about your statement when you have no callbacks, you're
 page will be stateless and not kept in memory...  Most of my pages have no
 callbacks (by callback, I'm assuming that you mean a link that would have
 reference to wicket components in the URL, meaning that it is storing the
 state of that component so that it can further interact with it).

Yep. Normal Links, Forms, ajax requests etc.

 I have
 taken great care to control the URLs of the application, so almost every
 page has only components that have standard URLs, with no references to any
 components, etc.  The forms will obviously have a call back, and certain
 links (particularly if you are signed in as an administrator - a lot of
 links appear to edit and delete content that are all direct callbacks with
 obviously no direct URL encoding / decoding so that you can not use them
 outside of your session).

Not sure what you're getting at...

 So, how do I know if it's storing the pages in memory?  Is there something I
 can do to tell it not to?

Yeah, you can give provide a HINT that they shouldn't be stored (that
they are stateless) by overriding getStatelessHint on the components
you put on the page. Note that if there is just one stateful component
on the page, that'll trigger the page to be marked as stateful UNLESS
you explicitly mark the page itself stateless (which is a bit cheaper
by the way, as it won't iterate over it's children to find out whether
it is stateless).

The method where this all happens is Page#isPageStateless.

Also, if you want to keep track of when user sessions are created,
create a custom session store by overriding newSessionStore on
Application and let your custom store extend HttpSessionStore or
SecondLevelCacheSessionStore and then override onBind which will be
called when (new) sessions are bound to the HttpSession.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-03 Thread Eelco Hillenius
There already is an example though. Take a look at
org.apache.wicket.examples.stateless.

If you have suggestions (patches) to extend that example even more,
that'd be great, but there's really not that much to say about it I
think.

Eelco

On 5/3/07, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
 please we need something in wicket-examples on this wicket stateless best
 pratice cuz it still kind of not easy pulling the whole stuff together at
 times. it would be nice to have some 4-page example that shows best
 practices for stateless arch.

 thanks



 On 5/3/07, Jeremy Thomerson
 [EMAIL PROTECTED] wrote:
 
  Thanks to everyone for their help - I'm starting right away to convert
 everything to detachable models for all domain objects that are loaded into
 components...
 
  Eelco, I am curious about your statement when you have no callbacks,
 you're page will be stateless and not kept in memory...  Most of my pages
 have no callbacks (by callback, I'm assuming that you mean a link that would
 have reference to wicket components in the URL, meaning that it is storing
 the state of that component so that it can further interact with it).  I
 have taken great care to control the URLs of the application, so almost
 every page has only components that have standard URLs, with no references
 to any components, etc.  The forms will obviously have a call back, and
 certain links (particularly if you are signed in as an administrator - a lot
 of links appear to edit and delete content that are all direct callbacks
 with obviously no direct URL encoding / decoding so that you can not use
 them outside of your session).
 
  So, how do I know if it's storing the pages in memory?  Is there something
 I can do to tell it not to?
 
  Thanks!
  Jeremy
 
 
 
  On 5/3/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
   Stateless pages are available even in 1.2, but much more limited.
   Basically, when you have no callbacks, you're page will be stateless
   and not kept in memory. You'd have to do everything with bookmarkable
   pages, links and page parameters then.
  
   In 1.3, you can use some callbacks while still keeping pages
   stateless, e.g. using StatelessLink and StatelessForm. There's a
   simple example showing this in wicket-examples:
   org.apache.wicket.examples.stateless
  
   In your case, if really most of your app is read-only, it's probably
   worth using that. And finally, a big improvement in 1.3 over 1.2 is
   that as long as users don't have a HttpSession assigned by the server,
   and they are only accessing stateless pages, no session will be
   created by Wicket either, giving you more options in clustering and
   further decreasing the memory footprint.
  
   It is possible to even further optimize bits by digging deeper in
   Wicket, but for now, this should help quite a lot.
  
   Eelco
  
  
   On 5/3/07, Matej Knopp [EMAIL PROTECTED]  wrote:
In 1.3 you can use stateless pages (with stateless links and stateless
forms). However, you'll have to sacrifice the programming model in
favor of statelessness a little. I'm not really sure it's worth it.
   
-Matej
   
On 5/3/07, Jeremy Thomerson 
 [EMAIL PROTECTED] wrote:
 I know that I read somewhere that there is, or is going to be, a way
 to run
 your wicket application without creating a session (until absolutely
 necessary).  We have a site that has mostly been converted to Wicket
 now,
 and almost all of it is state-less data  The URLs are all
 bookmarkable
 (98% of them are), so there is not much state to track.  We don't
 need a
 full object graph of all your pages and components, except for on
 very few
 pages once you have signed in.

 We're experiencing out of memory problems increasingly with an
 increase in
 traffic.  I'm not holding much in the session, but objects are held
 in pages
 and components I now believe we should have used detachable
 models for
 many things rather than directly holding a reference to a DB-backed
 object.
 Should I start by going back and retrofitting many of those private
 references within components to use detachable models so that the
 objects
 are not held in memory?

 Any other suggestions?

 Thank you!
 Jeremy Thomerson
 texashuntfish.com




 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net

 https://lists.sourceforge.net/lists/listinfo/wicket-user


   
   
 -
This SF.net email is sponsored by DB2 Express
Download DB2 

[Wicket-user] Sessionless Wicket?

2007-05-02 Thread Jeremy Thomerson

I know that I read somewhere that there is, or is going to be, a way to run
your wicket application without creating a session (until absolutely
necessary).  We have a site that has mostly been converted to Wicket now,
and almost all of it is state-less data  The URLs are all bookmarkable
(98% of them are), so there is not much state to track.  We don't need a
full object graph of all your pages and components, except for on very few
pages once you have signed in.

We're experiencing out of memory problems increasingly with an increase in
traffic.  I'm not holding much in the session, but objects are held in pages
and components I now believe we should have used detachable models for
many things rather than directly holding a reference to a DB-backed object.
Should I start by going back and retrofitting many of those private
references within components to use detachable models so that the objects
are not held in memory?

Any other suggestions?

Thank you!
Jeremy Thomerson
texashuntfish.com
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-02 Thread Igor Vaynberg

detachable models are a must.

in my experience a wicket page is only about 50kb on average. that would
hardly cause an OOME on a server. 1.3 has second level session store that
pages to disk, so that is something else you might want to try.

once you convert to detachable models oomes should go away.

there is an example in wicket-examples on stateless stuff if you need to go
that far.

-igor



On 5/2/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:


I know that I read somewhere that there is, or is going to be, a way to
run your wicket application without creating a session (until absolutely
necessary).  We have a site that has mostly been converted to Wicket now,
and almost all of it is state-less data  The URLs are all bookmarkable
(98% of them are), so there is not much state to track.  We don't need a
full object graph of all your pages and components, except for on very few
pages once you have signed in.

We're experiencing out of memory problems increasingly with an increase in
traffic.  I'm not holding much in the session, but objects are held in pages
and components I now believe we should have used detachable models for
many things rather than directly holding a reference to a DB-backed object.
Should I start by going back and retrofitting many of those private
references within components to use detachable models so that the objects
are not held in memory?

Any other suggestions?

Thank you!
Jeremy Thomerson
texashuntfish.com



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Sessionless Wicket?

2007-05-02 Thread M.A.Bednarz
Hello Jeremy,

try also to disable any versioning and use read only models. I have tuned my 
private wicket project this way and it now supports more than 20.000 concurrent 
sessions on a single tomcat server. If everything in your model is serializable 
you can also use tomcats disk or jdbc persistence store for sessions. There is 
also a terracotta project, so you can cluster your wicket (1.3) application 
lineary. My average memory usage with 20.000 sessions in memory and very 
complex page structures (multiple including page object levels) is about 300MB. 
I think this could serve even a large community site :-)

Maciej
  - Original Message - 
  From: Igor Vaynberg 
  To: [EMAIL PROTECTED] ; wicket-user@lists.sourceforge.net 
  Sent: Thursday, May 03, 2007 7:27 AM
  Subject: Re: [Wicket-user] Sessionless Wicket?


  detachable models are a must.

  in my experience a wicket page is only about 50kb on average. that would 
hardly cause an OOME on a server. 1.3 has second level session store that pages 
to disk, so that is something else you might want to try. 

  once you convert to detachable models oomes should go away.

  there is an example in wicket-examples on stateless stuff if you need to go 
that far.

  -igor




  On 5/2/07, Jeremy Thomerson [EMAIL PROTECTED] wrote:
I know that I read somewhere that there is, or is going to be, a way to run 
your wicket application without creating a session (until absolutely 
necessary).  We have a site that has mostly been converted to Wicket now, and 
almost all of it is state-less data  The URLs are all bookmarkable (98% of 
them are), so there is not much state to track.  We don't need a full object 
graph of all your pages and components, except for on very few pages once you 
have signed in.  

We're experiencing out of memory problems increasingly with an increase in 
traffic.  I'm not holding much in the session, but objects are held in pages 
and components I now believe we should have used detachable models for many 
things rather than directly holding a reference to a DB-backed object.  Should 
I start by going back and retrofitting many of those private references within 
components to use detachable models so that the objects are not held in memory? 

Any other suggestions?

Thank you!
Jeremy Thomerson
texashuntfish.com



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now. 
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list 
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user






--


  -
  This SF.net email is sponsored by DB2 Express
  Download DB2 Express C - the FREE version of DB2 express and take
  control of your XML. No limits. Just data. Click to get it now.
  http://sourceforge.net/powerbar/db2/


--


  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user