redis-atom icon indicating copy to clipboard operation
redis-atom copied to clipboard

need to add some built-in resilience

Open sfertman opened this issue 6 years ago • 3 comments
trafficstars

Open question right now:

  • what happens if atom tries to update and never succeeds?
    • gotta add option for max number of retries before giving up entirely
  • what happens if connection to redis is lost? timed out?
    • need to handle those cases gracefully so user has clean api and no surprises
  • what happens if something goes wrong in mid transaction? what are the options for rolling back?
    • redis has no ability to roll back multi/exec transactions -- something like this is beyond the scope of this project and probably belongs in refs territory.

sfertman avatar Nov 16 '19 15:11 sfertman

Behaviour will be controlled by an additional :option parameter that may be passed to the constructor. By default will be exactly like clojure atom, for better and for worse.

sfertman avatar Nov 22 '19 04:11 sfertman

take a look at https://github.com/resilience4clj for inspiration

sfertman avatar Nov 22 '19 16:11 sfertman

TODO:

  • [ ] cas max retries
  • [ ] cas timeout
    • [ ] type of timeout evolution? const, linear, exponential
  • [ ] swap timeout

sfertman avatar Feb 15 '20 03:02 sfertman