Okay, so seems like the answer is - watch the changes in atom, send these changes to the server, on the server store them unmerged, as a set of separate patches, and when opening a document on the client, just send all that history of patches, and the client will replay them on its side.
That makes sense. I gonna try to do something like that. Thanks everyone for help! On Wednesday, July 23, 2014 10:47:54 AM UTC-7, Anton Astashov wrote: > Hello, > > Is there any good way to send large immutable data with a lot of structural > sharing (like, app state with undo/redo stack) to the server, > and also get it from the server and correctly rebuild it in browser's memory? > > If I just do (clj->js my-data), I will get a JSON, but it will lose the > information about shared data. > > So, what would be the best way to handle that? It seems like I need some way > to know what pieces are reused, serialize the data, store reused pieces as > references, and then also being able to deserialize it having that knowledge. > > How do you usually accomplish that? > > Thanks! -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
