|
|
|
|
|
by supermatt
4032 days ago
|
|
> you should be able to maintain and deploy them independently without having to be concerned with interoperability. How do you ensure that a service can be consumed? Or that an event is constructed with the correct type or parameters?
Surely interoperability is the key for any SOA? Vers looks interesting - I'll have a look at that! Thanks! |
|
If you include the version at the data level, any time it gets passed into a queue or message bus or REST endpoint, your microservice can seamlessly upgrade it to the latest version, which all of its own code has already been updated to use. If a response is required back to the service that originated the request, use your same versioning package (Vers if you go with that) to downgrade it back down to the version the external service is expecting.
If your interface layer is more complex, having responses independent from the data that change, that calls for a versioned API. Either throwing /v1/* or /v2/* into your URLs, or accepting some header that declares the version. But even in this case, you can drastically simplify changes to the model itself by implementing model versioning behind the scenes.