How to sequence messages we sent to client and find bugs

155 views
Skip to first unread message

Vero K.

unread,
Aug 21, 2016, 5:15:29 AM8/21/16
to mechanical-sympathy
Our application has many clients and we continuously send them messages. Sometimes our clients lose some messages and it is probably a bug on our side, though it is very hard to debug. It is also takes a lot of time to understand exact message which a client lost. We want to add sequences to our messages we send and store them in our storage. Can someone explain how exchanges usually sequence messages: keeping counter for every client in memory? how do they store them and investigate as it will take a lot of disk space? do they store them in a file or some specific database? thanks.

Greg Young

unread,
Aug 21, 2016, 5:49:14 AM8/21/16
to mechanica...@googlegroups.com
With exchanges often traffic is sent to everyone when using
non-reliable transports such as UDP. As example see the STAMP protocol
(over UDP multicast). In this protocol every message is given a
sequence number (perfectly ordered). Clients then can find any missing
messages by looking for gaps in the sequence (there is also an out of
band retry mechanism in many implementations).

*note that in canada there is/was (have not looked in a while) also a
STAMP implementation over TCP instead of UDP which is the CNQ
exchange.

If you are doing separate messages per client this becomes a bit more
tricky as you end up having to track the varying sequences. Likely you
end up needed a <long,long> map to map the clients sequence number to
the messages overall sequence number.
> --
> You received this message because you are subscribed to the Google Groups
> "mechanical-sympathy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mechanical-symp...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Studying for the Turing test
Reply all
Reply to author
Forward
0 new messages