PHP execution Environment in Windows Azure Development Combat Introduction

Source: Internet
Author: User
Keywords Php azure azure development of combat implementation of the environment
Windows Azure is a publicly-owned cloud platform service developed and provided by Microsoft, and this platform supports many different programming languages, development technologies, in other words, you don't necessarily have to use Microsoft technologies (such as. Net, C #, etc.) to use Windows Azure, the Cloud Platform [1]. This series of articles will introduce PHP as a programming language for developing practical Web sites or applications on Windows Azure.   This series of articles includes:   PHP application Execution Environment deployment PHP application Database selection: MySQL or SQL database uses Windows Azure Storage–blob Storage to process static files Use Windows Azure storage–table service to process session objects communicate with other systems using Windows Azure Service Bus PHP execution Environment   Use Windows Azure virtual machine service   Windows Azure Virtual Rogue Service is an IaaS (Infrastructure-as-a-service) in the classification of cloud services, allowing users to build virtual machines on the platform, With the option to install supported operating systems, Windows Azure's data center technology handles all the problems of virtual machines and networks.   currently supported by Windows Azure Virtual machine services, the server for PHP has a variety of Windows servers and several Linux suites, with its own operating system and environment, and the way in which PHP can be executed.     Using Windows Azure Web site Services   Windows Azure Web site (Websites) service provides a platform to quickly build a Web site where users do not have to install the operating system or the settings of the server and the PHP execution environment. Web services can be provided immediately upon deployment of the site's files.   Windows Azure Web services currently provides a PHP execution environment that executes PHP programs in a FastCGI way with the IIS server, so you must also use the corresponding version when you deploy the PHP suite (simply put, the version of. dll). The PHP version currently supports 5.3, 5.4, and 5.5 version, users can set the version of the PHP literal that Windows Azure Web service will use.   In addition, the Windows Azure Web site service supports a variety of Web site deployments, such as traditional FTP, WebDeploy, or a combination of version control mechanisms such as tfs/git/mercurial, and binding public versioning services such as Visual Studio Online, GitHub, or bitbucket, and even can be deployed directly using Dropbox, to provide more flexibility for the process of Web site development deployment.   Using Windows Azure Cloud services   Windows Azure cloud Service (Cloud services) is a typical PaaS (platform-as-a-service) cloud service, Users of this service can also provide services by deploying applications directly without having to install software such as operating systems, servers, and so on. But unlike Web services:   Windows Azure Cloud Services differentiate Web role and Worker role in application execution environments, applications on web role are like general Web applications, when users of web sites or services The required way of accessing (for example: browsing with a browser) is performed, and the application on the Worker role is a program that can be executed independently and suitable for background work. There is no permanent storage disk in the execution environment of Windows Azure Cloud platform, that is, in the process of developing an application, it is not possible to assume that the system has a file system to use, and that any file operation must use other storage mechanisms (e.g. Windows azure Storage) This is to ensure that the execution environment does not have a "status" concept, so that when a problem occurs with the virtual machine running the application, Windows Azure cloud Services can immediately enable the new virtual machine to continue to provide services, ensure the stability of the service, and also make it easier to scale up the service. Windows Azure Cloud Services separates the staging and production environments, and when deploying a new version of the application, you can deploy to the staging environment test before you can deploy to the production environment when there are no problems, The deployment process also does not cause disruption to services. The execution environment for Windows Azure Cloud Services is based on Windows Server and IIS servers, so deploying PHP applications, you must also deploy PHP's execution environment (you can choose the PHP version yourself), with a little setup to execute the PHP application in a FastCGI way.   How to choose the PHP execution Environment   currently Windows Azure offers three ways to perform PHP applications, and which one is the "best" option? In fact, this does not have a certain answer, it depends entirely on the circumstances.   If your PHP application is already very complex and you don't have a lot of resources to overwrite, Windows Azure virtual machine is probably the quickest way to get to the cloud because you can build your own virtual machines and set up an execution environment. However, if you want to enjoy the load balance (load-balancing) or high availability (availability) of the cloud platform, you may have to set up your own processing, and load balancing or high availability must establish at least two virtual machine entities to set up. It is not a direct deployment that can be completed.   The Windows Azure Web site service is also a great choice for a purely web-site application, which eliminates the hassle of managing and setting up the operating system and servers, and supports multiple deployments, whether you're using Windows, Linux or Mac as a development environment, can easily use this service to develop Web services. also provides a permanent storage disk, so that the Web site program is almost no rewriting can be deployed successfully (so also support a number of well-known PHP kits such as: WordPress, Joomla, MediaWiki, etc.).   What's the case with Windows Azure cloud services? If you need a highly stable and easily scalable feature, and you want to differentiate between staging and production environments, Windows Azure cloud service is definitely the best choice, but now that you want to enjoy these features, the program has to do some rewriting, like you can't use a local disk, Or you want to handle stand-alone programs using the worker role, and finally you have to package the deployment using the tools provided by the Windows Azure SDK, which is the cost of development.   Summary: It is necessary to select the right service to run your Web application based on your needs and realities.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.