Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Timeless streams

69 views

Published on

Decoupling events from time

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Timeless streams

  1. 1. TIMELESS STREAMSTIMELESS STREAMS Decoupling events from time by /Javier Salinas @MuSTa1nE
  2. 2. ABOUT MEABOUT ME
  3. 3. DEFINITION OF TIMEDEFINITION OF TIME "The inde nite continued progress of existence and events in the past, present and future regarded as a whole" Oxford Dictionary
  4. 4. "A continuous, measurable quantity in which events occur in a sequence proceeding from the past through the present to the future" Science Dictionary
  5. 5. EVENT SOURCINGEVENT SOURCING With event sourcing, instead of storing the “current” state of the entities that are used in our system, we store a sequence of events that relate to these entities. Events are immutable
  6. 6. LOGLOG A Log is immutable, ordered, append-only and persistent data structure. It’s a very simple structure, but it is very powerful. Logs have a speci c purpose: they record what happened, when and where.
  7. 7. KAFKAKAFKA Kafka is a distributed streaming platform Order is guaranteed within a partition in a topic. Each partition is a log.
  8. 8. REAL TIME PROCESSINGREAL TIME PROCESSING
  9. 9. DAILY PROCESSORDAILY PROCESSOR
  10. 10. PROBLEMSPROBLEMS Time based systems are weak Are hard to test Dif cult to reproduce Results might not be repeatable
  11. 11. DECOUPLE FROM TIMEDECOUPLE FROM TIME Isolate time Make your time de nition - as an event React
  12. 12. DAILY PROCESSORDAILY PROCESSOR
  13. 13. USING MARKERSUSING MARKERS Guarantees all events has been processed Make an event as a result React to events - not to time
  14. 14. WRAPPING UPWRAPPING UP Time based systems are weak and hard to test Isolate time Be reactive to events - not to time
  15. 15. QUESTIONS?QUESTIONS?
  16. 16. THANK YOU!!THANK YOU!! jsalinaspolo@gmail.com @MuSTa1nE blog: http://www.jspcore.com

×