[Spread-users] C Interface question, can I "peek" the group of a message?

Andy Stone stone at camiant.com
Wed Feb 11 18:04:28 EST 2004

    I am using the Spread C interface in an application that subscribes 
to multiple groups.  I am using the groups to separate the messages by 
function; for example, one group might be for distributed logging, while 
the other is for remote procedure calls (rpcs).   Of course, I have a 
single receive function that grabs the message, checks what group it is 
for, and then calls the appropriate handler.  To ensure that these two 
functions operate independently (and because they pass messages of 
different size), I wanted to preallocate independent message memory 
buffers and use the appropriate buffer depending upon the group.  
Unfortunately, Spread does not seem to allow you to "peek" at the group 
before copying a message into a buffer.  Therefore my only recourse is 
to allocate 1 maximum size buffer, receive the message, figure out the 
group, and then copy the message into the appropriate group-specific 
buffer.  This seems inefficient.

    I was wondering if other people have had this problem and what 
solutions were employed.  Also I'd like to gain an understanding of how 
independent the groups are within Spread.  For example, will flooding on 
1 group cause a DOS on other groups?

Andy Stone
stone at camiant.com

More information about the Spread-users mailing list