Technology changes minds
The first and second parts of this paper are divided into Google App Engine and Amazone Web Services
GAE and AWS (Part 1)
AWS
Application scenarios
AWS should not be PaaS, but IaaS. There are two main reasons why AWS is put here. First, AWS is not a simple IaaS because it provides a large number of supporting management services. Although most of these services are provided through Restful apis, they can be called programmatically. Second, AWS itself also has a distinctive “programmable” service: Lambda service. This service can be embedded in the various services it provides, providing users with the ability to customize the control of these supporting services, so that these services look more like platform PaaS than pure IaaS. AWS is more radical than GAE from the point of view of embedding Lambda, rather than following a traditional Web service existence, and therefore can be used by a wider range of Internet businesses, not just Internet e-commerce customers. Some of the latest Steam hits are reportedly coming to AWS, including Lambda.
Development support
AWS does not have a development framework because its core is designed around its IaaS server EC2. It’s more about the various transparent, web-based optimizations available for EC2. For example, AutoScaling refers to scaling EC2 instances based on usage time and load. It should be added that EC2 virtual machines also support Docker technology, so it can be easily started and migrated. Another service, called ELB, is a more traditional l5-like load balancer.
What really “programs” AWS is their Lambda service. You can program in a variety of languages, including node.js /Java/C#/Python, to write events generated by triggers to handle callbacks. Many of AWS’s services support Lambda, such as S3, DynamoDB, and Kinesis. When a request is received or a state change occurs, these services trigger a variety of events to invoke the user-defined code. For example, when object storage S3 receives data, it triggers code. This function can be very convenient to do the game’s archive and read files. Or the database service DynamoDB can trigger your code when it performs a Put or Get operation on data. Of course, streaming computing services like Kinesis require user code to do off-line statistics or data processing.
Embedding user code into a service, rather than providing a service container for user code, may be a design that requires service IaaS. However, this flexible design also frees users from the “standard development framework”, as a service provider, and does not need to provide a variety of languages and various WEB programming frameworks like Google. As a result of the game server general communication model and Web far apart, there are a large number of active notification, and the demand of the online data feedback, so use the Web that sets the framework for sure can’t meet the demand, but such as AWS, game client can write a simple function of GameServer, such as only do simple radio service, And other storage functions, are in the way of Lambda game logic and storage services together, compared to save trouble.
Operations management
AWS has many more “generic” o&M tools because its primary goal is to sell EC2 virtual machines. One of them is Benstalk, a Web application deployment tool that integrates Git to pull and store your software. This is convenient for customers who simply need to deploy WEB applications. The other tool is called OpsWorks, which is a more general operations deployment tool that looks a lot like Chef and you can use it to deploy any software. These tools work by installing an Agent on your virtual machine (the deployment target machine), which can then accept various deployment or configuration tasks from a centralized software deployment task server. Users can deploy software and modify configurations on one interface, and record the same or different configurations of each server through jSON-formatted data tables, and automate any deployment operations on target machines through tools or customized scripts.
AWS applies the elastic deployment of EC2 VMS and automatic scaling by load to billing. So there’s a service called CloudTrial, which is essentially a pay-as-you-go feature. This is especially good for businesses that are still in the development stage of promotion. There are many independent games or start-up projects abroad that are developed and tested directly on AWS. AWS also provides a so-called CodePipeline tool, which is a continuous integration tool, but the deployment part is integrated on AWS by default. While GAE also has a variety of development tools, offering services directly as continuous integration (CI), combined with cloud services, is very laudable. After all, in the aspect of continuous integration, we still have to set up various server environments, combined with the operation and maintenance system, so as to truly “automatic integration”. With CodePipeline, developers can deploy code directly to an EC2 virtual machine with one click, with automated testing and other integration tasks in between. This saves you the hassle of fiddling with continuous integration software.
Finally, CloudWatch differs in one important way from GAE’s Analytics service in that it focuses on virtual machine data rather than specific services. Another feature of this system is the integration of log generation, collection, monitoring, alarm and report. Can be said to be a general log analysis system. Users can send custom metrics to CloudWatch and set monitoring thresholds so that CloudWatch not only monitors alarms within the range you set, but also stores all these logs and generates statistics and graphs.
All of these services give me the impression that AWS services, while not as “technical” as GAE, are very attractive to use due to their high focus on ease of use. It doesn’t matter what platform or architecture you are, there are a few services that seem to work. And all of these service interfaces are unified interface model, unified interface style, so that people can understand by analogy, learning is not laborious. (Of course, there is also the possibility that there is not too complex functionality.)
Correlation matching
Since AWS’s main product is the EC2 virtual machine for IaaS, its cloud services for online computing are almost non-existent. But there are plenty of other companion services, no less than GAE. They fall broadly into two categories:
-
Storage products
-
S3: Object storage service, directly stored in binary blocks. Some game developers use it directly to store archived user data.
-
EFS: Distributed file system compatible with the ancient NFS standard.
-
CloudFront: CDN service with global nodes. CDN domestic users are familiar with it, but the advantage of AWS lies in its global computer room and bandwidth advantages.
-
RDS: This section is the “relational database” service class, including MySQL \ Orcale \ SQL Server \ PostgreSQL \ Aurora database servers. This service is typically of the same type as the PaaS platform, but AWS also provides it. And finally, this Aurora database, which AWS developed itself, is compatible with MySQL, which he says is much faster than MySQL.
-
DynamoDB: A NoSQL database that is Schemeless, meaning no pre-built data structures are required. You can use a Hash search (presumably matching equals signs) or a Range search (presumably matching greater than and less than signs), which many NoSQL don’t have.
-
ElastiCache: cluster of cache servers like Memcached/Redis. Here AWS directly provides the clustering function, there is no need to find a way to build Redis cluster. This is what a typical PaaS service provider would provide.
-
SQS: Distributed message queue service. This service is very special. Generally speaking, message queue service is used for large-scale server systems, which need to distribute computing tasks on multiple hardware (virtual machines) to run, and need to communicate with each other, so this kind of message queue service is needed. Such as open source ActiveMQ or ZeroMQ, but directly made into distributed, or relatively rare. Instead of maintaining your own message queue service cluster, you can just buy EC2 to add compute nodes. The problem is that the interface to the service is Restful, meaning http-based, so latency should be an issue. If used in a game, it is expected that the service will only be suitable for some actions with less latency and less trigger, such as the user entering the game room from the game hall.
-
Offline computing products
-
EMR: Logs used to analyze all the services provided by AWS. Is a powerful log statistical analysis system.
-
Kinesis: A Streaming computing system similar to Storm/Spark Streaming. Note that it is also logs generated by direct calls to all AWS services. This is a common feature of AWS offline computing products, that is, services of the “system” class can be called directly, without the need for users to convert various interfaces or formats.
-
Machine Learning: a well-known Machine Learning service, which can also be used as a Learning and testing data set from the logs of all AWS services. In keeping with AWS’s ease-of-use design, the service has a number of built-in learning models, many of which do not require users to write their own learning formulas. It simply requires developers to use its interactive visual tools to configure and run machine learning tasks.
-
Redshift: a pb-level data warehouse, which is a columnar storage system.
conclusion
As an important concept in the “cloud” era, PaaS is far less widely used in real business than IaaS and SaaS. The reason, I think, is nothing more than its limited flexibility. Textbook PaaS platforms like GAE, for example, are constrained by a large Web services framework, despite offering a variety of managed services and language frameworks. In addition, background association service and PaaS service are stored in a sandbox, which provides a good ability of automatic operation and maintenance, but also causes a lot of inconvenience. With the exception of some very simple, typical Internet services, many other services may need to break through these limitations to some extent. On the other hand, this kind of PaaS is very convenient for standard Web services, and requires almost no maintenance at all.
However, this kind of PaaS represented by AWS provides a large number of operation and maintenance tools. In fact, users still need to do a lot of operation and maintenance work by themselves. But it also provides great flexibility: you can use AWS in an IaaS model. At the same time, AWS also provides a lot of supporting management services for PaaS. Users can also deploy and configure these services without their own. It can be said that AWS combines the flexibility of IaaS with the power of PaaS. However, AWS is not seamless. Lambda service is not a common industry standard. If you implement a lot of business code in Lambda way, you can’t switch to another cloud service provider. In addition, AWS services are mostly Restful apis, so the latency and bandwidth usage caused by the network are not suitable for online games with a lot of interaction.
Finally, looking into the development of PaaS, I think general PaaS has no future. Because business models vary so much, generality on models inevitably leads to functional limitations and usability certainty. Therefore, PaaS should be broken down by different business areas. At present, there are three major business areas of Internet business: e-commerce, games and resource communities (such as B station, Toutiao, various FM and cloud music apps). Each of these three businesses has its own distinct model and requirement differences.
For example, e-commerce services, generally called “business flow” is an important requirement, and attaches great importance to storage security, but the latency requirements are very low; The game class cannot accept one-way HTTP protocol, and most of them need to be combined with the game client engine (Unity/Unreal etc.). The latency requirement is very high, most of them can not tolerate more than 300ms, as long as the storage can be unlimited expansion, security does not need to reach financial level. Community classes are hard requirements for large file storage distributions and require a wider range of deployment locations, but the business logic is generally less complex.
So it is difficult to through simple primitive a Web App application framework, put the three aspects of the business requirements are boxes, and in addition to handling HTTP requests, there are a lot of business common functions, can be sold as a service to make, such as the order of the electricity system, game synchronization service, community on the basis of function and so on.
Finally, the conclusion is that PaaS service must be based on the business domain, oriented to the general logic in the business, in order to really do a good PaaS cloud.
Shameless small advertising, Tencent game services, designed for game development services: http://gcloud.qq.com/
[Disclaimer] I do not have any money for the above advertisement
Look back at past highlights:
Distributed essentialism
Understand object-oriented coding
Classic game server architecture
In-depth understanding of digital technology theory
High-performance server architecture solution
Ten ways to improve programmer productivity
How to be a qualified technical director
Must-read for Architects: Classic Software Architecture Patterns
Thank you for your reading, if you feel that this article has so little effect on you, please move your finger to forward or share to the moments of friends. If you have different opinions, welcome to discuss the background message.
IOS user tip: Buy the author a soda (2 yuan)