Architecture beauty (III) (Summary)

Source: Internet
Author: User
Chapter 3: elastic architecture design 3.1

1.Discuss MMO(Massively Multiplayer Online Games) and virtual worldArchitecture: more scalability required

2.Principles and features: Function diversity, conceptual integrity, growth adaptability;Structure: Dependency and data access

3.2 background

1. The system architecture must adapt to the environment, including applications using the architecture.ProgramAnd the programmers who use this architecture, and the resulting system constraints.

2. Darkstar project: when creating a Darkstar architecture, the first thing is that all the architectures designed for scalability must contain multiple machines. The overall architecture must be a distributed system. As requests grow, machines are added and removed when requests drop.

3. Requirements for scalability indicate that the system should be distributed and concurrent, but a simple multi-programming model should be provided for developers. The goal is that game programmers should regard the system as a single machine and run a thread. All the mechanisms allowed to be deployed on multithreading and multi-computer should be considered by the Basic settings of the Darkstar project.

4.MMO(Massively Multiplayer Online Games) and virtual worldDifferences from common web applications:

A) The common Web is a thin client, while the MMO is a fat client. The real work of the server is to save the real state of the shared world.

B) Data Access Mode: Generally, 90% of the data in an enterprise is read-only. Most tasks access a large amount of data and then rewrite a small amount of data; most jobs in MMO only access a small amount of status data, but about 50% of the data they access will be rewritten.

C) in an enterprise environment, if the total throughput is improved, a little delay is acceptable. MMO needs to be designed around as much latency as possible, even at the cost of throughput.

3.3 Architecture

1. Build a system with a group of interconnected services. Each service can be described using an interface, so that the program using the service will not be affected by the underlying implementation changes.

2. basic Structure of a game or virtual world based on the infrastructure of the Darkstar project: Some servers constitute the backend of the game or virtual world, and each server runs a set of copies of the selected service (called the Darkstar stack) and a copy of the game logic. The client connects to a server and interacts with the abstract representation of the world saved by the server.

3. Darkstar is coordinated by a group of meta-services (meta-services are a group of network access services that are invisible to programmers ).

4. for programmers in the Darkstar project, the visible architecture is a set of services contained in the stack. The complete set of services can be configured, but four basic services must exist, which constitute the core of the operating environment.

5. Darkstar Stack

6. Basic services: the most basic services in stack-level service stations are data services: Save, read, and operate on all persistent data.

7. The service on the Second stack layer is the "Task Service", which is used to schedule or execute tasks. Programmers will see a single task generated by the event or server logic, but at the underlying layer, the basic services of Darkstar are scheduling the most tasks as much as possible. This concurrency leads to data competition. The "Task Service" and "Data Service" need to collaborate to deal with competition: each task scheduled by the "Task Service" is packaged in a transaction.

8. Communication Service:

A) Session Service: After logon, a session is established between the client and the server. The server listens to messages sent by the client through a session to parse the message content. Determine what task is generated to respond to the message. The client receives responses from the server through a session. The session also ensures that the message order is maintained.

B) channel Service: one-to-many communication mechanism

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.