Interesting lecture by Martin Fowler where he compares slightly different Event driven architectures. He feels that the terms is being over used and could mean one of four more specific types of architecture such as:
1. Event Notification – message added to queue or event hub to say X happened. So maybe a new credit account is opened a message is risen which will be subscribed to ensure the the owner’s credit rating is updated by checking all their accounts.
2. Event Carried State transfer – same as above but a copy of the details of the change of state are included in the message, such as a change of the address of the person with the credit rating. This message might include the old address and the new address so the system receiving the message does not need to get further data from persistence or from another part of the distributed system in order to update the credit owner’s details. Obviously duplicating data comes with it risks about concurrency and potentially a newer data update could go in first and then be overwritten with older data.
3. Event Sourcing – the events form a log book of changes so detailed that the application’s state can easily be reconstructed from them. It forms the best and most accurate source of truth. Git essentially works like this with a log of commits. Bank accounts are the same. They begin with the starting deposit and every credit and debit until you reach the current amount which is like your “Application State”.
4. CQRS – Command query responsibility segregation where the code which writes to the persistence layer is entirely separated from the code which reads from it.
This is a good learning lecture and well worth listening to. It didn’t really endear me to him as he made a comment about the camera suggesting the camera man was asleep on the job in front of everyone and later drawing people into admitting they’re developers and then encouraging people who believe they weren’t working with an event sourcing system to identify themselves before showing they were wrong… Not the best way to make people most like you.