Chapter 2 flexible Architecture Design
3.1 Introduction
Interactive behavior makes scaling of such system infrastructure more complex. The Darkstar Project is a challenge to the needs of these game and virtual world creators. This project will be undertaken by a research team at Sun labs and will be continuously explored in the field of architecture scalability.
3.2 background
This kind of application needs to start from a very small system, and then increase processing capability as the number of users increases, and finally decrease with the decline in game interest.
Processing capability. this is consistent with the features of the distributed system. In a distributed system, we can add (reasonably small) machines as requests grow and remove machines when requests fall. from the very beginning, we know that the overall architecture must be a distributed system. MMO and the virtual world should be ideal candidates for dual chips and distributed systems.
3.2.1 primary goal
The primary goal of this architecture. The need for scalability shows that the system should be distributed and concurrent, but we need to provide a much simpler programming model for game developers. Simply put, the goal is the game.ProgramThe worker should take the system into a single machine and run a thread. All the mechanisms allowed to be deployed on multithreading and multi-computer should be considered by the infrastructure of the Darkstar project.
3.2.2 game world
The environment of MMO and the falsely reported world begins with a very fat client. Most tasks only access a small amount of status data on the server, but about half of the data they access will be rewritten.
3.2.3 latency is an enemy
In an enterprise environment, the goal is to manage the business. If the total throughput is improved, a slight delay in processing is acceptable. in the MMO and virtual world environments, the goal is to be happy, while delay is the enemy of happiness. therefore, the infrastructure of MMO or the virtual world needs to be designed around the need to limit latency as much as possible, even at the cost of throughput,
3.3 Architecture
Some basic services provided by the Darkstar project are similar to services of the classic operating system. They support server access to persistent storage, scheduling, and task execution in the game or virtual world, communicates with clients in the game or virtual world.
3. macro structure of 3.1
3.3.2 basic services
The basic service is data scrvice. games or virtual worlds use it to store, read, and operate all persistent data.
The second stack-level service is 'Task service', which is used to schedule or execute tasks.
3.3.3 Communication Service
3.3.4 task portability
3.4 thoughts on Architecture
3.4.1 parallelism and latency
3.4.2 bet on the future
Build a multi-thread-centered architecture. Future chip design will focus on more cores
3.4.3 simplify the work of programmers
While supporting multi-thread and distributed game products, a single-thread development model is provided for programmers.