2

I try to solve interesting theorists-philosophical question about eventsourcing, event versioning and A/B testing, and would like to get some advises and solutions from practice.

One of primary benefits of an event-sorsing is easy and simple transition of application to upcoming version. It is enough to create an event in the new version and to write an event handler for it, and application will work as with old, and new events. It saves from need of a data migration and is the main feature of an eventsourcing.

However in practice more complex problem meets. Let the new application version be ready, however it is dangerous to publish it for all users, there is a wish to check stability and incorrect working capacity by classical A/B-testing. At first the minimum of users is transferred to the new version and if there is no negative feedback, then the increasing number of users gradually upgrades to the new version.

And now users who got access to upgraded version begin to work, and in a basis events of new type which the old version doesn't understand are created. It seems that according to the theory of an eventsorsing and shall be, however in practice it threatens with serious problems.

Suppose that our application is a forum, well or a messenger. Users of upgraded version carry activity, send someone messages, but users of the old version just won't see them. There will be a situation that messages disappear in anywhere, and it becomes impossible to use a product. And in practice the event was updated very little, added one emoji for the message, for example. And from the point of view of business values everything shall work for users without problems.

Whether there are some well-known methods of the solution of this problem? Yes, it can be contrary a little to ideology and the theory of eventsourcing, however the favor is more important for the end user/customer.

Vladislav Ihost
  • 2,127
  • 11
  • 26
  • 1
    I would recommend you to look at Greg Young's book about event versioning https://leanpub.com/esversioning – Alexey Zimarev Jun 08 '17 at 09:18
  • @AlexeyZimarev The useful article, thanks! But doesn't give the answer to original question - how to be with already operating system? It is some production system which it is impossible neither to restart, nor to change a code, however the system shall begin to consume events in new format. – Vladislav Ihost Jun 23 '17 at 08:00
  • 1
    If you join the DDD/ES Slack at http://ddd-cqrs-es.herokuapp.com/, go to the #eventsourcing channel and people will be glad to help. – Alexey Zimarev Jun 23 '17 at 09:12

1 Answers1

0

I see two variants:

First variant is add another version field to you events. In old projection you must transform message, erasing new symbols or smth else. In new projection you use original message without transformation.

Second variant is adding new message field into events. So, on the web (in case of forum) you generate events with two message fields - for new version and for old. Of cource, both variants are temporary and in future you can change event's format.

A Ralkov
  • 1,046
  • 10
  • 19