
Hello!
During the time we wrote that there is for the web developer in our
Microsoft Azure cloud , and then wrote what has changed, there have been enough changes to write another article. :) (briefly in an hour, you can see something new in
the XaocCPS report from DevCon 2015). Under the cut - a brief overview with links, 10 minutes of reading which will give an idea of ​​what is on Azure for the web developer.
As usual, a little preface. A lot has already been written about why the web developer has a cloud, in which tasks it helps and in which it does not, it’s written out a lot. Not automatically (hardly any company can say unequivocally that for its client means a large load and notch, which should be scaled), but with a certain degree of flexibility - for web sites this is usually the CPU utilization value, exceeding which the system initiates call internal APIs for replica deployment. The second most popular - payment on the fact of use. How much the system worked, for so many came the bill. There are many more reasons, but they have not undergone major changes in all cloudy years, so let's get to the essence of the article - let's see what is on the Microsoft Azure platform for the web developer.
')
When the theme of web development on
Microsoft Azure comes up , they usually look directly at the virtual machines. Choosing the right, but not always the most economical - due to giving the client almost complete control over what is happening with the ecosystem around the project, there is a need for setting up, managing and further support (setting up fault-tolerant web server farms or DBMS, for example) and related costs. By experience - the choice of virtual machines is justified in two cases:
- It is necessary to transfer the Legacy-system, which has so many different dependencies of different versions, that the issue of changing the code base may not even be considered. The option “virtualized ready server with application and ecosystem and transfer to the cloud on a virtual machine” is the most obvious here;
- Need a tuning ecosystem.
In
Microsoft Azure, there is a service of virtual machines that officially support images prepared for Windows Server starting from 2008 R2 (client versions are available only for MSDN subscribers), and some Linux distributions. During the deployment of a virtual machine, special services are injected into it, which make all of the cloud's benefits real, communicating with the system services of the platform and, if necessary, performing machine “disinfection”, data transfer, and other operations.
You can do almost everything with a VM with a locally created one, but you need to take into account that all resources are virtualized and the disks are located differently - the C: / drive is in Azure Storage, which imposes restrictions on the performance of the file system, as a disk, in fact, is at a distance, and the D: / drive is local for the server, and also has its own peculiarity - it is temporary. When you restart or any other operation with the VM, this disk will be cleared.
The second option is Cloud Services , which was essentially the ancestor of Azure platform services. The essence of CS comes down to the fact that a web developer (it’s just a web - there’s no big reason to make desktop or similar applications) takes (or starts a new project) a web project on .NET or Java (there are other languages), divides it into a frontend ( Web-role) and backend (Worker-role) and puts these projects in the solution. We specify the resources to be allocated for the web and worker roles, and upload the solution to Azure. Control over what is happening in CS is not the same as with a virtual machine, and the state is more difficult to store here, but it suits many people - for example, when we understand that we have a heavy load on the web interface, but there is no handler on the handler, it makes no sense to scale there is no system, so we simply increase the number of instances of the web role. You can do this with virtual machines, but there will be much more manual labor (plus this solution will be more expensive).
By the way, besides the value of CS as a container for applications, CS is also used to place virtual machines in them. They act as a network border on which ports open / close, etc. Therefore, do not delete the CS used for the virtual machine - it is, firstly, free, and secondly, it is a guaranteed way to disrupt the functioning of the system.
The third option is Web Apps . Previously called Web Sites. The easiest solution for hosting web applications. Difference from VM and CS - a minimum of controls and settings. Difference from CS - everything goes in one package, without the ability to scale the application layers separately. It is convenient when you need to deploy a website without changes (except for certain situations, for example, using old versions of PHP Runtime) of the code base or simply in fast mode. If you do not have a website, but you need to quickly deploy and see some kind of a-la Drupal solution, this service can also help - there is a gallery of images of various software. Read more in the
report with DevCon . In addition,
glamcoder will tell
here how to do A / B testing using this service.
Clearly:In addition to this comparison, there are many scenario approaches on
this page . For example,
my application depends on the cloud .
So what is next? Placed ...
Deployed the site, set up the deployment of GitHub, learned how to scale. What's next? As a project grows, the number of its components and modules can grow. In Azure, as a cloud platform, there is a set of services, each of which can be practically used to solve a task instead of self-implementation and support.
Microsoft Azure services are divided into three logical layers - a
computing layer based on services of which almost all other services work, an
integration layer for mobile applications, for providing communication between various components of a project, for protection and authentication, etc., and a
data processing layer - All services that allow different ways to interact and change the state of the data. Let's look at all this in brief.
Data access layer
The data access layer contains non-relational data stores: tables, disks, queues, binary object storage, DocumentDB + relational data store in the form of SQL Database. The choice of the storage option, of course, depends on the tasks, and each of the services has its own specifics. For example, a typical use of tables is storing logs (Microsoft Azure itself, when activating application logging, adds data there), the SQL Database is relevant when there is a need to quickly deploy a database or test a solution:
- Tables - The table stores structured non-relational data.
- Queues provide messaging between applications.
- Blobs provide the ability to store large amounts of unstructured text or binary data.
- SQL Database - A relational database is a scalable cloud-based database service built using SQL Server technologies. I repeat - if you need to quickly deploy a database, this is an excellent and fastest option. Also inside this service there are various interesting functionality, for example, a tool for creating non-clustered indexes ( learn more from sitox ). In addition to the SQL Database, there are several other offers on the platform - MySQL and MongoDB, which are similarly available as services.
Azure Files gives you the ability to access data stored in Azure Storage as a network resource using the SMB protocol, which allows for familiar access to data from virtual machines through network interaction. Which means you can use standard Windows APIs.
Caching is a distributed in-memory cache with which, instead of slow disk storage, applications get high-speed access to data stored in RAM, with the ability to scale. Redis Cache - Azure Redis Cache is a ready-made redis storage with the required size for data caching tasks. Read more about caching from david_off

