2009 years of Cloud computing still continues its heat in the 2008, and it is not difficult to predict that the application running on the cloud (hereinafter referred to as cloud applications) is bound to be more and more, and that there will surely be a growing number of developers who have to consider or participate in the development of cloud applications.
The essence of cloud computing is access to applications and services over the Internet, which are often not run on their own servers but are provided by third parties. For cloud developers, in cloud computing mode, while deploying applications without concern for infrastructure issues, there are new issues, such as the inability of developers to invoke databases in a familiar way, the stateless nature of applications, and the need to adopt different development frameworks.
Stateless applications and server downtime
"The biggest challenge in developing cloud applications is that software must be able to tailor and deliver the resources needed to suit the needs of the application." "Fortunately, with the help of the API provided by the cloud platform, developers of cloud applications can apply for more resources from the cloud's provider," said Tucker, CTO Lew of the Sun Cloud computing department.
Developers also have to make redundant designs, recognizing that it is likely that servers in the cloud are just ordinary servers, said Amitabh Srivistava, vice president of Microsoft's Azure cloud platform, "there is a good chance that the server will go wrong, so you have to consider redundancy when developing cloud applications." ”
Developing cloud applications must also take into account the stateless nature of Web applications (stateless means that the client and server side do not have to save each other's details, the server only needs to process the current request without having to understand all the request history-the editor note, Srivistava said, "If your program requires retention of state information, The program will definitely go wrong during the run. The pattern of cloud computing is to terminate it if something is wrong, and then start another program. This can only be achieved if each application is guaranteed to run relatively independently, i.e. State Independent. ”
Srivistava further explains that, for example, there is no local disk in the cloud, and there is no registration, and in stateless applications, these parameters are encapsulated and packaged in the parameters of the call.
Sun Tucker warns: "Stateless guarantees the simplicity of the application, but it takes some state information to develop really interesting and useful applications, such as the fact that we have to keep the user's information in order to keep the user from logging on, That's why we still need the database or something else to save the state. "However, some cloud applications, such as the front-end of the web, need to be dynamically tuned based on the amount of traffic that must be stateless."
Another feature of cloud applications is that different parts of the application may run separately in different areas of the cloud. For example, an application's presentation layer might run on Facebook, and its storage part might run on Amazon's resilient Storage Service (S3), and the logical part of its application might run in another completely different place.
"The programs that were previously developed by programmers run on their own servers. "This means that the architecture of the system must be reconsidered when developing cloud applications, especially considering the large-scale nature of cloud applications, not only the large number of users, but also the distributed distribution of computing resources," Tucker said. ”
Tucker added: "Do not think cloud application how mysterious." In fact, there is no trick to develop scalable cloud applications that need to be carefully designed and planned. ”
However, the cloud platform can provide us with some help. In some cases, such as using the Google APP engine to develop certain applications, the program is naturally extensible, without the developer's consideration. Sometimes we can use some design patterns that can be used to provide extensibility to applications. For example, the multiple availability Zones of the Amazon Elastic Computing Cloud (EC2) allows developers to deploy an application to multiple locations here.
"Previously, only big companies could do that. Said Kay Kinton, a spokeswoman for the company. EC2 has a function called resilient IP, which can quickly establish a map of an internet address, transferring requests that are ready to be sent to a failed application instance to a valid instance.
Different types of databases
In cloud applications, abstract and stateless are equally useful when accessing a database. "For example, Azure provides programmer developers with a completely different way of accessing a standard relational database. "The azure storage engine does not use relational databases, so many of the methods used to develop applications are not working in the development of cloud applications," said Ben Day, president of the Benjamin day consulting firm. ”
He also takes a stored procedure in a relational database as an example to illustrate that in a relational database, the query logic is close to the actual data location, and the programmer can know exactly where the data is and what devices exist, and in the Azure cloud the premise no longer exists.
"The trouble with cloud applications when accessing a database is that there is no guarantee that the database you are reading is in a specified location or data center or a specified device," Day says, "so ultimately you can only use the most basic SQL query statements, and many stored procedures cannot be used because they are closely related to the specific type of the database. ”
In addition, Day added, Azure's storage engine is very different from the cloud version of SQL Server (SQL Data Services) in the Microsoft plan, so developers need to know which database engine they are using. For example, Azure saves a 1MB file as a blob type of data, and SQL Server saves the file in a table.
It's not just azure that is the obvious difference between developing cloud applications and common applications when accessing databases, but it also has the same problem with Google App engine.
"Google App engine not only abstracts actual physical hardware, but also abstracts all the concepts about devices," said Pete Koomen, Google's app engine product manager. "This ensures that when developers upload the code to Google, Google can manage the code separately from the database." "Because Google automates many of these processes, developers must follow certain rules that are quite different from the rules we used to have in the traditional SQL model." ”
When using app Engine, developers store the data for the long term in Google's large table (big Talbe). "Large tables are not SQL databases. The reason we use a large table instead of a SQL database is because the SQL database supports many features, such as the join feature, which makes it very difficult to run a database on multiple servers. ”
"When we use our system to develop cloud applications, we provide a programming model and encourage programmers to take some unconventional approaches from the start, for example, when developers are storing data in multiple locations in a single stored procedure." "The advantage of doing this is to ensure that the application is very efficient in executing the query," he said.
Koomen is opposed to using relational databases in a cloud environment. "We found that relational databases are very difficult to manage in a very large amount of traffic, and that programmers have to devote a lot of time and effort to solving a range of problems with high traffic," he said. ”
Must be accustomed to change
Consulting firm model Metrics has helped customers deploy cloud applications on Salesforce.com and other platforms. They found that a major difference between cloud application development and B/s application development was that "applications on the cloud are changing much faster." John Barnes, CTO of Model Metrics, said, "For example, salesforce.com a few new versions a year, and each new version is likely to have new features and features that are worth using." ”
"As a developer of cloud applications, you have to be technically consistent with the cloud platform, have to focus on a lot of technical blogs, and take an active part in some webinars," Barnes suggests. ”
Developers should also understand different design patterns, such as final consistency (eventual consistency), and final consistency is a consistent model for parallel programming, such as distributed shared memory and distributed transactions. Final consistency means that, in a longer period of time, if not updated, all updates are propagated within the system, ultimately ensuring that all copies of the data are identical-the editor note. In this design pattern, if the program changes the data, it may take a few milliseconds to react to the database, "The result of this design pattern is that it's possible to take out the latest values from the database," Barnes said. Programmers develop cloud applications with different programming styles. ”
System Management becomes simple
For programmers, it's not that clouds just cause trouble, but in a cloud environment, things are easier.
"For example, the loosely coupled approach that the cloud provides for using Web services to assemble applications has turned the cloud into a relatively easy development platform," Barnes said. ”
This ensures that developers can focus on innovation and business logic, instead of wasting time on some basic and ancillary work (such as concerns about operating system and hardware configuration), as before. For example, the Salesforce.com Cloud development platform Force.com provides functionality for security, workflow, System management, and load balancing.
Model metrics a customer initially decided to develop a university student management system on Microsoft's. NET platform, and later found that if developed on force.com, the cost of development might only require the original 1/3~1/ 4, because force.com has many existing functional modules available.
Taking into account possible migrations
In any case, developers must keep in mind the difference between developing cloud applications and traditional software packages. Barnes said that for cloud developers, there is also a noteworthy point is that the development of cloud applications should be aware that different clouds have different pricing methods.
Adam Gross, vice president of Salesforce.com Developer Marketing, also reminded developers who are ready to develop applications on the cloud platform that they need to know what features and features are available on the platform he chooses to prepare for future migrations. Developers should take this into account on the first day of developing cloud applications, and should try to choose the Non-proprietary technologies and features on the cloud platform to ensure a smooth migration from this platform to another cloud platform one day. ”
Koomen also agrees, saying: "Google supports the popular Python language and the Django Web framework, which in some ways ensures portability of applications." Not only that, Google is now developing open-source upload and download tools that allow users to easily upload data to App engine or download data from App engine. ”
Link
Windows Azure is expected to go public by the end of this year
While Microsoft's development in Azure has a big gap with expectations, Microsoft is clearly working on it. In early March, the news from Microsoft, Azure is likely to be released at the end of this year.
Steven Martin, senior manager of Microsoft developer Platform Product Management, confirmed the news, saying more details about pricing are expected to be clear in the near future. He revealed that Microsoft will unveil some of the new features of azure at the Mix Web Developers conference in March, including the ability to add support for relational databases to SQL Data services.
"Relational databases are a technology that many developers are very familiar with," Martin says. "Many people have access to relational database technologies, and we hear feedback that people want to keep technology continuous." This from one side also reflects that future applications may be more complex than we think. ”
Currently, Azure is still in the middle of a tight test, with very few user cases, but Microsoft is further enriching the typical scenarios that developers and businesses may use to azure. Last fall, Microsoft also published several user cases: an ERP system developed on Azure, a software that ran COBOL applications on Azure, and a product recall system developed on Azure.
Martin says developers will need to rewrite these programs now if they want to move their original apps to Azure, but Microsoft is working to get those standard Windows Server apps running directly on the cloud, Just as today's azure apps can run smoothly on Windows Server.
"Today, the applications you develop on Azure can run smoothly locally, but not in the reverse." He said the more easily migrated applications to Azure include Web services and. NET application.