0

ZK Clustering

asked 2010-01-05 20:55:40 +0800

Phileas gravatar image Phileas
171 3

There are great clustering stuff out there which could have great value for ZK but before making some propositions, we first have to look at the ZK capabilities in this area so i go to ZK cluster documentation http://docs.zkoss.org/wiki/Cluster and in fact there are only titles in there !!!

What did i miss ? :)
Is it in current redaction ? :)

At the end, we have two guides :
http://www.zkoss.org/smalltalks/clusteringI/clusteringI.dsp
http://www.zkoss.org/smalltalks/clusteringII/clusteringII.dsp

delete flag offensive retag edit

21 Replies

Sort by » oldest newest

answered 2010-07-28 06:38:15 +0800

Phileas gravatar image Phileas
171 3

updated 2010-07-28 06:42:57 +0800

Thanks for your opinion. So you would follow "Lift people" on this subject on a general use case except when you're more intererested into scaling.

Here would be an approcah of David Pollak (creator of Lift) : "Here is On pages where the data really matters, you have to do a little extra work to capture things as the user is typing, putting this state information in a
more reliable store and if you have a node crash, you can still recover the user activity. I've been noodling with some wrappers (kinda like callOnce) that would insert the correct JavaScript into all the form elements and
capture stuff on the back end. This would be a higher bandwidth kinda thing and shouldn't be done for all forms, but could deal with the important forms/user interactions for stuff that's in a regulated environment. "

Regarding scaling, session affinity in pair with the load balancer is their position, mentionning that nothing avoid to have whatever we want behind the web framework, including a compute grid for example. They also claim session affinity having tremendous advantage to be very fast and with extended sessions enabled, the user does not have to login again (in cas of crash of the node he first logged in)

link publish delete flag offensive edit

answered 2010-07-28 03:46:34 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-07-28 03:47:18 +0800

In my eyes i gave those peoples right. But it's use case dependent. For me the priority is more interesting that an application can high scaling and not the session failover. If the case occur that one server is failing than the user must do a new login. That's all. For uncomitted data the database must regulate this (Rollback).

best
Stephan

link publish delete flag offensive edit

answered 2010-07-27 17:23:19 +0800

Phileas gravatar image Phileas
171 3

Apparently, people from the Lift community, when they need high-availability capabilities, they don't care about clustering web sessions and so on, they prefer to rely on session affinity and forget all those products like Terracotta, Gigaspace and so on.
What do you think of ?

link publish delete flag offensive edit

answered 2010-07-23 16:32:20 +0800

Phileas gravatar image Phileas
171 3

updated 2010-07-23 17:52:40 +0800

Yes, i'm aware of the ZK guide which is an excellent point and by itself an invitation for us to go futher as it corresponds to a Terracotta express configuration and as a result, a Terracotta standard configuration is much more interesting but again the ZK article is an excellent starting point.
Regarding Gridgain, i've just discovered it this week, it competes with Terracotta, Oracle Coherence, JBoss Infinispan, Gigaspace and so on.

What i see from it is that it seems more complete than Terracota as it brings the full stack : computational grid, data grid and auto-sacling on managed infrastructure.
More important to me and perhaps for some others is that everyone seem to confirm Terracotta is an excellent product, better than some others in some areas, but also agree to say that it is far from easy to integrate or even does not shine at all in this area. On this side GiridGain seem to have a much more natural/easy integration approach, not impossible to be actually the most convenient in fact...

