Hello there. Long time reader, first time poster here.
Let's get to the topic right ahead - I'v been developer for project that is hosted on Azure for 2+ years. As noted in title, it includes API, Web site, DB, Azure Storage. There is one big client who wants the product, but is totally against using Cloud. So it is planned to host the project on premises just for him. Now, I'v been in the industry for 3 years, but this seems to me like a really bad idea.
What's your view on this? Could it be done without code like this
if env == cloud then
doThis()
else
doThat()
and simply be specified as configuration value? I know it might be hard to tell without knowing the project, but if you had to guess? There's a lot of different kind of files being stored each with its individual nuances. Server workers/jobs as well. I don't think there is going to be synchronization between the two, that would be crazy. Any other things to watch out for, prepare, etc.?
The project is rather large and complex. Kind of like management site for companies that use it for managing bunch of interactive displays and digital signage. All companies use the same site and can use some kind of assets from each other. The biggest and most complex functionality coming from admin management part and many access rights that user can have. The other part is Windows software that communicates with the site and executes all the management coming from site.
There is already a lot of bad, bad, really hard to manage code which drives me nuts pretty often and I'm thinking that this will make things way worse. I'v already felt like surrendering just because of code quality and feel like this could really do it.
Top comments (5)
Though it might make things a bit bigger or more complex to handle: We moved to containers, specifically Docker, also for this purpose which provides a certain level of abstraction whether an application runs on-premise or within some cloud as long as you manage to provide it with all the resources needed. I am unsure however whether this is of real help here as this would require the in-cloud services you use to be easily replaceable with on-premise implementations - not sure if there is an "on-premise Azure Storage" in example. So while this worked in our environment (in example while using postgresql), not sure whether it works for you.
Second strategy, if this is not possible: Have a look at your codebase, try to introduce some layer of abstraction and try to keep all the "environment specific" code in one or two small modules below well-defined interfaces. This, however, may be considerable effort as well, depending upon your code quality (which you already mentioned) and the overall complexity of your application.
I'd definitely, at first, try very hard to get the "cloud" application to run on-premise by providing the required infrastructure locally. Maybe you have someone (Microsoft? Docker?) to help you with that, too, if there's a budget for consulting in that project.
Thanks! I'v heard a lot of good things about Docker, but haven't had the chance to try it. Jeff Atwood in the podcast mentionted by @ben was also very positive about it.
Didn't think of possibility to have Azure Storage run internally, will check out if possible. Ok, I have some digging to do now, thanks!
My gut is that you are asking for some trouble here, but I'm not really savvy enough to get into the details. I really enjoyed this podcast episode withJeff Atwood where he talks about his choices for the on-prem and cloud combination. He doesn't get to this until after halfway through, but it's a great episode overall.
So I'm not the only one... Podcast didn't really help, but I enjoyed it nevertheless, thanks!
Thanks for the input! In our case, there would be two completely separate environments/builds that would not interact with each other. One on cloud and other on-prem. So redirections etc. wouldn't apply.
Furthermore, just learned that it's very likely that it will be internal network with no access to internet. So no syncing of course.