0

Event Queues in a Clustered Environment

asked 2012-01-13 22:35:43 +0800

mkamm gravatar image mkamm
21

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

delete flag offensive retag edit

18 Replies

Sort by ยป oldest newest

answered 2012-01-16 18:00:10 +0800

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

BIG PUSH

link publish delete flag offensive edit

answered 2012-01-16 19:22:58 +0800

mkamm gravatar image mkamm
21

updated 2012-01-16 19:29:39 +0800

Hi Terry,
Not sure what that response means. Can you clarify? By the way, I am using ZK CE.

Thanks

link publish delete flag offensive edit

answered 2012-01-17 09:31:08 +0800

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

updated 2012-01-17 09:36:01 +0800

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

link publish delete flag offensive edit

answered 2012-01-17 20:45:56 +0800

mkamm gravatar image mkamm
21

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.

link publish delete flag offensive edit

answered 2012-01-17 22:18:09 +0800

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

updated 2012-01-17 22:19:32 +0800

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

link publish delete flag offensive edit

answered 2012-01-20 16:03:14 +0800

mkamm gravatar image mkamm
21

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

link publish delete flag offensive edit

answered 2012-01-26 09:50:06 +0800

afxgroup gravatar image afxgroup
126 2

We have resolved this issue using a Server list anc cycling on it when we must send a global message tu a queue. It works nicely

link publish delete flag offensive edit

answered 2012-01-27 09:30:50 +0800

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

Hi afxgroup, can you explain your solution a little deeper? How does the servers synchronize this list ?

thanks
Stephan

link publish delete flag offensive edit

answered 2012-01-27 11:18:02 +0800

afxgroup gravatar image afxgroup
126 2

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

link publish delete flag offensive edit

answered 2012-02-13 12:18:42 +0800

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

Do you work with JGroups?

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: 2012-01-13 22:35:43 +0800

Seen: 551 times

Last updated: Apr 07 '12

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