[jboss-jira] [JBoss JIRA] Commented: (JGRP-822) Scopes: concurrent delivery of messages from the same sender
Bela Ban (JIRA)
jira-events at lists.jboss.org
Mon Mar 22 05:03:38 EDT 2010
[ https://jira.jboss.org/jira/browse/JGRP-822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12521083#action_12521083 ]
Bela Ban commented on JGRP-822:
-------------------------------
Generally speaking, OOB would help, except that the ordering is not guaranteed. So intuitively, the solution is to turn messages with scopes into OOB messages and add ordering *per scope* at the receivers.
This could be done through a new protocol, SCOPE:
- SCOPE has to be somewhere on top of UNICAST or NAKACK
- When sending a message, and the message has a scope (wheter this is a part of the message, or a header is TBD), SCOPE.down() tags the message as OOB and adds a (monotonically increasing) *scope-seqno*. For a previously unknown scope, we always start at 1.
- When receiving the message, UNICAST or NAKACK pass it up immediately, as it is OOB
- SCOPE.up() then checks if the message has a scope. If no, it passes the message up.
- Else the AckReceiverWindow associated with a given scope is looked up and the message is added, key is the scope-seqno. Then the thread tries to remove as many messages as possible and sends them up.
- The ARW provides ordering, but we need to turn acking off, as messages are retransmitted by the protocols below
> 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
More information about the jboss-jira
mailing list