Solving temporal business problems with Event Sourcing functional programming

Some business problems are very difficult to solve applying mainstream architectural approaches. If you ever had to build a system allowing to track all changes made to domain objects and help business people to answer questions like "What was the state of my system at time T?", you will realize than the mainstream architectural approaches like storing and reading the system state from the relational databases will not work very well. Hopefully, there is another architectural pattern called Event Sourcing that allows to store the system state as a stream of business events which gives the business people a powerful way of inspecting their system at any given point in time. It happens that Event Sourcing fits functional programming very well. Retrieving the current state of the system is just applying foldLef function to the collection of events since the very beginning of the stream. But this is the simple scenario.

In this talk you will learn how to leverage functional programming to push Event Sourcing to its edges. Dealing with bi-temporal events, that can modify the past and influence the feature is a way for a business people to answer more complex questions like "What was the state of my system at time T1 given my knowledge at time T2?" or "What the state of my system should have been at time T1 given my NEW knowledge at time t2?". I'll walk you through the implementation of bi-temporal Event Sourcing patterns with functional programming based on my current experience in financial field. You'll learn how to retrieve the current state of the system, patch or schedule events and build read projections. You'll see how functional programming allows to build elegant, readable and reliable architectures.

powrót
Tomek Jaskuła Tomek Jaskuła

FP lover. French @IDDDWorkshop trainer. @vlingo_io active contributor. Humble servant of Paris' F# and DDD user groups. Founder of @luteceo_fr