I am having trouble figuring out a strategy to push updates to an on-premises multi-layer application (probably wrong choice of words here, please bear with me) and I was hoping that somebody has some experience and can share a tip or two.
I am currently working with the latest dotnet, and on the very early stages of planning a solution that will comprise of a Desktop UI for the presentation layer, a WebAPI for the business logic, and of course a database for persistence.
This solution is meant to be installed on-premises, on multiple sites, each with (possibly) multiple desktop client installations, a local web api and a local database. However, I cannot find an easy way to handle updates for all of the above.
Suppose for the sake of argument that an initial version is rolled out, and then some new functionality is added that requires changes in the UI, additional routes and logic in the API, and some changes in the database (maybe a new table, or view, or ...). How on earth can I hope to update all those elements concurrently, since the new features would require changes on all three?
I know that solutions like ClickOnce can handle the Desktop UI, and I think I can have the webapi perform updates on the database via EF migrations. However I don't know how it would be possible for the webapi to check for updates and/or "self-update". Or how to make sure that the webapi and the UI are updated at the same time. Of course, the UI could probably be updated at a later point in time hoping that any API updates don't introduce breaking changes...
I can only think of hack-y solutions that seem too wrong, such as containerizing the webapi and scheduling the container host to look for updates on some kind of registry on regular intervals, as well as including some type of check in the API for the desktop client's version. Maybe, for example not allowing logins unless client ui version is >= (some value) and dropping all session info upon update/restart, thus forcing the users to close and update their desktop clients when the backend has been updated.
However this can't be a good idea, as it seems too complicated and not really failproof, and I don't really know whether it would actually work.
PS I am not trying to find a way to make the above idea work, it may well be garbage. It was just a thought that crossed my mind, I am open to suggestions!