Search code examples
machine-learningmicroservicesdatabase-migrationcqrsevent-sourcing

Is Event Sourcing helpful to Machine Learning


I am new to Event Sourcing, Event Store, Message Store and Machine Learning.

And we are planning to implement message store and the reason they mentioned about implementing message store (instead traditional db, crud) is because the message store eventually helps in deep learning or machine learning.

I have got basic understanding of event store, CQRS, but unable to understand how it relates to machine learning.


Solution

  • CQRS/Event sourcing

    Machine learning has nothing to do with Event Sourcing and CQRS. they are design patterns to segregate read and write data operations and to store all the events that happen to your domain instead of updating the state.

    Machine Learning

    Machine learning is about data. The more data you have the better predictions you have. Since Event sourcing means that you are going to store each event that happened to your domain means you have more data to analyze and you can predict better results.

    Example

    I have online shopping store where some people keep the orders in cart for longer period before they make the payment than other people people who make payment straight away. If you have event sourcing in place you can track the behaviour of user like Item added , item removed , booking created etc. You can use machine learning to predict the people who payed straight away are likely to get the product next time and send out discounts to them etc or learn their shopping behavior to show them products that they are more interested in.

    Imagine instead of event sourcing you are dealing in state, where you simple update order status field in the data base. You can never predict this behavior.

    Hope that helps !