The shift from game development to application development

Source: Internet
Author: User

from 2011 University to the end of 2014, this period of time my software development career is in the game circle, although after all did not make anything, but at least also mixed to the location of the server main path, the game development of those days, is probably the fastest progress of the day, Memories of their own blog has a relatively high quality of the article is that period of time to write, especially in the face of on-line and large concurrency, the understanding of software and code is different from just graduated that will understand, I think it is also the project to promote growth it!

Time came to the end of 2014 years, with their interest in game development and the rapid deepening of the conflict between the planning scheme, slowly produced the idea of leaving the industry, so in that opportunity, I put down all the application of the development!

Remember the first application is a mobile phone application, is probably a similar to the application of Weibo, of course, the function should be much weaker; after simply being brought into the app side, it is impossible to find the logic of the server side completely; and finally, an example of a redis microblog on the internet. On the basis of this example. The app's database doesn't use MySQL, but it uses redis directly, and I'm not going to do it anyway. MySQL is not used mainly because of their own is not familiar with MySQL, the game when the use of the database is in all nosql or simple MySQL state. For example, we will only design a player table, many people may say that the player is not many attributes? A table how enough, in fact, we are a lot of players of the data encapsulated into JSON,BASE64 conversion, zip compression, has been saved in the text form in the MySQL table. In this way, almost two or three tables in MySQL can save all the data in the game, but in the application layer it is not the same, a micro-mall almost use nearly 100 tables, but also to deal with the relationship between the tables, trying to wait.

As a game server, writing logic rarely deals with databases, but it is almost impossible to leave a database for writing applications. Write games, such as a Help system, into the help of all the people, are logged in players, the player data has been loaded into memory, and his interaction or other players are the other players in this scene, the data has already been loaded into memory, any fight, interaction, mobile and other logical processing, is the processing of in-memory data and logic. Do the application is not the same, the application of the interaction between the carrier into a database, and no longer memory, if User A wants to get user B behavior, then User B's behavior is first and foremost to be stored in the database. This is the most painful and difficult thing to understand when moving from a game server to WebApp, at least in my personal case. Remember your first PHP small application, the MySQL connection made a global variable, so that each connection can be shared, know that the MySQL connection is not enough to use the situation.

For the game, the database is just a place where the player registers the player's data, that is, it is not the top priority, but it is not the same for the application; The database can also be used to drive logic, such as triggers, cursors, and so on, in addition to preserving all data in the application. such as ranking using order and so on. So this makes the game programmer see a business or a module, first think about how to use the data structure. And for an application programmer to see a business and a module first think of how to design the database; I now see a lot of application developers to deal with a logic, the first thought is not from the data structure, but first change the data table design. For game programmers, it seems that the natural rejection of more than one SQL operation, can be solved in memory, not in the database.

In the game development, is the NoSQL as the main database design, in my first two years of development of the game is to use MONGO as the main database; However, in applications, NoSQL is used as a solution for specific modules, or to cache some common data. For example, the mall system, for frequently visited goods, we will save it to Redis, for the home page, we also directly to the home page of HTML+CSS data to the Redis, but in the application of NoSQL as the primary database, encountered complex logic, such as commodity sales statistics or order statistics and other requirements, with Redis will be reluctant to.

Software development is an industry, but the industry within the different application layer seems to be GE-like, with different development principles and criteria; from one application layer to another application layer, we should also take a humble stance, first of all into, and then familiar with, and then think about the ability to play their own good!

The shift from game development to application development

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.