ws-eventing clustering problem

November 29, 2006 – 10:17 am by Stefano MAESTRI
Share

We got some troubles using ws-eventing jbossws implementation in our clustered/load balanced environment (for a deeper description read here). I’ll try to describe them in this post, with some proposed solutions:


Click here for a larger image.

The previous diagram describes the two main common problems we had with ws-eventing deployed in a clustered environment:

  • Subscription on one of the clustered environment’s machine

    DESCRIPTION: when a client subscribes to our ws-eventing service the load balancer sends his requests to a real server that receives the subscription and store it locally (in current jbossws eventing implementation this is achieved using a Map owned by SubscriptionManagerMbean). An event source generates a notification and delegates its notification to jbossws; but in a cluster environment this event source could use a different real server knowing nothing about the subscriber. The notification would be lost. See messages from 1 to 5 in the above diagram. Of course a very similar situation may happen when renewing a subscription: a renew message cold be send to a server different from the one that received the first subscription, resulting in subscription renew failure. The client will receive an “Unable to renew” exception, and on the server side the subscription will expire for timeout! All notifications are lost until client re-subscribe to the right real server. See messages from 6 to 13 in the above diagram.

    PROPOSED SOLUTION: These two problems could be solved clustering the SubscriptionMap. The easiest solution would probably be arranged using HAJNDI to store subscriptions. Of course the use of a local Map instead of HAJNDI have to be configured at deploy time.

  • Shutdown of one of the cluster’s machine

    DESCRIPTION: SubscriptionManagerMbean sends notifications to remove every subscriptions when it is stopped or the real server it runs on shutdowns. But in a cluster environment other servers continue to work and potentially to send notifications. Those notifications will be lost. See messages from 14 to 26 in the above diagram.

    PROPOSED SOLUTION: SubscriptionManagerMbeans have to be clustered and have to exchange their status before they can decide to send this kind of notifications. The solution could be implemented using jGroups (of course), but it needs further investigations and discussions, mainly to understand if SubscriptionManager is the only part of jbossws needing clustered solutions

I started a thread in JbossWS Design forum aboute this issue.

 
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Slashdot
  • Technorati
  • YahooMyWeb
  • LinkedIn
  • StumbleUpon
  • TwitThis
  • Wikio
  1. 2 Responses to “ws-eventing clustering problem”

  2. Hi Stefano i am a java ee developer from Bolivia. I must say that i am impressed about
    your work in the lego project, which is mentioned in seamframework. If it is not too much to ask i would like to ask you about JBoss clustering with database.

    In a project i am involved i have an application that only recieves request from clients and validates the params to grant access (mostly one flow, no business rules decisions, pretty straightforward), this application in each request updates data in database. The most important is that data is always synchronized (not async way), high availability, but not so much about state of the application.

    Right now i have on each node JBoss + App + DB, my question is (with little information i
    give you about this app) is it better to have:

    - Every node with JBoss + App + DB?
    - Every node with JBoss + App and all nodes using a shared database?
    - If i setup HTTP load balancing (without SFSB @Clustered, without Entity @Cache), and DB replication (or DB cluster) is enough?
    - Or HTTP load balancing, SFSB @Clustered, Entity @Cache and one shared DB; and i find the way to deal with shared DB point of failure?

    I have been reading for two days about this (i was able to setup a JBoss cluster) and i just need one expert point of view on JBoss clustering + DB,
    because i cannot find much about it.

    Thank you very much for any advise
    Vladimir Albis

    “And that by chance if an honest man such as yourself should make enemies, then they would become my enemies. And then they would fear you”

    By Vladimir on Sep 30, 2009

  3. Sorry for late response.
    My choice (with this information) is Every node with JBoss + App and all nodes using a shared database and setup HTTP load balancing (without SFSB @Clustered, without Entity @Cache), and DB replication (or DB cluster)

    best regards
    S.

    By Stefano MAESTRI on Oct 15, 2009

Post a Comment