checksum for distributed debugging?

Mon Dec 5 01:49:27 CET 2005

I'm working on a distributed system that will work like this:

A. The server maintains the total state in a tree structured form. Every
change will increase the state sequence number and that sequence number
will be associated with the node that changed and with all its
ancestors. In other words every node has a sequence number that is
greater than or equal to the sequence number of all its children.

B. Each client will know a subset of the state. Only the state actually
displayed will be kept up to date, but the client might happen to
remember old versions of the state for other nodes not currently

C. The client will keep a request open (xmlhttprequest style) that
requests information on changes to displayed state. Sometimes a request
will be sent for new information when the display changes to need a
different part of the state. 

D. In either case the request will indicate, with node sequence numbers,
what current information is held. The response will encode the change
(diff) in the state needed to bring the clients state up to date.

If there are bugs then the client state will get out of step, and then
things can go really bad. So I want to send a checksum for the clients
data. I could use a cryptographic checksum like SHA-1, but that is
probably overkill. Any suggestions for what I could use that would be
easy in Erlang and Javascript?


P.S. On a completely different matter, I'd be interested in comments on
the Scala language ( by Erlang experts. It can be
used in a fairly pure functional style using val declarations, and it
seems to support Erlang-style message exchange (see chapter 3 of "Scala
by Example" Far be
it from me to suggest that Erlang might not last forever, but if not
this seems a possible migration path. The current version is not
production quality (my rough impression), but the next version [already
late] is a rewrite in itself, and it could be starting to move in the
right direction. Scala claims to have solved the problems of building
software with scalable components
( If
anyone responds to the list on this PS, then they should probably change
the Subject.

More information about the erlang-questions mailing list