| Subcribe via RSS or via Email

Terracotta and Wicket (the next generation)

November 5th, 2008 | 8 Comments | Posted in Java, Wicket

Edit: with the 1.1.3 release you should follow the instructions on this post.  It is no longer required for you to set up the page store yourself.

The new terracotta wicket-tim is out!

Any wicket and terracotta users will know that the previous wicket-tim had issues under heavy load, which is why some months ago I set about creating something better, with lots of help from the wicket community, especially Stefan Fussenegger, we created a new in-memory page map which can cope with high load.

To use this you will need to add the wicket-tim to your classpath, if you are using maven then add this to your pom.xml file:

	org.terracotta.modules
	tim-wicket
	1.1.1

And follow the installation instructions.

In your tc-config.xml you will need to include the wicket-tim module, you can find instructions on how to do this here and here.

Then in your wicket application class you need to use the new page map:

public ISessionStore newSessionStore() {
     return new SecondLevelCacheSessionStore(this,
       new TerracottaPageStore(100));
}

The 100 in the page store parameter is the number of pages (or versions of pages) of history to keep inthe page map, and can be set to anything you feel is appropriate.

The page map is stored in the httpsession so you will need to make sure that httpsession clustering is working correctly.  If you are using tomcat then terracotta should do this automatically.

Feedback and bug reports are welcome, particularity about the user configurable number of pages history.  If we remove this then it will be possible to use byte-code instrumentation to automatically add in the TerracottaPageStore, meaning that the wicket-tim wont need adding onto your application build path.

Richard

Tags: , ,

Thoughts on Terracotta

June 10th, 2008 | 2 Comments | Posted in Java, Wicket

Recently I’ve been working on session clustering with terracotta, jetty and wicket, so I thought I’d write about my experience.

Good points:

  • It works!  This may seem a bit silly to state, but other session clustering methods I tried didn’t work and cost me time trying to get them to work.  The time I put into terracotta actually paid off.
  • Good support.  Even though the guys that develop terracotta sell consultation services for it they will still help people in the forums.  From finding and reporting a bug in terracotta it was about a week before it was fixed and integrated into the nightly builds.
  • Its open source.
  • Its versatile, you don’t just have to use it for http sessions.
  • A useful admin console for connecting to your terracotta instances (you can even do cluster wide thread dumps in the 2.6 versions).
  • It just worked with wicket due to a special wicket integration module (which was included)

Bad Points:

  • Lots of config.  Even after you get your system working there is still lots of performance tuning to be done to get the best out of everything (although the admin console in the 2.6 release helps with this).
  • Large download (ok this isnt really a bad point in todays world of broadband and terrabyte hard discs).  Does it really need to bundle tomcat?
  • Eclipse plugin kept complaining that the config xml file was not valid - it created it for petes sake (ok this is another small point, running through eclipse was very easy with the plugin)
Tags: , , ,