--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
what about simply making all the fields final? I tell my teams to do that, but we don't use a tool to enforce it.Or do you mean something else?
On Nov 22, 2013 6:24 PM, "JAmes Atwill" <jat...@linuxstuff.org> wrote:
>
> Something else. Lets say I've created an event, committed it, released and deployed my system into production. Now, another developer comes along, and as part of a refactoring, accidentally makes changes to my event, rendering it incompatible with the version in production, then commits it.
>
> We could definitely write some easily tooling to catch this, but before we do, I wanted to see if anyone else had done something similar.
>
> Does that make sense?
The last time I worked on a system at scale which relied on serialization and deserialization across versions, we added tests to our test suite to verify that old data would still deserialize. That implicitly checks the schema.
Kyle
--
maybe a look at traditional tool for database migration helps.
If you take Luqibase (a tool to have database DDL changes as code in the verison control system, and a binary/maven-plugin to apply those changes to databases), it stores a md5 hash for every changeset-file in a special luquibase-metadata database-table.
When luquibase is executed against a db, luquibase checks that older changefiles' md5 hash has not been changed. It simply stops if a develoer accidentially modified an already applied changeset.
Coming to events, one could write a script which stores the md5 hashes somewhere (could be another git/svn repo, a database, or even in the event-source-file itself). Then you have another script which is executed automatically (jenkins/hudson/team-city/pre-push-hook/...) abd checks the md5 hashes.
A complete other alternative is a Schema Storage like Confluence Avro Storage for Kafka (https://github.com/confluentinc/schema-registry). Your Events are your Schema, and changes to them could be tracked in such a system. Don't get me wrong, the Avro Storage is not for you, the concept could be.
In general, I miss for my own projects an automated solution for Event-Schema documentation, and automatic schema version checks. If you look at the Http-Api/REST world, they have Swagger and other solutions which try to address reflective access to user defined API/Schema.
I might loose a little bit the topic, but I wanted to share my thoughts.
Cheers
Siamak