3 ms·
I've done something similar to this, though in a React Native world, where ReactiveX frameworks are a common enough pattern that this really seemed like the mos
by ledauphin 4y ago
I've done something similar to this, though in a React Native world, where ReactiveX frameworks are a common enough pattern that this really seemed like the most obvious way to do it.
I think the terminology that made more sense to me at the time is CQRS - instead of treating everything as a synchronous query/mutation, mutations are expressed as commands, and the expectation is that their effect will be reflected in the UI and on the backend asynchronously, but of course in the UI much sooner than in the backend.
The tricky part is that CQRS comes with some requirements for careful data modeling - you need to understand how your mutations compose across time, and like `swatcoder` mentions, you also need to use some unusual techniques for composing/coordinating operations across separate entities.
That said, it led to a fantastic user experience and additionally provided the benefit of 'solving' a whole host of issues around idempotency that turn out to be surprisingly common problems on mobile platforms because of missed ACKs from the server.