Introduction to Google's cloud computing solution: Google App Engine)

Source: Internet
Author: User

Google App Engine allows you to run your network applications on Google's infrastructure. App Engine Applications are easy to build and maintain, and can be easily expanded based on your traffic and data storage needs. With the Google App Engine, you no longer need to maintain the server: you only need to upload your application, it can immediately provide services for your users.

You can use the free Domain Name on the appspot.com domain to provide services for your application, or use the Google enterprise application suite to provide services for it from your own domain. You can share your applications with people all over the world, or restrict access to your applications only by members in your organization.

You can start using the app engine for free. You can register a free account to develop and publish your applications for sharing across the world, without any fees or responsibilities. Free accounts can use up to 500 mb of persistent storage space, as well as ultra-high CPU and bandwidth that can support about 5 million page views per month.

Only a free account is provided during the pre-release of the Google App Engine. You will soon be able to purchase other computing resources.

Application Environment
With the Google App Engine, you can easily build applications that can run securely even when the load is heavy and the data volume is large. This environment includes the following features:

Dynamic network service, providing full support for common network technologies
Persistent storage space that supports query, classification, and transactions
Automatic scaling and load balancing
API used to authenticate users and send emails using Google accounts
A fully functional local development environment that can simulate Google App Engine on your computer
Google App Engine Applications are implemented using the python programming language. The runtime environment includes the complete Python language and most Python standard libraries.

Currently, Google App Engine only supports python, but we hope it will support more languages in the future.

Sandbox
Applications run in a secure environment, which only provides limited access to the basic operating system. These restrictions allow the App Engine to distribute application network requests among multiple servers, and enable and disable the server to meet the traffic requirements. Sandbox isolates your applications in its own secure and reliable environment, which has nothing to do with the hardware, operating system, and physical location of the network server.

Examples of restrictions on the secure sandbox environment include:

Applications can only access other computers on the Internet through the web page capture and email service and API. Other computers can only connect to the application by making HTTP (or HTTPS) requests on the standard port.
Applications cannot be written to the file system. Applications can only read files uploaded by application code. The application must use the App Engine database to store all data that persists between requests.
The application code runs only in response to a network request and must return response data within seconds. The request processing program cannot generate sub-processes or execute code after the response is sent.
Python Runtime Environment
App Engine provides a runtime environment using the python programming language. Future versions will consider using other programming languages and runtime environment configurations.

Python 2.5.2 is used in the python runtime environment.

This environment includes the python standard library. Of course, you cannot call library methods that violate the sandbox restrictions, for example, try to open a socket or write to a file. For convenience, multiple modules in the standard library that are not supported by the runtime environment have been disabled, and the Code for importing these modules will throw an error.

The application code can only be written in Python. Code with extensions written in C is not supported.

The Python environment provides a wide range of Python APIs for databases, Google accounts, website crawling, and email services. App Engine also provides a simple Python network application framework called webapp, allowing you to easily start building applications.

For convenience, App Engine also includes Django network application framework 0.96.1. Note that the App Engine database is not a required relational database for some Django components. Some components (such as the Django template engine) work according to the documented program, while other components need to do more work. For instructions on using Django with App Engine, see the article.

As long as other third-party libraries are implemented in Python only and do not require any unsupported standard library modules, you can use your applications to upload these libraries.

For more information about the python runtime environment, see Python runtime environment.

Database
App Engine provides a powerful Distributed Data Storage Service, including query engine and transaction functions. Just as the distributed network server increases with traffic, the distributed database also increases with data.

The App Engine database is different from the traditional relational database. Data Objects (or [entities]) have one class and one group of attributes. You can search for objects of the specified type filtered and categorized by attribute values. The property value can be any of the supported property value types.

The Python API of the database includes a data modeling interface that can define the object structure of the database. The data model can indicate that the attribute value must be within the specified range. If no value is specified, the default value can also be provided. Your application can provide a more or less structure to the data as needed.

The database uses Optimistic Locking for concurrency control. If another process tries to update an entity and the entity is in a transaction that retries at a fixed number of times, the entity is updated. An application can perform multiple database operations in a transaction (all or all failed to ensure data integrity ).

