-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All,
I have read a bunch of the documentation, specifically the ZK 5.0.9 Developers Reference. The Event Queue is a really nice feature. One thing I am not really clear on and I would like to know before I go down this path...
Can we use Event Queue at an application level in a Clustered Environment?
Thanks
Mark K
BIG PUSH
Hi Terry,
Not sure what that response means. Can you clarify? By the way, I am using ZK CE.
Thanks
Hi Mark,
Push means only that this thread is not answered and should not go forgotten.
So we store the word push that this thread comes on top of the thread list again.
Can be that i'm false but i do not believe that at time this can run out of the box in zk.
For a while i search informations about the working of publish/subscribe in big clusters like
facebook or linkedin. So the result of this is that they all uses so called 'distributed messaging' systems.
Where all apps publish/subscribe against a messaging server (where the messaging server can be clustered too).
Here is a short overview of such an open source system called 'Kafka' .
I'm very interested to hear about a zk way/solution for 'EventQueues.CLUSTER'
best
Stephan
Hi Stephan,
Ah, ok understood. Yes, we run in a clustered environment using Weblogic 10.3.x. That's too bad because I am working on a prototype application right now where this would be a really nice feature. This would have fit perfect into the workflow notifications piece.
So do know if Comet Server Push works in a clustered environment or would it be the same type of issue?
Thanks
Mark K.
Hope i'm right and anybody can correct me.
In easy words is a comet (it's only the name for it) server push a mechansim to asynchron DELAY a http answer.
Means that it looks like the server is calling the client. But in fact the client initiate the process and the server gives at first answer if some defined action is gone (i,e, changes in share prices at Wall Street.)
Suppose we have a clustered application runs in an environment with 5 Tomcat workers and 1 Apache load balancer in front. I don't know what happened with the performance if the zk session object is shared over all tomcats (zk is AJAX, so it makes heavy requests). So i would prefer an extra server for cluster wide eventQueues. But such a question is better answered by the zk core developers. I'm interested in this too.
best
Stephan
Hi Stephan,
After some digging around on this site, I ran across this:
http://books.zkoss.org/wiki/ZK_Developer%27s_Reference/Event_Handling/Event_Queues
If you look down at the bottom in the Version History you will see this statement:
"The event queue won't start any working threads and they are serializable, so it is safe to use them in a clustering environment. "
I will dig around some more, but I know I also read (sorry, can't seem to find the article again) that the application scope is also supported within a clustered environment. When I run across that article, I will post it here.
Thanks
Mark K
Hi afxgroup, can you explain your solution a little deeper? How does the servers synchronize this list ?
thanks
Stephan
I have a server table (f.e)
Server1: 192.168.3.18
Server2: 192.168.3.19
Server3: 192.168.3.20
when i must send a message to all server i cycle that list and i put a message to a servlet that pust the message for me.
I use this mechanism when i want to avoid double login. It is possible that some one is logged with same username on another server than mine (i write the internal ip on a db field).
So when i reach the login function and my field on db is not empty i send a message to that server (a servlet or a jsp page get the call).
The jsp page (or the servlet) send a message to the server queue and the user is kicked out
Another usage could be to send a message to all servers. In that way you can cycle to all server, send a message to every jsp page and that's all
Yes, it is more complicated to explain than the real usage..
Do you work with JGroups?
Asked: 2012-01-13 22:35:43 +0800
Seen: 551 times
Last updated: Apr 07 '12