GridGain 3.0 will be released in the next few weeks and will bring clustering web sessions as Terracotta does but it will also bring a killing feature : Scala language support with Scalar DSL. Scala added values, on a developer point of view, are in full line with the added values and philisophy of product like Terracotta, Coherence and the others. In that spirit, GridGain also seems to bring capabilities we can see in the Akka project (http://akkasource.org/) built in Scala. At the end, GridGain is the only of its kind to bring Scala support which is a must.

On the disavantages side is the very high price level of the Enterprise edition coming soon, clearly oriented for big budgets/companies or "small projects".
This Gridgain disavantage is a Terracotta advantage as, if we except free products (like Hazelcast http://www.hazelcast.com/product.jsp or what is in the works for Glassfish 3.1 this year
which includes Shoal https://shoal.dev.java.net/ and both are definitely interesting), Terracotta is the "cheapiest" product in this area.
Voila, it were just to communicate you a resource if it can be useful, not even a suggestion because of the price i consider too high but maybe it's not a problem for some of you.

link publish delete flag offensive edit

answered 2010-07-23 07:13:30 +0800

tmillsclare gravatar image tmillsclare
799 2 5 30

These are interesting we do have http://docs.zkoss.org/wiki/How_To_Run_ZK_With_Terracotta available like Henri pointed out. This is a community project so everyone is welcome to contribute to it.

I will take a look at GridGain, have you used it? What do you think are it's advantages?

link publish delete flag offensive edit

answered 2010-07-21 15:14:35 +0800

Phileas gravatar image Phileas
171 3

The dual licenced LGPL / apache 2 GridGain cloud platform http://www.gridgain.com/index.html does not embrace all the added value of terracotta
but seems easier to integrate and support many things among Oracle Coherence (which is a Terracotta challenger).

I looked at it interesting enough to mention it and submit to your evaluation if it can be of any valuable use.
What do you think of ?

link publish delete flag offensive edit

answered 2010-07-18 21:54:42 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

http://docs.zkoss.org/wiki/How_To_Run_ZK_With_Terracotta

link publish delete flag offensive edit

answered 2010-07-05 06:25:54 +0800

leonart gravatar image leonart
12

updated 2010-07-05 06:45:58 +0800

tmillsclare said
"Hey everyone,

I have made contact with the Terracotta team and we are currently working on integration. We are also looking for use cases, would anyone be interested in participating?

Thanks,
Tim"

tmillsclare is a work on integration still continue?

I intrested in integrating my ZK application with Terracotta but without TIM I can't do that. Is any body deploy terracotta clustering with real ZK application?

I create an issue on Terracotta JIRA for creating TIM for ZK. Please vote for this issue by this link http://jira.terracotta.org/jira/browse/CDV-1492
It's nessesary to fill the register form on Terracotta site by this link http://terracotta.org/account/register for voting.

link publish delete flag offensive edit

answered 2010-03-14 19:48:05 +0800

PeterKuo gravatar image PeterKuo
481 2

@leonart
Have you ?
Add following section to zk.xml to enable session serialization.
<system-config>
<disable-event-thread/>
<ui-factory-class>org.zkoss.zk.ui.http.SerializableUiFactory</ui-factory-class>
</system-config>

ZK Demo runs with terracotta without TIM.

link publish delete flag offensive edit

answered 2010-03-13 04:35:41 +0800

leonart gravatar image leonart
12

Anybody can explaine is it possible to make terracotta server array for zk aplication without Terracotta Integration Module (TIM) for ZK?
Have a grate interest to deploy clustering for my ZK application.

According to http://docs.zkoss.org/wiki/How_To_Run_ZK_With_Terracotta set up two tomcats 5.5 on my Win XP. Install ZK 3.6.3 on each. Deploy zkdemo on each tomcat. All rigth. Set up Terracotta server on the same PC. Configure zk.xml in zkdemo/WEB-INF folder for supporting serialization. Tomcats starts whithout errors. But when I try access to zkdemo have this:

13 бер 2010 11:29:46 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet zkLoader threw exception
java.lang.RuntimeException: java.io.NotSerializableException: org.zkoss.zk.ui.http.SimpleSession
at com.terracotta.session.SerializedAttributeStore$SerializedAttribute.<init>(SerializedAttributeStore.java:71)
at com.terracotta.session.SerializedAttributeStore.put(SerializedAttributeStore.java:42)
at com.terracotta.session.SessionData.bindAttribute(SessionData.java:376)
at com.terracotta.session.SessionData.__tc_wrapped_setAttributeReturnOld(SessionData.java:273)
at com.terracotta.session.SessionData.setAttributeReturnOld(SessionData.java)
at com.terracotta.session.SessionData.setAttribute(SessionData.java:265)
at org.zkoss.zk.ui.http.SimpleSessionCache.put(SimpleSessionCache.java:45)
at org.zkoss.zk.ui.sys.SessionsCtrl.newSession(SessionsCtrl.java:111)
at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:343)
at org.zkoss.zk.ui.http.WebManager.getSession(WebManager.java:324)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:155)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.tcInvoke(SessionValve55.java:84)
at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.invoke(SessionValve55.java:71)
at org.terracotta.session.ModernTomcatSessionValve.invoke(ModernTomcatSessionValve.java:62)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.NotSerializableException: org.zkoss.zk.ui.http.SimpleSession
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at org.terracotta.cache.serialization.DsoSerializationStrategy.serialize(DsoSerializationStrategy.java:43)
at com.terracotta.session.SerializedAttributeStore$SerializedAttribute.<init>(SerializedAttributeStore.java:69)
... 29 more

Is anybody have worked cluster for ZK with Terracotta?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-01-05 20:55:40 +0800

Seen: 2,126 times

Last updated: Jul 28 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More