[Spread-users] sendning large messages over spread

John Schultz jschultz at d-fusion.net
Wed Jun 19 12:51:58 EDT 2002


Spread does not allow for arbitrarily sized messages. It defines a
maximum msg size, where the default is something like 100KB. I don't
know whether or not this limit is publicly exported by Spread currently.
I believe there are checks in the client lib and the daemon on clients'
msg sizes. If a message is too large, then the send should be denied by
Spread.

The DROP_RECV semantics were added to help receivers be able to handle
msgs larger than they expected. Previously in Spread, if you called recv
with too small buffers your buffers would be filled and the excess would
be discarded. This isn't the best semantics for reliable communication
:). So the default was changed such that if the receiver's buffers were
too small, then the recv would fail while returning information about
how big the receiver's buffers needed to be. If the caller doesn't
resize their buffers or use DROP_RECV then the recv will continue to fail.

If you call recv with DROP_RECV, you are electing to have the old
semantics where the recv will succeed but some of the information in
that message may be dropped if the msg is larger than your buffers. This
was added so that program logic could be simpler if the application
author so chose.

A while back I posted an extension to the Java SpreadConnection that
allowed for arbitrarily sized messages, while degrading some of the
safety semantics of Spread. You can look at the archives or the website
to find it, or if you want I'll send it to you. This would give you a
good place to start to implement your own, or you could just use it if
you are using Java.

-- 
John Schultz
Co-Founder, Lead Engineer
D-Fusion, Inc. (http://www.d-fusion.net)
Phn: 443-838-2200 Fax: 707-885-1055

koorosh.alahiari at ids.allianz.com wrote:

 > Hi All,
 >
 > As I understand it you can send arbitrarily large(within reason) 
messages
 > to
 > spread and spread divides them into its max 80K limit chunks and delivers
 > them all. Receiving a service type of DROP_RECV will indicate that 
there is
 > more chunks left for this message. So calling SP_receive repeatedly
 > until the the service type is no longer DROP_RECV  gurantees that I can
 > assemble the original large message without having to resort to a higher
 > level
 > protocol. Is this correct. Is it guranteed that I will not get any other
 > messages
 > (in between) until I have read the entire large message?
 >
 > Hope it makes sense!
 >
 > Regards, Koorosh
 >
 >
 >
 > _______________________________________________
 > Spread-users mailing list
 > Spread-users at lists.spread.org
 > http://lists.spread.org/mailman/listinfo/spread-users
 >
 >
 >






More information about the Spread-users mailing list