in reply to Re^2: [OT] Merging messages between users on different machines
in thread [OT] Merging messages between users on different machines
MD5(Timestamp+message)
I strongly suggest that you keep the timestamps outside of (separate from) whichever digest function you use. Digests are inherently unorderable with respect to time.
The open part of the question is: which shortcuts I can apply to avoid exchanging full lists of messages?
In the following assume: messageNo is a monotonically increase number from oldest to newest; messageId is timestamp+digest[+deviceId+deviceId].
Basically; do a binary search (oldest->newest) to locate the first difference; and then move forward from that point; exchanging first messageIds; then full messages if needed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: [OT] Merging messages between users on different machines
by bitingduck (Deacon) on Jul 01, 2015 at 04:47 UTC |