MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

RE: CRC



[...bleah, let's try this again, and see if our silly gateway
    can do it right this time...]

> I wasn't planning on using this to make sure the text got to the 
> other MOO correctly, I know it will since the network already uses
> some sort of CRC checking.  What I wanted was for BOTH MOOs to
> generate a CRC of the object's code.  If the CRCs match, the MOO
> will not update anything.  If it doesn't, then the host MOO will
> update the client MOO's code... That way, this group of objects will
> remain exactly the same on both MOOs, incase I decide to alter one,
> I only have to do it once.

Sounds like what you really want is a *timestamp*.  Your "CRC" doesn't
actually have to be generated from the code being sent; all you really need
is an explicit part of the code (though it could also be stored on a
separate property) that indicates when it was written (*).  The host sends
the timestamp first, and if the client already has that verb with that
timestamp it says, "No, thank you."  Moreover, you won't get the false
negatives that CRC could give you (at least, not until *after* Monday, Jan
18, 2038).  Granted, you'll need 1 or 2 extra words of storage for each
verb, but that's pretty small compared to the amount of space the verbs
themselves take up.

(* and possibly also which MOO the code was first written on, if you want to
be able to have alterations flow in both directions, but you have to be
careful about the situation where the clocks are not entirely in sync)



Follow-Ups:

Home | Subject Index | Thread Index