Databases use their distributed networks to implement transactions using [entity groups. A transaction operates on entities in a group. Objects in the same group are stored together to efficiently execute transactions. Applications can assign objects to groups when they are created.

For more information about databases, see database api reference.

Google account
App Engine includes service APIs for integration with Google accounts. The application allows you to log on to your Google account and access the email addresses and displayed names associated with the account. Using a Google account allows you to start using your application more quickly, because you do not need to create a new account. Google accounts also save the trouble of implementing the user account system only for your applications.

If your application is running under Google Enterprise Application Suite, it can use the same features as members of your organization and members of the Google Enterprise Application Suite account.

The user API can also tell the application whether the current user is the registration administrator of the application. In this way, only the administrator can access the region on your site.

For more information about integration with a Google account, see user api reference.

App Engine service
App Engine provides a variety of services that allow you to perform common operations while managing applications. The following APIs are provided to access these services:

Web crawling
Applications can use the web address of the App Engine to capture services to access resources on the Internet, such as network services or other data. The Web crawling service uses a high-speed Google infrastructure used to search Web pages for many other Google products to retrieve network resources. For more information about the web page capture service, see the web page capture api reference.

Email
Applications can use the mail service of App Engine to send emails. Email Service uses Google infrastructure to send emails. For more information about the mail service, see the mail api reference.

Memcache
Memcache provides a high-performance memory key-value cache for your applications. You can access this cache through multiple instances of the application. Memcache is useful for data that does not require the persistent storage and transaction functions of the database, such as temporary data or data that is replicated from the database to the cache for high-speed access. For more information about the memcache service, see the memcache api reference.

Image operations
Image Service allows your applications to operate images. This API allows you to scale, crop, rotate, and flip JPEG and PNG images. For more information about image operations, see image api reference.

Development Workflow
The App Engine software development kit (SDK) includes network server applications that can simulate all App Engine Services on your local computer. This SDK includes all the APIs and libraries in the App Engine. The network server can also simulate a secure sandbox environment, including checking whether a disabled module is imported and attempting to access system resources that are not allowed.

The Python SDK is fully implemented using Python and can run on any platform with Python 2.5 installed, including windows, Mac OS X, and Linux. You can obtain python for your system on the python website. This SDK is provided as a zip file and also provides installation programs for Windows and Mac OS X.

You can download the SDK here.

This SDK also includes tools that can upload your applications to the App Engine. After the code, static files, and configuration files of your application are created, you can run the tool to upload data. This tool will prompt you to provide the email address and password of your Google account.

When you build a new major release of an application running on the app engine, you can upload the new release as a new version. Before you use the new version, the old version can continue to provide services to users. You can test the new version on the App Engine while the old version is still running.

The Management Console is a network-based interface used to manage applications running on the App Engine. You can use it to create new applications, configure domain names, change the current version of your applications, check access permissions and error logs, and browse application databases.

Limits and limits
Creating an App Engine application is not only simple, but also free! You can create an account and publish an application that users can use immediately without any fees or responsibilities. Applications published using a free account can use up to 500 mb of storage space and up to 5 million page views per month.

In this preview, only free accounts are provided. You will soon be able to purchase other computing resources at competitive market prices. After the preview period, the free account can continue to use.

You can register up to three applications in this preview.

Application resource restrictions ([quotas]) are constantly refreshed. If your application reaches a time-based quota (for example, bandwidth), the quota will be refreshed immediately at the specified rate. A fixed quota (such as a bucket) can only be mitigated by reducing the usage.

Some features impose limits unrelated to the limit to protect system stability. For example, when an application is called to provide services for a network request, the application must respond within several seconds. If the application takes too long, the process is terminated and the server returns the error code to the user. Response timeout is dynamic. If the request handler times out frequently, the request timeout can be shortened to save resources.

Another example of service restrictions is the number of returned results. A query can return up to 1,000 results. For a query that should have returned more results, only the maximum value can be returned. In this case, it is impossible for a request to execute such a query to return a request before timeout, but the restriction still exists to save database resources.

Attempts to corrupt or abuse the limit (for example, operating applications on multiple accounts at the same time) violate the terms of service and may cause the application to be disabled or the account to close.

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.