Four modes of operation are currently available for the Google App Engine: Go, Java, Python, and PHP.
Not only are these the only available time intervals, but you are also limited by the language capabilities. Many of the traditionally available subsystems are not provided with the help of the scale of your web application. The primary examples on the page you specified indicate that opening sockets or writing to the file system is prohibited. Another common limitation is threads or performing calculations that take more than a minute of wall clock time.
Sandbox
Applications run in a secure environment that provides limited access to the underlying operating system. These restrictions allow App Engine to distribute web requests for an application across multiple servers and start and stop servers to meet traffic requirements. The sandbox isolates your application in its own safe and reliable environment, which does not depend on the hardware, operating system or physical location of the web server.
Examples of sandbox environment restrictions:
- The application can only access other computers on the Internet through the provided URL selection and email services. Other computers can only connect to the application by making HTTP (or HTTPS) requests on standard ports.
- Applications cannot be written to the file system in any runtime environment. An application can read files, but only files downloaded with application code. The application must use the App Engine data store, memcache, or other services for all data that is stored between requests. Python 2.7 lets you read, write, and modify bytecode.
- The application code is launched only in response to a web request, a task in the queue, or a scheduled task and in any case should return response data within 60 seconds. The request handler cannot call the subprocess or execute the code after sending the response.
The trick for the Google App Engine is to write a single-threaded application based on the scalable services they provide. This is a pretty paradigm associated with traditional C / C ++ application development, because you need to use the Google mechanism to store data, access other resources on the Internet, send and receive email, and cache. The reason for this is to eliminate bottlenecks in your application, so a large number of instances of your application can be called up and broken upon request.
Porting a traditional C / C ++ application to GAE (and many other SaaS) is likely to require so much refactoring that you need to rewrite it to take advantage of the benefits you can make with the SaaS platform.
GilbertErik
source share