DEV Community

Web project on cloud (API, Web site, DB, Storage) and on premises simultaneously

janjuks on July 27, 2017

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...
Collapse
 
kr428 profile image
Kristian R.

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.

Collapse
 
janjuks profile image
janjuks

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!

Collapse
 
ben profile image
Ben Halpern

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.

Collapse
 
janjuks profile image
janjuks

So I'm not the only one... Podcast didn't really help, but I enjoyed it nevertheless, thanks!

Collapse
 
janjuks profile image
janjuks

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.