Faking Real Time: Optimistic Updates & Eventual Consistency (Decompress 2015)

Faking Real Time: Optimistic Updates & Eventual Consistency (Decompress 2015)

A talk I gave at Decompress 2015 about making CSSConf Racer, a real time, multiplayer racing game: http://cssconfracer.com

CSSConf Racer was built with Flux, Firebase, React & react-router.

D8de178c08fe406eceeba711709ed3da?s=128

Ben Smithett

March 28, 2015
Tweet

Transcript

  1. Faking Real Time Optimistic Updates & Eventual Consistency

  2. None
  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. cssconfracer.com

  11. cssconfracer.com

  12. None
  13. None
  14. None
  15. setUsername(“jim”)

  16. { type: SET_USERNAME, username: “jim” }

  17. UserStore: CHANGE event triggered

  18. None
  19. None
  20. Real time on the internet is hard.

  21. None
  22. None
  23. None
  24. You don’t always need confirmation before updating the UI

  25. None
  26. None
  27. None
  28. None
  29. Eventual Consistency

  30. None
  31. CQRS Command Query Responsibility Segregation

  32. None
  33. None
  34. None
  35. None
  36. None
  37. How to fake real time Hide network effects from the

    user Optimistically update the UI Embrace eventual consistency
  38. The First Annual Decompress Grand Prix Go to cssconfracer.com now

  39. Thanks! @bensmithett https://github.com/bensmithett/cssconfracer Screen by iconoci http://thenounproject.com/term/screen/82256/ Database by Stefan

    Parnarov http://thenounproject.com/term/database/29365/ Phone by Joris Hoogendoorn http://thenounproject.com/term/phone/42970/ Cloud by Jan-Christoph Borchardt http://thenounproject.com/term/cloud/932/ CQRS by Martin Fowler http://martinfowler.com/bliki/CQRS.html http://cssconfracer.com