Note that there are some explanatory texts on larger screens.

plurals
  1. POA distributed algorithm to assign a shared resource to one node out of many
    primarykey
    data
    text
    <p>I try to implement a multicast communication to distribute some resources. I’m using <a href="http://www.jgroups.org/" rel="nofollow">jGroups</a> for that, so I have reliable multicast and FIFO-Ordering. By doing that I wanna realise that with a distributed solution, that means without an master node that acts as a coordinator. </p> <p>Every node is able to start a distribution, so it is possible that two or more nodes are starting the distribution at the same time. When a node receives a distribution-message it will answer this. There are no differences between an answer-message and a message from a starter. It only contains information about the resource-name (e.g. resourceA) and if that node is able to handle it. When Member1 starting the distribution it will send a message like: </p> <pre><code>Member1, resourceA, OK </code></pre> <p>Member2 has no space for that resource and send a answer-message like:</p> <pre><code>Member2, resourceA, NOT_OK </code></pre> <p>In this case it is easy, because now Member1 knows that he can takes resourceA. When more than one node are able to handle the resource other properties will decide who takes the resource (e.g. the member with the highest ID). </p> <p>My problem is: How ta handle it when two or more nodes are starting the distribution about the same topic (resourceA) at the same time?</p> <p>Does anybody see some problems doing it this way: Member1 and Member2 are starting the distribution at the same time. At this point both are expecting a response from each other. Because of the fact that there are no differences in a response-message or in a starter-message both are thinking the message they just received is an answerer. So Member1 sends a starter-message into the multicast-group and Member2 sends a starter-message into the mutlicast-group (before receiving the message from Member1). Now Member1 is receiving the starter-message from Member2 and thinks that this is the response.</p> <p>By guarantee that every node sends only one message per topic (as a starter or with a response) I would say that there are no problems doing it this way even when there are more than two nodes.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload