I have a multi-tiered architecture that contains 2 presentation layers, one business layer and one data layer. See image below for a visualisation.
Here you can see that there are two components (applications) inside the presentation layer:
App 1 and
Currently, I deploy all of these layers 'monolithically', meaning all at once. I do this to ensure that the two components in the presentation layer are compatible with the right business layer: v1 of
App 1 or
App 2 is compatible with v1 of the business layer.
To make it a bit more complex: the entire business and data layer run on-premise, which means that my clients decide which version of the business layer they want to run. This works well for
App 2, since this is also an on-premise application, but
App 1 is hosted by us. Therefore, I made it so that the version of the business layer decides which
App 1 version is being started. See a simple flow below of the current situation.
Problem & Question
I want to decouple
App 1 from this 'monolithic' deploy process, so that I can deploy this app faster & more frequently. So,
App 1 will have it's own deploy process. Meaning
App 1 will have its own version number. My current situation will not work anymore for this component, since v3 of
App 1 may probably work on v1 of the business layer. How to make sure that
App 1 communicates with the right business layer?
Two important restrictions is that I cannot change the way how all the layers are deployed, I can only change this for
App 1. Also, the business layer is not really backwards compatible as well.
I couldn't find literature about this problem. Maybe I can't google, or maybe this problem is too specific. I did came up with a solution. This solution is to migrate the on-premise business layer to self-hosted by using a new application that acts as a gateway (for old business logic) and rest API for new business logic. Only problem with this solution is that the on-premise business layer & data layer are also being updated. Those updates are not backwards compatible unfortunately. So once a column has been removed from this database, my newly created endpoint on the new self-hosted API will break. Down below is a design of this solution.
I am hoping that here somebody would like to provide their ideas. Maybe I should explore a certain technical term? Has anyone ever solved this problem (e.g. is there certain literature)?