This post has been imported from my previous blog. I did my best to parse XML properly, but it might have some errors.
If you find one, send a Pull Request.
Beside common advantages of event sourcing like the auditing, projections and sticking closely to the domain, you can use events to discover the domain again and provide meaningful insights to your business.
I’ve already described the idea of enriching your events. This is the main enabler for analyzing your events in various way. The basic metadata one could are:
You could add a screen of your app and IP address and many many more.
Having these additional data, it’s quite easy to aggregate all the events of a specific user. This, with time attached, could provide various information:
The same with projection by event type:
Or looking at a mixed projection finding sequences of events for a user that might indicate:
All of the above may be treated as simple aggregations/projections. On the other hand, they may provide important trends for a system and might be used to get an event based insight to the business domain. Can you imagine the business being informed about a high probability of a successful cross selling of two or three products? That’s where a competitive advantage can be born.