Can I archive a web application so that it can be deployed either in the cloud or in a dedicated server / VPS? How?

Is there a fairly universal architecture that can be deployed both on a cloud server and on a dedicated (or VPS) server with minimal changes? Obviously there will be changes in the configuration, but I would prefer to leave the rest of the application consistent, while retaining one supported code base.

The application will be ASP.NET & / or ASP.MVC. My development environment is VS 2010. The cloud may or may not be Azure. Dedicated or VPS will be Win Server 2008. Perhaps.

This is not a public website. The web application that I mean will be a separate deployment for each client. Some clients will be small-scale, some prefer that the application run on the local intranet rather than the Internet. Other customers may prefer a cloud-based approach to a black box solution. The application can work for several hours or can work for an unlimited time, it depends on the client and the project. In addition to deployment scenarios, applications will be more or less identical.

As you can see from the tags, I assume that the message-based architecture is probably the most versatile, but I'm also used to being wrong about this.

All suggestions and recommendations are welcome regarding general architectures as well as specific solutions.

+4
source share
1 answer

Yes it is possible. The istelf web application (MVC or Webforms) is likely to remain the same (with configuration changes).

If you are considering Windows Azure as a cloud-based deployment option, the main things to consider are:

Web application:

  • Session management: you will need to use a web farm-based approach (for example, cannot use the session state on the server side on the server side)
  • Bandwidth usage: when deploying more than 100% in-place delays in the cloud, you also pay more for more bits sent back and forth. There is an incentive to create more modest applications.
  • Authentication mechanism: if you want to offer SSO, you probably need to switch to a requirements-based approach (using WIF). This is largely something that you can isolate and modify (for example, Windows integrated security, cloud-based requirements).
  • Use all standard providers (e.g. profile, membership, tracking, etc.). All versions of Win Azure exist, so you can simply change them.

Data:

  • The easiest way to maximize portability is to use SQL Azure, which is a (large) subset of SQL Server.
  • If you use another storage system (for example, Windows Azure tables, etc.), you need to abstract all access to data in the application (much more complicated).
  • In addition to some features not available in SQL Azure (for example, SQLCLR, SQL Broker), there are restrictions on the size of the database (max = 50 GB at present). So, if your customer databases have grown above this, you need to split db (which adds more complexity, but it is doable).

Control:

  • If you use standard logging and tracing methods (e.g. Systems.Diagnostics, etc.), the application will remain basically the same. Your processes must be adapted (and your scripts, etc.).

More information is available here .

I don’t know what you were trying to consider for message queues, but this is something you can also ignore (for example, MSMQ for the local network, Windows Azure Queue for the cloud). You will need to settle for some semantic differences, but this is doable.

+5
source

Source: https://habr.com/ru/post/1312925/


All Articles