Upload
bucharest-java-user-group
View
205
Download
0
Embed Size (px)
Citation preview
EVENT SOURCINGCristian Iliescu ( )[email protected]
“We are the sum total of our experiences. Those experiences– be they positive or negative – make us the person we are,
at any given point in our lives. And, like a flowing river, thosesame experiences, and those yet to come, continue to
influence and reshape the person we are, and the person webecome. None of us are the same as we were yesterday, nor
will be tomorrow.”
An event is a notable thingIt happened in the past => is immutableInvolves one “producer” and one or many “consumers”
MYSQL APPROACHAction MySQL action
Action MySQL action
create account table Create
create account Insert
receive money Read + Update
make payment Read + Update
check balance Read
make payment Read + Update
ES APPROACHAction NoSQL action
Action NoSQL action
create account Create
receive money Create
make payment Create
check balance Read
make payment Create
Captures every change of the application in an eventOrganises all the events in orderCombines all events in the right order to obtain the statefrom a specific moment
STORAGE IGNORANCE & FLEXIBILITYAll data are stored as eventsNo more tables and complex relationshipsSave and execute
IMPROVED PERFORMANCEEvents can be published as soon as they happenNo blocking operationsEvents can be processed in parallelEvents can be multiplexed to multiple subscribersKeep read models directly in memory
SIMPLIFY DEVELOPER'S LIFESimplifies deployment and maintenanceNo data is ever lostReduces expenses on both the hardware and so wareFits very well with new technologies: Cloud Computing,Big Data processing
Event Sourcing doesn't lose information=> it offers the possibility to create a wide variety ofreportsCompatible with non relational database