ZK - Open Source Ajax Java FrameworkZK - Open Source Ajax Java Framework

ZK Clustering

Phileas
5 Jan 2010 20:55:40 GMT
5 Jan 2010 20:55:40 GMT

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

Phileas
6 Jan 2010 16:58:42 GMT
6 Jan 2010 16:58:42 GMT

By the way, we have in these pages ZK node clustering with only one apache, what is possible with multiple apache ?

jumperchen
7 Jan 2010 01:58:15 GMT
7 Jan 2010 01:58:15 GMT

Hi,

After read the two smalltalks, you should be able to establish a cluster environment with ZK,
But with multiple apache environment I think you should ask apache forum or google it instead.

Phileas
7 Jan 2010 10:41:30 GMT
7 Jan 2010 10:41:30 GMT

So it's really ZK clustering, not web application clustering as if apache goes down, all is down...
Except if my idea is wrong but if we have an integration between ZK and Terracotta middleware, that is a ZK TIM (Terracotta integration module), then that should gives us ZK web application clustering.

Terracotta people are open to collaboration with other project owners to work hand in hand so i'm pretty sure they would be glad of ZK responsible interest by proposing the ZK added value into their product.
On a position point of view, it would be a winner/winner relation in terms of added value for both community and each product popularity.

terrytornadoTop Contributor
7 Jan 2010 15:52:25 GMT
7 Jan 2010 15:52:25 GMT

Yes, i agree with Phileas. For a longer time i have read several texts about the terracota framework. It works completely others than the 'normal' way.
I'm sure the ZK team will have a look on it after the mainly work on ZK5 is finished. It's an interesting piece for the EE version of zk.

Stephan

There's a book of it: Apress 2008 - The Definitive Guide to Terracotta Cluster the JVM™ for Spring, Hibernate, and POJO Scalability
Ui, Is that the eBook there in my folder?

tmillsclare
8 Jan 2010 04:28:07 GMT
8 Jan 2010 04:28:07 GMT

Hey everyone,

We are open to collaboration with Terracotta and are currently trying to initiate dialogue with their team!

Phileas
8 Jan 2010 13:30:46 GMT
8 Jan 2010 13:30:46 GMT

Hello Terrytornado, tmillsclare,

@Terry : i've just been told that except for the very first chapters on general informations, the book is already outdated and the new updated one will be out in the very soon future.

@Tmill : Do you mean you work in the ZK Team ? or will you join it by your efforts ?

PeterKuo
12 Jan 2010 19:56:52 GMT
12 Jan 2010 19:56:52 GMT

@Phileas: tmillsclare works in the ZK Team :P

Phileas
28 Jan 2010 17:40:46 GMT
28 Jan 2010 17:40:46 GMT

Thanks PeterKuo,

As mentioned on the Tomcat forum thread : If for any reasons, that relationship or whatever does not work as desired, there are also complete free alternatives :

- Hazelcast http://www.hazelcast.com/product.jsp
- Shoal https://shoal.dev.java.net/

terrytornadoTop Contributor
29 Jan 2010 09:18:24 GMT
29 Jan 2010 09:18:24 GMT

@Phileas

Many many thanks for these addresses. Interessting stuff.

Phileas
29 Jan 2010 16:14:37 GMT
29 Jan 2010 16:14:37 GMT

Thanks for the kind words terrytornado,

Now, if ZK team continues its interest into Terracotta (or by side effect some alternatives), here are some potential others resources bringing their added value :
Jonas Bonér worked at Terracotta and is the founder of Akka (http://akkasource.org/) for which Scala language is used (the well known concise and elegant language over the JVM which smoothly integrates features of object-oriented and functional languages). Akka, on its side relates to writing correct concurrent, fault-tolerant and scalable applications essentially by using the Actor Model together with Software Transactional Memory .

Enough marketing :) , what is interesting is the work of Jonas about "Clustering Scala Actors with Terracotta" (presentation here http://jonasboner.com/2008/01/25/clustering-scala-actors-with-terracotta/).
My second level of my interest into Akka (http://akkasource.org/) is the "simplicity" approach of the whole subject Akka is made for, along with excellent modules we can plug like Shoal i've just listed above and NOSQL approach when the subject comes to scalable performance and flexible data model (Cassandra key-value db, MongoDB document based or soon Neo4j graph db ... or even the Terracotta Store which is also document based).

Great goals, simplicity and performance are things i like to think about when the question comes to mix ZK with "companion products" :), that's why i would suggest to consider it as an alternative way to answer objectives Terracotta and these others products (which are in the Akka "culture") address. It seems Akka team worked "less" on the web presentation integration by supporting "only" the Lift framework, thinking here ZK would perfectly suit the place it could have with Akka, something like one turbo bullet, several prizes :)

tmillsclare
5 Feb 2010 04:30:09 GMT
5 Feb 2010 04:30:09 GMT

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

leonart
13 Mar 2010 04:35:41 GMT
13 Mar 2010 04:35:41 GMT

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?

PeterKuo
14 Mar 2010 19:48:05 GMT
14 Mar 2010 19:48:05 GMT

@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.

leonart
5 Jul 2010 06:25:54 GMT
5 Jul 2010 06:25:54 GMT

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.

henrichen
18 Jul 2010 21:54:42 GMT
18 Jul 2010 21:54:42 GMT

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

Phileas
21 Jul 2010 15:14:35 GMT
21 Jul 2010 15:14:35 GMT

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 ?

tmillsclare
23 Jul 2010 07:13:30 GMT
23 Jul 2010 07:13:30 GMT

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?

Phileas
23 Jul 2010 16:32:20 GMT
23 Jul 2010 16:32:20 GMT

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.

Phileas
27 Jul 2010 17:23:19 GMT
27 Jul 2010 17:23:19 GMT

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 ?

1 2