Integration layer
Media Services include cloud versions of many of Microsoft’s existing multimedia platform technologies and partners, including for viewing, encoding, format conversion and content protection, as well as on-demand and real-time streaming. Supports Live Streaming. This service is recommended to use when processing multimedia content. You can do this in virtual machines (for example, set up a VoIP or media server), but in this case, you may encounter various restrictions (such as a limited number of ports, traffic, etc.).
Mobile Services offers cloud infrastructure for all popular mobile platforms: Windows 8+, Windows Phone 8+, iOS, Android, HTML 5. Based on the service, you can build a cloud backend to which you can transfer data storage, authentication and Push notifications. Supported by Xamarin. It is used by many clients - you can see Dmitry Kudelko's experience on development on Xamarin, Mobile Services and C #
here or in the report
here (this report also discusses integration with financial systems).
Identity - Authentication service provides identity management and access to applications, using Microsoft Azure Active Directory (formerly Access Control Service), you can provide single sign-on, enhanced security and simple interaction with applications already deployed in Active Directory, as well as integrate with other providers authentication (Live ID, Google, Facebook, etc.). Azure Active Directory allows you to solve single authorization tasks for multiple services (Single Sign On), maintain a single user directory, synchronize directory data with an Active Directory in an enterprise, etc.
Azure Active Directory is a complete implementation of a directory in the cloud. The service supports popular open standards for providing federations: SAML 2.0, OData, WS-FED, OAuth 2.0 / OpenID.
The Service Bus provides relay and secure messaging capabilities and allows you to create distributed and loosely coupled applications in the cloud, as well as hybrid applications hosted simultaneously in private and public cloud services. Much more powerful and functional than Storage Queues, therefore, more difficult to maintain and select the right technologies and approaches. In addition to the usual queue, it contains a special queue, Event Hubs, which is relevant when used in the concept of the Internet of Things, when there are many (very) devices that send a large number of small messages.
Learn more about using telemetry from boards using Azure and Event Hubs .
Traffic Manager - Traffic Manager provides load balancing of incoming traffic between multiple hosted Windows Azure services, regardless of whether they work in one data center or are distributed across multiple ones. An excellent report on the practical use of this service, as well as the new Azure DNS service (which solves many problems with DNS on the platform) can be found
here .
API Management offers its own API developers the opportunity to get the environment for managing, monitoring and administering their API, located anywhere, both in the cloud and on any hosting, including its own infrastructure.

In addition to these services, there are, for example, Application Insights - integrate the agent into the application or on the server, and have a complete historical picture of what is happening with your project. Read more about the
Sergun report. In general, if you want to choose the right service, you can use the
site-designer .
useful links