Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Event Sourcing In Node.js

Tamar Twena-Stern
March 11, 2019
720

Event Sourcing In Node.js

Event sourcing has become a very significant pattern in order to scale your server . Node.js has become one of the most popular technologies to develope server side applications . Node.js servers need to scale more and more traffic, and combining event sourcing patterns becomes a tool which is good to master.
In this talk I am explaining how to build a twitter like application with event sourcing in Node.js.

Tamar Twena-Stern

March 11, 2019
Tweet

Transcript

  1. Tamar Twena-Stern • Software Engineer - manager and architect •

    Architect @PaloAltoNetworks • Was a CTO of my own startup • Passionate about Node.js ! • Twitter: @SternTwena
  2. Can I Add One More Index? username firstName lastName @johnsmith

    John Smith @tamarstern Tamar Stern @urishaked Uri Shaked Eventually, it breaks …
  3. Advantages • Each View has its own storage which is

    the most optimised for its specific queries • Can scale up to 10^8 of concurrent users • Schema migration is much simpler, Schema is much more flexible • System recovery is easier
  4. Where To Store Events ? • Event Store Database •

    Hadoop Cluster • node-webhdfs • Couchbase eventing service • npm couchbase • Implement in serverless architecture
  5. Evolution Of Architecture (So Far) The State Of The Entities

    In DB Actions in immutable log Consumers prepare results in batch
  6. Implementing Transactions With Event Sourcing • Databases have event log

    to implement transactions • I built a transaction engine for banking system in node.js using event sourcing • Each transaction was saved in an event log • Validation was done versus the event log to make sure the banking activity can be performed.