I see a lot of mobile apps use Ahmad's approach where in case of failure or
network connectivity problems the change will undo itself. It seems to work
pretty well.

I am already using websockets myself so I currently do a lot of server to
client pushes, but I'm currently investigating if I can make clients more
independent (so the apps better adhere to 12 factor) so am considering a
similar approach as Ahmad suggests.

On Fri, 14 Nov 2014 01:00 Ahmad Hammad <[email protected]> wrote:

> Assuming you don't care about reflecting changes across devices/clients in
> real-time since you have not mentioned it. From what you have already said
> it sounds like you have it figured out:
>
> 1) dec the unread count on the app-state. Which will cause a re-render
> reflect the change in the UI
> 2) trigger a dec of the unread count on the server via tx-listen or
> otherwise.
>
> if 2. succeeds then the job is done. If it fails then you just have to
> rollback 1.
>
>
>
> --
> 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.
>

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