[Spread-users] Daemon deleting client's un-forwarded messages on client disconnect?

Daniel Marques marques77 at gmail.com
Fri Jun 13 11:46:44 EDT 2008


John & Jeremy

Thanks for the responses.

To clarify, I have a client that sends some messages to the daemon,
and then disconnects from Spread and exits.  The disconnect is not due
to a failure but rather is the expected application behavior.

We observe that sometimes the final messages do not get forwarded off
the daemon by the time the disconnect is called (apparently the daemon
deletes the un-forwarded messages).

What I'm wondering if the client has any way to do a "disconnect
pending delivery" type operation, or if there is some way to implement
such a thing via the client API.

For my specific case, do you think the following could work: We could
send a "My Last Message" from the Client to it's Private Group (as we
are using Agreed messages everywhere) and wait for receipt of that
before the client does the actual disconnect.

Thanks.

Dan







On Fri, Jun 13, 2008 at 11:00 AM, John Lane Schultz
<jschultz at spreadconcepts.com> wrote:
> Out of ignorance, I'm not sure if your analysis is correct.
>
> If it is correct, then I would say it probably has to do with the
> timing of the detection of the client failure + announcing that to
> the other daemons and getting the messages built up in its buffers out.
>
> It is a bit strange to send messages from a dead client even after
> his death has been detected.  You could get into quite strange
> situations where the same client process reconnects even before its
> own previous messages have been sent, so it gets its own messages
> (from a different ID) and notice of its death.  Of course, this is
> also technically possible even if Spread kills the connection
> immediately upon detecting its death (no common knowledge).
>
> So, should you send out the detection of the disconnection before
> or after all of his messages are pushed out?  It seems like Spread
> currently decides to announce the disconnection immediately upon
> detection and to drop any messages in the connection buffers on the
> floor.  What you want is for Spread to push out any messages in the
> buffer and then announce the disconnection.
>
> You could probably implement that somehow, but I'm not really sure on
> the details.
>
> Cheers!
> John
>
> ---
> John Lane Schultz
> Spread Concepts LLC
> Phn: 443 838 2200
> Fax: 301 560 8875
>
> Thursday, June 12, 2008, 2:26:47 PM, you wrote:
>
>> Hello all,
>
>> Observing the behavior of my application, it appears that when a
>> client disconnects from the daemon, the messages it has sent but that
>> have not yet been forwarded off the daemon are deleted and then never
>> forwarded.  A quick (but by no means informed) study of the daemon's
>> source (specifically, daemon/session.c:1809) seem to confirm that this
>> is by design.
>
>> I'm asking if this is indeed the case, and if so, why (for
>> informational purposes) this is the desired behavior, and how one
>> could ensure that the messages are indeed forwarded (for practical
>> purposes)?
>
>> Thanks very much.
>
>> Dan
>
>> _______________________________________________
>> Spread-users mailing list
>> Spread-users at lists.spread.org
>> http://lists.spread.org/mailman/listinfo/spread-users
>
>
> _______________________________________________
> 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