Hi,
I tried out the first milestone of Axon 5.0.0 and would like to share my first thoughts. Before I begin I outline what I actually tried out so that you can classify my feedback.
My first approach was the starting guide. It was possible to follow the guide, although there were some minor mistakes and discrepancies like inconsistent package names. Most notably was the usage of “axon-configuration” which was not available in Version 5.0.0-M1, but did not seem to be actually required and the link to the example which did not work yesterday, when I tried it out (I see that it is available now, but for this feedback I do not consider it). Afterwards I used one of my own projects (a housekeeping book application) and tried to transform one of the aggregates into an Axon 5 command handler. Thus my feedback will mostly focus on the command handlers, the event sourcing, and the configuration and not on queries, event handlers or anything else.
In the following I used the feedback template.
1. How much experience do you have with Axon Framework 4 and earlier?
I would say “I am the expert in my team”. I know a lot about Axon 4, am aware of the most limitations and concepts, but from time to time I am still learning something new about the framework.
2. How would you rate your Event-Sourcing knowledge?
Something between “Advanced” and “Expert”.
3. How would you rate the overall experience of using Axon Framework 5 M1?
Good. There are some points I did not like, but I will detail this later.
4. What did you like most about Axon Framework 5 M1?
Most of the given choices I did not try out.
So, my answer is the dynamic consistency boundary as most interesting feature. Although at first unfamiliar when coming from Axon 4, it is actually quite flexible and I think it might solve a lot of issues which we had in the past. Namely the introduction of new business rules that would require the events of multiple aggregates to decide something. However, I also see this flexibility as a definite risk. In Axon 4 it was very clear for our programmers where new business logic belongs - in the aggregate. Now, with Axon 5, this is much less clear. Thus we (as in: our business) need to establish clear guidelines where business rules belong. You describe the ability to implement features independently as benefit - I fear that this might lead to an inhomogeneous and fragmented code base.
The “simplified configuration” did not seem so simple to me, to be quite frank. It felt rather fragmented and extensive. However, I developed most of Axon 4 with Spring, so my impression might be flawed. Thus I assume that the configuration will be much simpler with the first-class Spring support you are currently developing.
For my following statement I apologize in advance, because I can just assume that the test fixtures are someones pet project: I don’t really care about the new Given-When-Then test fixtures to be honest. As Oliver described already in an issue, this is not really the level on which we write our tests. My opinion on this might change once I see how query and event handlers are introduced in the whole concept, but usually we are are not really interested in which events are produced by a command handler, especially when other frameworks and APIs are involved. For instance, we would send a command and expect an AMQP message to be send. Or we expected a certain event that match a given predicate to be published. Or we expect a certain event not to be published (within x seconds). I don’t really see how this interaction with asynchronous components is covered by the new test fixtures, although the new concept works on configuration level. But, again, I might be wrong here, so I will stay tuned.
5. Do you think Axon Framework 5 improves the developer experience compared to Axon Framework 4?
I go with “maybe”. As mentioned before, I like the new flexibility, but the developer is much less steered into a certain direction. From an architecture perspective, this new freedom also means that we have to establish more guidelines for our programmers.
6. How long did it take you to get started with Axon Framework 5 M1?
Less than 1 hour.
7. How intuitive did you find the new configuration system?
As described before - not very intuitive, to be honest. A lot of internal changes (e.g. new internal state classes for my command handlers) mean also that I have to modify the configuration accordingly. As mentioned I will “measure” this mostly based on the upcoming Spring support.
8. Did you try out the new dynamic consistency boundary feature? If so, how would you rate it?
Already mentioned above. I go with “Somewhat intuitive” as it seems to be a logical extension of the Axon 4 concepts.
On a side note: It was rather intuitive to rewrite my existing aggregates into Axon 5 command handlers, simply by moving all of the aggregate’s state into a new nested class. This is good, because - let’s be honest - we will not rewrite our whole applications when moving to Axon 5. We would certainly use the new feature for new code, but it is important that it is rather easy and straightforward to transform the existing aggregates. I was also glad that it was possible to use the EventTag annotation on a method, because my identifiers were located in nested fields.
9. Did you construct custom EventCriteria
? If so, did you find it intuitive?
As expected I did not need it for my own application, as all events were still coming from a single “aggregate”. I used the concept only in the context of the starting guide were it seemed logical and expected to me.
10. Would you consider using Axon Framework 5 in a production project once it reaches a stable release?
Given that we already use Axon 4 in our applications and that it will be replaced with Axon 5 at some point, I go with “Yes, definitely”.
11. Do you have any suggestions to improve the new features in Axon Framework 5 M1?
My points of criticism for the new features have been mentioned already.
12. Do you have any additional feedback or comments that weren’t included in the other questions?
Probably only a minor point, but: Why is the sendAndWait method of the command gateway no longer typed? Now I have to cast the return type explicitly.
13. How would you like to be mentioned in the README file?
Name: Nils Christian Ehmke
I hope that this feedback helps you in any way. I hope that you don’t take my criticisms personally, because so far I like what I see. Keep up the good work and don’t hesitate to discuss my feedback with me.
Best regards
Nils