This isn't for everyone, but I'll throw this out anyway in case someone else 
finds it useful.  My solution to this problem has been to let someone else 
solve it - using Firebase.  In Firebase, a database is basically just a big 
JSON tree.  You subscribe to changes at any node in the tree and get 
notifications when that node is changed, children added/removed, etc.  The 
Firebase client also handles speculative updates for you - when you write 
changes locally, it immediately fires the relevant events locally so that your 
UI will be updated immediately.  Then if the write does eventually fail, it 
will send the events needed to reverse the commits and bring your client up to 
date.  It will also cue up writes when you are offline and reflect them 
locally, then sync everything up when your connection becomes available again.  
One thing that's really cool is their Forge - an online UI to your database 
where you can inspect/edit the JSON.  It made it so easy (fun, actually) to 
test all these different scenarios and see the results across all my clients in 
realtime.

I didn't start out using Firebase, it just kind of came up by accident.  I am 
working on this project for a client which involves rewriting/modernizing an 
in-house legacy system as a webapp and adding a specialized mobile/tablet 
application.  After the project was well underway, it became increasingly clear 
that the biggest pain point for the customer could be alleviated by making some 
of the tablet functionality available sooner.  So I needed a way to easily 
expose some of the data from the legacy system - preferably without having to 
standup a server just yet - and Firebase fit that need perfectly.  Like I said, 
probably not for everyone, but for small teams on a tight timeline it saves a 
lot of effort. 

-- 
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.

Reply via email to