How to Build a Reliable Event Sourcing Application

Hello! In this article, I want to show you how you can turn a trendy microservice application into a working, manageable system using three proven techniques: using the example of the Joom internal performance-based advertising project.





The project



JoomAds Joom. , :



  • , ;
  • โ€” , ;
  • โ€” , ;
  • โ€” , AdWords.


โ€” (. . 1), (, , , ..) (, ).





. 1



JoomAds API , ยซยป .



JoomAds API , (. 1). โ€” JoomAds Campaign, โ€” Inventory, (. 2).



, .





. 2

JoomAds API .



Pure Microservices equals Problems



: ยซ ? ...ยป.



, JoomAds . , , JoomAds , .





(, Inventory) โ€” , . โ€” : JoomAds Campaign, Inventory JoomAds API, .. , ยซยป.



Joom, 95- JoomAds API . , .



, Inventory , .





โ€” . โ€” , .



JoomAds API , .





, Inventory, -, JoomAds API.



, , , .



- , .. , mock-, .



. JoomAds JoomAds Campaign, Inventory , 100 95% .



, , .



: Circuit Breaker , .



JoomAds API , , .. , .



Monolith over microservices (kind of)



JoomAds . , !



, , , .



, .



Materialization



, Materialized View. . .



, .



, (. . 3) .





. 3



JoomAds API, , .. / JoomAds, . JoomAds API !



Materialized View?



Data Sourcing



, :



  • .
  • JoomAds.
  • Materialized View.


, : .



: , .



, Inventory, , , Inventory . Inventory, .. , , JoomAds.



โ€” Materialized View .



Event Sourcing



Event Sourcing. -, , .



Event Sourcing JoomAds : (MAT View Storage), (Materialization Pipeline), (Ranking Pipeline), score' (. . 4).





. 4



Discussion, Technologies



Materialized View Event Sourcing JoomAds.



Materialized View . Event Sourcing , .



. , . , CPU. JoomAds Apache Cassandra, , .



MAT View Cassandra: Cassandra โ€” , MAT View . , Materialized View .



Event Sourcing . โ€” - , . , Inventory .



. Event Sourcing , , , . โ€” , .



open-source , Apache Software Foundation: Apache Kafka Apache Flink.



- , - .. eventually consistent , .



, , , , .. .



, , .



Takeaway



, , . , event sourcing , .



P.S. Joom vc, . .




All Articles