[jboss-jira] [JBoss JIRA] (JGRP-1405) TP: pool of hashmaps for message bundling

Bela Ban (JIRA) jira-events at lists.jboss.org
Tue Sep 4 10:58:32 EDT 2012


    [ https://issues.jboss.org/browse/JGRP-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715790#comment-12715790 ] 

Bela Ban commented on JGRP-1405:
--------------------------------

Misc comments:

- Should we serialize individual messages as they're being added to the bundler ? So serialization would be done on the sending thread, not by the message bundler

- Should the message bundler bundle only *multicast* (and not unicast) messages ? This way, we could use a queue instead of a hashmap, as there is only 1 destination (null = send to all). We could then also optimize various headers away, e.g. TpHeader needs to be present only once !
                
> TP: pool of hashmaps for message bundling
> -----------------------------------------
>
>                 Key: JGRP-1405
>                 URL: https://issues.jboss.org/browse/JGRP-1405
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 3.3
>
>         Attachments: BundlerStressTest.java
>
>
> We currently have 2 message bundlers i TP: the default bundler which adds messages to a hashmap and, when full, has the sending thread serialize all queued messages into one and send it, and the transfer queue bundler, which has the sending thread place a message into a blocking queue and the dequeuer thread collect and send the bundled messages.
> The disadvantage of the default bundler is that everyone has to wait adding messages to the hashmap, until message bundling has completed. OTOH, the transfer queue bundler blocks all sending threads when the blocking queue is full.
> Let's create a third bundler, which behaves like the default bundler, but uses a *pool of hashmaps* rather than one. This way, when one hashmap is full, the other sending threads don't have to wait until bundling is complete, but can continue adding their messages to a different hashmap.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list