[Spread-users] Problem with Java client
jaroslaw.nozderko at polkomtel.com.pl
Mon Aug 22 10:16:30 EDT 2005
OK, done. So, basically, I have your patch with added
setSoLinger(true, 1) in connect() and
shutdownInput/shutdownOutput before socket.close() in
disconnect(). It works correctly, message is delivered
and LEAVE is reported by group members when process exits.
Perhaps linger value could be a configuration parameter ?
The only problem which remains unsolved is that
Java test client User does not react when Spread
> I would investigate using both TCP_NODELAY *and* SO_LINGER in connect.
> TCP_NODELAY is set in connect by the C API. Although there
> is a potential performance penalty if you're using small
> messages, the expected scenario is that network traffic
> between a client and its connected daemon is the cheapest
> communication in the entire system.
> Considering that a lot of Spread client applications depend
> on timely delivery of small messages, this setting is often
> very appropriate.
> Although this option won't have any affect on the correctness
> of the causal ordering provided by the daemons, leaving it
> off will potentially increase the likeliness that messages
> sent at observably different times are received out of order.
> My understanding of SO_LINGER is that it possibly prevents a
> bit of data loss at the end of your connection's life cycle.
> I don't think that it additionally flushes the outgoing
> buffer, however.
> For these reasons, I would encourage you to set TCP_NODELAY
> to true and SO_LINGER to some reasonable timeout in the
> connect method.
More information about the Spread-users