Immutable Data Stores For Safety, Flexibility and Profit
At Atlassian, we’re taking the FP principles seriously to ensure we can deliver major architectural improvements without risk of losing customer data. The last frontier is applying immutability to databases, which, conceptually, we’ve all been brought up to treat as entities that need to be mutable. We are starting to embrace event sourcing – capturing streams of immutable ‘events’ to represent domain models instead of update-in-place. This approach ensures safety, and provides both audit trails by default and flexibility to support practically any schema changes and queries we might require in the future, simply by changing our interpretation of events when we replay them. In this talk, we will describe in detail what event sourcing is, why we use it, actual examples of our domain models implemented in terms of event sourcing, and how we implemented it in Scala using scalaz-stream on top of standard key value stores (AWS DynamoDB).