The approach used by om-sync (optimistic update) is the right approach, IMO.  
I'm a big fan of Firebase, and one of the things it gives you "for free" is 
optimistic updates, and it works with any front-end library, not just Om.

With Firebase, it's really easy - just register listeners for your data in 
Firebase and in those handlers update your app state.  When you do writes, you 
write to Firebase directly and its client immediately fires local events to any 
affected listeners so you immediately get the changes locally.  Then it handles 
updating the server behind the scenes, and if the update fails then it fires 
events to effectively undo the local changes made earlier.

That's the basic approach you want to use, whether through Firebase or Om-sync 
or rolling your own.  If I were going to roll my own solution, Sente is a great 
starting point, but there's still a lot of infrastructure you need to build on 
top of it to make this work.  An idea that keeps rolling around in my head is a 
service like Firebase built on top of Sente, probably with Datomic as a back 
end.  Some day...

-- 
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 clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to