Cluster Wide Atomic Counters

sahin
2012-09-14
2012-09-14
  • sahin

    sahin - 2012-09-14

    Hi friends,I am new to Jgroups. Think a scenario such that I have two members of a cluster. My aim is to use cluster wide atomic counter. When i run first member, i create a counter and every two seconds i increase this counter by 1. 10 seconds later when i run the second member of the same cluster and using same counter i dont see the counter result of first member, it starts with second one initial value. What i am missing ? I use the same counter name while creating/getting counter ?

     
  • Bela Ban

    Bela Ban - 2012-09-14

    You're probably not forming a cluster, if you register for view changes and implement viewAccepted(View view) and print the view, you'll probably seeing only 1 member...

     
  • sahin

    sahin - 2012-09-14

    Thanks Bela for quick response, checked my source code, yes you are right, second member cannot connect to cluster because of my protocol stack. Protocol stack as properties in source code is like this:

    "SHARED_LOOPBACK:PING(timeout=1000):" +
    "pbcast.NAKACK(use_mcast_xmit=false;log_discard_msgs=false;log_not_found_msgs=false)" +
    ":UNICAST:pbcast.STABLE(stability_delay=200):pbcast.GMS:FC:FRAG2:COUNTER()";

     
  • sahin

    sahin - 2012-09-14

    I solved problem using correct udp.xml or protocol stack.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks