[
https://jira.jboss.org/jira/browse/JGRP-822?page=com.atlassian.jira.plugi...
]
Bela Ban updated JGRP-822:
--------------------------
Summary: Scopes: concurrent delivery of messages from the same sender (was:
NAKACK: concurrent delivery of messages from the same sender (scopes))
Fix Version/s: 2.11
(was: 3.0)
Description:
JGroups delivers messages from different senders concurrently. However, it delivers
messages from the same sender sequentially. Sometimes, we can deliver messages from the
same sender concurrently too, if the app tells us it is okay. For example:
- Node N was 3 HTTP sessions: A, B and C
- Clients update those sessions concurrently
- As a result, N sends the following messages: A1, B1, A2, C1, C2, C3, B2, A3
- As NAKACK assigns sequence numbers (seqnos) based on JGroups instances, all messages
from N will have to be
delivered in the same order in which they were sent, e.g. (-> means followed by):
A1 -> B1 -> A2 -> C1 -> C2 -> C3 -> B2 -> A3
- This means that, for example, the first update to C (C1) has to wait until A1, B1 and A2
have been delivered
- This is not optimal, as updates for A, B and C are completely independent, and can be
delivered in parallel
- So a better delivery would be ('||' means concurrent delivery):
A1 -> A2 -> A3 || B1 -> B2 || C1 -> C2 -> C3
- A3 needs to be delivered after A2 which needs to be delivered after A1. However, all
updates for A can be delivered
concurrently with messages for B or C.
- OOB doesn't help: here all messages are delivered concurrently, but there is also no
ordering within A, B or C !
SOLUTION: the sender adds a 'scope' token to a Message, e.g. the jsessionid (A, B
or C). JGroups maintains NakReceiverWindows per *scope*, not per sender. The sender's
address is the default token, so in the absence of a scope token, JGroups of course
maintains NakReceiverWindows per sender. (NakReceiverWindows are used to keep track of
seqnos).
In the above example, if the scopes sent with *each message* are A, B and C, then we'd
have 3 NakReceiverWindows:
N::A, N::B, N::C.
Each window would start with seqno 1, so updates for A, B and C are delivered concurrently
with respect to each other, but sequentially within the scope.
Issues:
- This is an API change, and should probably be propagated up to the building blocks, such
as RpcDispatcher.
- A scope needs to be associated with an address A (of a JGroups instance): when A leaves
or crashes, all associated scopes and their NakReceiverWindows needs to be released, too
- Should this be done for UNICAST too ?
was:
JGroups delivers messages from different senders concurrently. However, it delivers
messages from the same sender sequentially. Sometimes, we can deliver messages from the
same sender concurrently too, if the app tells us it is okay. For example:
- Node N was 3 HTTP sessions: A, B and C
- Clients update those sessions concurrently
- As a result, N sends the following messages: A1, B1, A2, C1, C2, C3, B2, A3
- As NAKACK assigns sequence numbers (seqnos) based on JGroups instances, all messages
from N will have to be
delivered in the same order in which they were sent, e.g. (-> means followed by):
A1 -> B1 -> A2 -> C1 -> C2 -> C3 -> B2 -> A3
- This means that, for example, the first update to C (C1) has to wait until A1, B1 and A2
have been delivered
- This is not optimal, as updates for A, B and C are completely independent, and can be
delivered in parallel
- So a better delivery would be ('||' means concurrent delivery):
A1 -> A2 -> A3 || B1 -> B2 || C1 -> C2 -> C3
- A3 needs to be delivered after A2 which needs to be delivered after A1. However, all
updates for A can be delivered
concurrently with messages for B or C.
- OOB doesn't help: here all messages are delivered concurrently, but there is also no
ordering within A, B or C !
SOLUTION: the sender adds a 'scope' token to a Message, e.g. the jsessionid (A, B
or C). JGroups maintains NakReceiverWindows per *scope*, not per sender. The sender's
address is the default token, so in the absence of a scope token, JGroups of course
maintains NakReceiverWindows per sender. (NakReceiverWindows are used to keep track of
seqnos).
In the above example, if the scopes sent with *each message* are A, B and C, then we'd
have 3 NakReceiverWindows:
N::A, N::B, N::C.
Each window would start with seqno 1, so updates for A, B and C are delivered concurrently
with respect to each other, but sequentially within the scope.
Issues:
- This is an API change, and should probably be propagated up to the building blocks, such
as RpcDispatcher.
- A scope needs to be associated with an address A (of a JGroups instance): when A leaves
or crashes, all associated scopes and their NakReceiverWindows needs to be released, too
- Should this be done for UNICAST too ?
Scopes: concurrent delivery of messages from the same sender
------------------------------------------------------------
Key: JGRP-822
URL:
https://jira.jboss.org/jira/browse/JGRP-822
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 2.11
JGroups delivers messages from different senders concurrently. However, it delivers
messages from the same sender sequentially. Sometimes, we can deliver messages from the
same sender concurrently too, if the app tells us it is okay. For example:
- Node N was 3 HTTP sessions: A, B and C
- Clients update those sessions concurrently
- As a result, N sends the following messages: A1, B1, A2, C1, C2, C3, B2, A3
- As NAKACK assigns sequence numbers (seqnos) based on JGroups instances, all messages
from N will have to be
delivered in the same order in which they were sent, e.g. (-> means followed by):
A1 -> B1 -> A2 -> C1 -> C2 -> C3 -> B2 -> A3
- This means that, for example, the first update to C (C1) has to wait until A1, B1 and
A2 have been delivered
- This is not optimal, as updates for A, B and C are completely independent, and can be
delivered in parallel
- So a better delivery would be ('||' means concurrent delivery):
A1 -> A2 -> A3 || B1 -> B2 || C1 -> C2 -> C3
- A3 needs to be delivered after A2 which needs to be delivered after A1. However, all
updates for A can be delivered
concurrently with messages for B or C.
- OOB doesn't help: here all messages are delivered concurrently, but there is also
no ordering within A, B or C !
SOLUTION: the sender adds a 'scope' token to a Message, e.g. the jsessionid (A, B
or C). JGroups maintains NakReceiverWindows per *scope*, not per sender. The sender's
address is the default token, so in the absence of a scope token, JGroups of course
maintains NakReceiverWindows per sender. (NakReceiverWindows are used to keep track of
seqnos).
In the above example, if the scopes sent with *each message* are A, B and C, then
we'd have 3 NakReceiverWindows:
N::A, N::B, N::C.
Each window would start with seqno 1, so updates for A, B and C are delivered
concurrently with respect to each other, but sequentially within the scope.
Issues:
- This is an API change, and should probably be propagated up to the building blocks,
such as RpcDispatcher.
- A scope needs to be associated with an address A (of a JGroups instance): when A leaves
or crashes, all associated scopes and their NakReceiverWindows needs to be released, too
- Should this be done for UNICAST too ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira