ursus
03/12/2019, 9:17 PMghedeon
03/12/2019, 9:19 PMursus
03/12/2019, 9:22 PMghedeon
03/12/2019, 9:31 PMursus
03/12/2019, 9:44 PMghedeon
03/12/2019, 10:21 PMedited
and latest
. So you can patch your history.ursus
03/12/2019, 10:29 PMgildor
03/12/2019, 11:08 PMursus
03/13/2019, 4:59 AMgildor
03/13/2019, 5:12 AMursus
03/13/2019, 5:32 AMgildor
03/13/2019, 5:36 AMursus
03/13/2019, 5:39 AMgildor
03/13/2019, 5:40 AMursus
03/13/2019, 5:40 AMgildor
03/13/2019, 5:41 AMursus
03/13/2019, 5:41 AMgildor
03/13/2019, 5:44 AMI come back from offline, and I need to know what changed -- somehow -- other than fetching all of convo history to figure it outGlobally you have only 2 choices, download everything (or just first page) or use some diff/sync API, but how those diffs will be implemented highly depends on your use case, complexity of your server etc
basically the trouble is that message can be edited and deleted, so I need to look backwards also on all messagesNo, if you have diffs
ursus
03/13/2019, 5:45 AMgildor
03/13/2019, 5:45 AMursus
03/13/2019, 5:46 AMgildor
03/13/2019, 5:46 AMursus
03/13/2019, 5:47 AMgildor
03/13/2019, 5:47 AMursus
03/13/2019, 5:48 AMgildor
03/13/2019, 5:49 AMursus
03/13/2019, 5:50 AMgildor
03/13/2019, 5:53 AMsnapshot = what server thinks my local data isyes
ursus
03/13/2019, 5:54 AMgildor
03/13/2019, 5:55 AMcalculate the diffs on clientYes, request the data from server about all changes 😄
ursus
03/13/2019, 5:56 AMgildor
03/13/2019, 5:57 AMursus
03/13/2019, 5:58 AMgildor
03/13/2019, 5:59 AMursus
03/13/2019, 6:00 AMgildor
03/13/2019, 6:02 AMursus
03/13/2019, 6:03 AMgildor
03/13/2019, 6:04 AMim still wondering how would the server keep track of my datadepens on strategy, but for conversation it may have some database of operations on particular conversation and then when you request it again just return all new operations add/delete/update
ursus
03/13/2019, 6:04 AMgildor
03/13/2019, 6:05 AMursus
03/13/2019, 6:06 AMgildor
03/13/2019, 6:06 AMursus
03/13/2019, 6:07 AMgildor
03/13/2019, 6:07 AMwhen he doesnt know it should be therei don’t think this is somehow related to you problem, how to write program without bugs, how to write system that detects bugs, I don’t know, it’s even more broad question than “how to write real time chat messenger”
ursus
03/13/2019, 6:08 AMgildor
03/13/2019, 6:08 AMursus
03/13/2019, 6:09 AMgildor
03/13/2019, 6:09 AMursus
03/13/2019, 6:09 AMgildor
03/13/2019, 6:09 AMI think so, because if you diff against a page, you dont know about the rest of the data in next pagesI never suggest to use this approach, you right, it’s imo bad solution
ursus
03/13/2019, 6:10 AMgildor
03/13/2019, 6:10 AMursus
03/13/2019, 6:11 AMgildor
03/13/2019, 6:11 AMursus
03/13/2019, 6:11 AMgildor
03/13/2019, 6:12 AMursus
03/13/2019, 6:12 AMgildor
03/13/2019, 6:13 AMhm but then you can delete messages, and you can do that while the other is offline so they still have this problemthere are different strategies about message deleting, sometimes you can delete only local message, sometimes you delete message also on devices of all your receipients, later require deliver delete intent same way as you deliver information about new message or message status
ursus
03/13/2019, 6:14 AMgildor
03/13/2019, 6:15 AMreally? I feel whatsapp is the most solid of messengers, all other crap out on me from time to timeThey support only 1 client at the same time, super bad solution, because of their limitation of this architecture even cannot have proper standalone web client You don’t have real history of messages, no proper syncronization There is no way to use it without phone
ursus
03/13/2019, 6:15 AMgildor
03/13/2019, 6:16 AMursus
03/13/2019, 6:16 AMgildor
03/13/2019, 6:17 AMursus
03/13/2019, 6:17 AMgildor
03/13/2019, 6:18 AMursus
03/13/2019, 6:21 AMgildor
03/13/2019, 6:24 AMghedeon
03/13/2019, 6:56 AMlastUpdate
timestamp, the now - lastUpdate
diff is calculated for you. In a way it's similar to DB migrations or git.BMG
03/14/2019, 10:35 AMrevision
documents. For ex, say you have documents 1 to 10 in remote and in local device. And some change
happened in document #1 while local device was offline. Now, remote has to
create a new revision document #11. (Here it need not be a new document itself, it can just be a revision
attached to it). When local comes online, it will ask changes since #10. Remote can send Revision #11 which is actually a modified document #1.revision
, there is no way (other than full sync) for remote server to know that the local device documents are in sync with remote.track
anything explicitly per device. They are all document revisions and each one is created for any change (modification, deletion, creation)