What is Sina App Engine
Sina App Engine (SAE) was the first public cloud computing platform (http://sae.sina.com.cn), which was launched in-house in August 2009, and was officially unveiled on November 3, 2009, and the SAE is the core component of Sina's cloud computing strategy.
SAE as a domestic public cloud computing, from the beginning of development to absorb Google, Amazon and other foreign companies of the successful technical experience of public cloud computing, and soon launched a different from their own characteristics of the cloud computing platform. SAE selection in the most popular web development language PHP as the preferred support language, Web developers can be linux/mac/windows on the SVN, SDK or Web version of the online Code Editor for development, deployment, debugging, team development can also be a member collaboration, Different roles have different permissions for the code, the project, and the SAE provides a range of distributed computing, storage services for developers to use, including Distributed file storage, distributed database clustering, distributed caching, distributed timing services, and so on, which will significantly reduce developer costs. At the same time, because of the high reliability of SAE's overall architecture and the brand guarantee of Sina, the operation risk of the developer is greatly reduced. In addition, as a typical cloud computing, the SAE uses the billing concept "paid for, paid for," and calculates the resource consumption (CPU, memory, disk, etc.) of each application accurately through the journal and Statistical Center.
In short, the SAE is a simple and efficient distributed Web services development, operating platform.
The core strengths of SAE
There are two basic target users for SAE, one is web developer and the other is ordinary internet Internet.
For Web developers, the benefits of the SAE are:
· Lower hardware costs, no need to buy equipment upfront, and take greater risk of investment
· The cost of development is lower, the SAE provides many services for developers to use, developers need not repeat development, including queues, databases, caching, timing, verification code, counters, almost all the areas of web development. For developers of specific open platforms, such as Sina Weibo developers, the SAE has integrated a complete OPENAPI package, minimizing developer costs. It is worth mentioning that the SAE developers have now formed a good communication atmosphere, in the feedback Center, the SAE official group, the SAE official micro-group can see a lot of enthusiastic developers together to improve
· Lower cost of operation, the application of SAE does not care about hardware maintenance, service monitoring, data disaster and other operations, the SAE will be through its highly reliable architecture and convenient monitoring pages for users to reduce operational costs to the minimum scalability more strong, the service in the SAE without concern about the surge in service pressure, such as the expansion of operations, SAE Automatic Support Service extension
· More secure and reliable, SAE automatically provides SQL statement performance analysis, front-end protection against attacks, code check, and other functions, all applications in the SAE for multiple engine room disaster-tolerant deployment, more secure than the traditional deployment mode, and SAE service SLA to achieve customer service quality commitment
For ordinary Internet users, the SAE can:
Use the recommended application of a key to install Web applications, ordinary users do not have to code, you can have their own buy, blog, microblogging, wiki, etc.
SAE Overall architecture
SAE from the architecture of layered design, from the top down for the reverse proxy layer, Routing logic layer, Web computing service pool. And from the Web Computing Service layer extends the SAE-affiliated distributed computing services and distributed storage services, which are divided into synchronous computing services, asynchronous computing services, persistent storage services, and non-persistent storage services. All services to the journal and Statistical Center report, refer to the following figure:
7-Layer Reverse proxy layer: HTTP reverse proxy, in the outermost, responsible for responding to the user's HTTP request, analysis request, and forward to the backend Web service pool, and provide load balancing, health checks and other functions.
Service Routing layer: The logical layer, which is responsible for fast mapping (O (1) time complexity) to the corresponding Web service pool and mapping to the appropriate hardware path, based on the unique identity of the request. If a mapping relationship is found to be non-existent or incorrect, a corresponding error message is given. This layer hides a lot of specific address information for the user so that the developer does not care about the actual distribution of the service.
Web Service pool: A Web service pool of different features. Each Web service pool is actually composed of a set of Apache (PHP), which provide different levels of service according to different SLAs. Each Web service process actually handles the user's HTTP request, the process runs in the HTTP service sandbox, and the PHP parsing engine that runs in the SAE sandbox is also embedded. The user's code eventually invokes various services through the interface.
Journal and Statistics Center: responsible for statistics and resource billing for all services used by users, and set the minute quota to determine if there is an abnormal use. Minute quotas describe the speed at which resources are consumed, when the speed of resource consumption reaches an early warning threshold, the SAE notification system sends a warning to the user in advance to alert the user that the application may be problematic for use on a service, requiring attention or processing, and that the quota system is one of the measures that SAE uses to ensure the stability of the platform. The Log Center is responsible for summarizing and backing up the logs of all users ' services and providing a retrieval query service.
All kinds of distributed services: SAE provides a wide range of services that can cover almost all aspects of Web application development, and users can easily invoke them via stdlib (which can be understood as the SAE PHP version of the STL).
SAE Features
Development:
· Code checking to help check for bad functions and help migrate
· Code deployment
· Distributed database
· Distributed File storage
· Distributed caching
· Various ancillary distributed services, including images, timing, task queues, mail, counters, etc.
· Docking multiple open platforms, such as Sina Weibo development platform
· Code tuning, provided through XHPROF
· Database optimization, available through RDC
· Team collaboration, you can invite friends to join projects with different permissions
· Code Versioning (Plan support)
Operation:
· Application packaging, extending through our application wizards
· logs, including access logs, error logs, etc.
· Resource report, consume the statistics of the SAE resources
· Service monitoring, monitoring service status
· Data migration, including database import, database export, etc.
SAE offers services and two major features
Services provided by SAE
SAE currently offers more than 10 services, as a whole is divided into computational and storage, the calculation includes synchronous and asynchronous computation, while the storage type is divided into persistent and non-persistent storage. The specific list is as follows:
Service Name
Type
Description
http+php
Synchronous calculation
Apache and Zend with SAE sandbox provide Web computing services to users
Storage
Persistent storage
Provides distributed file storage
Memcache
Non-persistent storage
Provides distributed caching services
RDC
Persistent storage
Distributed database cluster, providing MySQL service
Taskqueue
Asynchronous computation
Asynchronous offline Lightweight Task queue, HTTP method call
Deferredjob
Asynchronous computation
Asynchronous offline heavyweight task queue, System-by-way call
Counter
Persistent storage
Counter Service
Rankdb
Persistent storage distributed ranking Service
Kvdb
Persistent storage distributed key/value storage Services
Cron
Asynchronous computation
Distributed Timing Service
Fetchurl
Synchronous calculation
Distributed Crawl Services
TmpFS
Non-persistent storage
Provides temporary file storage, file lifecycle within a session, the HTTP request end file automatically disappears
AppConfig
Provides application configuration features to replace Apache htaccess
Mail
Asynchronous computation
Mail delivery service
Image
Synchronous calculation
Image processing Services
Xhprof
Synchronous calculation
The powerful PHP tuning tool that Facebook offers
SVN
Persistent storage
Entry point for user code deployment: Https://svn.sianapp.com/yourapp
Online Codeeditor
Persistent storage
Online Code Editor, edited code saved, entered automatically into SVN and deployed to the Web server
Two characteristics: Extensibility and reliability
· Extensibility
SAE in the scalability of the service is basically dynamic scalability of the idea that resources and IDs do not have strong correspondence, the user as a service users to use the SAE service.
· Reliability
In computational reliability, SAE mainly relies on the deployment of multiple points to achieve reliability, the consistency of the calculation of multiple nodes, SAE has distributed lock service provides better fault-tolerant logic than Paxos.
In terms of data reliability, all of the SAE's data is met through redundant storage to meet SLAs. The SAE achieves multiple data redundancy through proactive replication and passive replication.
The difference between SAE and virtual host
· Traditional service hosting is oriented to hardware software equipment, users are also the use of equipment, and SAE-oriented services, users get the right to use the service.
· Traditional service hosting is not for developers, developers can not enjoy the fun of development, and the SAE an important user is the web Developer, developers on its online debugging, log analysis, collaborative sharing and other functions of web development.
· Traditional service hosting does not provide distributed system solutions, and the SAE provides a complete solution for distributed Web services, which includes not only distributed databases, distributed file systems, but also distributed timer systems, web crawler services, and image processing services.
· Traditional service hosting does not solve domain name problems, users often worry about domain name application, and SAE users will automatically get under the Sinaapp level two domain name, the SAE also supports domain name CNAME.
· Traditional service hosting does not guarantee SLAs (Service level agreement), and the cost of hardware failures is largely borne by the user, while the SAE guarantees users ' SLAs, and users ' Web services automatically enjoy highly redundant front-end servers, automatic load balancing systems, automatic service extensions, Service automatic contraction and other functions.
· The traditional service trusteeship uses the prepayment method, the expense is fixed and has no direct relation with the actual usage condition, but the SAE uses the pre-recharge method, "pays namely uses, pays only uses", the Web service all losses all provides the report inquiry and the bill summary, lets the user at a glance.
SAE public cloud computing differs from the traditional virtual hosts in the following table.
Class Item
SAE
VPS
Core users
Web Developer
No core user
How to use
Service use
Equipment rental
Target
Strive to cover all requirements of Web services, provide a variety of services for developers to use
Basic Requirements only
SLA (Service Commitment)
High reliability and strict service commitment
Change according to service provider, no strict agreement
Billing method
Paid is used, only used
Prepaid, no accurate billing
Why do we have to be SAE
The Sina APP Engine project, which began in August 2009, aims to provide a complete solution for distributed Web Services in the cloud computing era. We develop the SAE mainly for internal and external considerations:
Internally, Sina began a long time ago on the private cloud development and practice, so in order to further improve the utilization of the company's resources, improve the efficiency of web development, reduce the cost of web operations, decided that we want to develop the SAE.
External, Amazon, Google are foreign successful to provide public cloud computing services company, SAE also want to use cloud computing such a trend, for domestic customers to provide cloud computing distributed Web services development, operating platform.
SAE's goals and development
Although cloud computing is a term, it actually has a history of 4 or 5 years abroad. In the 2006, Amazon launched the public cloud computing, represented by EC2, and has achieved massive profits, and in 2008 Google launched the public cloud computing, represented by Google App engine. Domestic cloud computing has always been very bad, the major internet companies are in the publicity, but the real technical strength to do and the public use of less.
In fact, starting from 2004, Sina began the private cloud direction of research and practice, based on the dynamic application platform has now supported the vast majority of Sina internal business. Since 2008, Sina has launched a "wave cloud" of the Public cloud Computing program, has developed a distributed queue services, Peer-to-peer file system, distributed computing framework, such as a series of basic services. The actual SAE is the product of the "wave cloud" strategy.
The SAE begins with architectural design and code writing to define its own two goals:
· Do the public cloud computing platform. The public cloud is different from the private cloud, emphasizing security and reliability, which puts more stringent requirements on the overall architecture design and technology implementation
· Provide a complete solution for distributed Web services. SAE strives to provide all the services that developers use to develop Web applications.
After a year of technical team development, SAE has now provided more than 10 kinds of services, as a whole is divided into computational and storage type, the calculation includes synchronous and asynchronous computation, while the storage type is divided into persistent and non-persistent storage. The specific list is as follows:
SAE on November 3, 2009 released the ALPHA1 version, February 1, 2010 released the ALPHA2 version, September 1, 2010 released a beta version, May 17, 2011 officially open registration.