(1) i’m not using rx bindings but all clicks from all votes from all comments are received through an observable represented by
at the time , I decided debounce was not good for me, since we’re receiving clicks from all comments and therefore cannot ignore all events only based on a periodic time. (see where debounce ignores the yellow circle http://reactivex.io/documentation/operators/images/debounce.png). maybe groupBy/debounce would also work and be easier, but as i said, this is just one of many possible solutions :)
(2) i don’t specifically revert the vote in case of failure. when the data is refreshed again due to pull-to-refresh or opening activity again, then it gets the correct data from the server.
rest failure will happen due to missing network or some server failure. job priority queue helps me with the missing network; if another failure happened, the user will see that is vote “disappeared”, but i can live with that.