Multitier Server Architecture

From WorldForgeWiki
Jump to: navigation, search

This is proposal for multitier server architecture. Multitier server architecture breaks the monolithic server to several small dedicated components which can be clustered with component specific clustering strategies. Smaller components are easier to implement and components are interchangeable between different implementation families. Ability to deploy components to different computers enables real time components (physics) to run without disturbance from more erratic components (rule engine and AI server). Service register acts as a register for components. All components including master server can be either clustered or provided with backup components which can take over on failure situation.

|                 |                       |             |
|   Hosted by     |        Hosted by      |    Run by   |
|  Organisation   |   Individuals or Org  |   End User  |
|                 |(no persistent storage)|             |
                      |   ai server    |    
                  ---<| rule server    |>
+--------------+ /   /+----------------+ \   +--------+   
| map server   |>   /          |          >-<| client |
+--------------+ \ /  +----------------+ /   +--------+
                  Y--<| physics server |>
+--------------+ /|   +----------------+
| state server |> |
+--------------+  |
| identity server |

|  service register  |----- (all server components register to service register)

AI Server

Runs complex AI scripts for NPCs and is from server perspective similar to regular client. Only exception is that rule server can request AI to run AI scripts for NPCs. AI servers form a pool which is exposed to rule servers as computing pool and used on demand.

Rule Server

Runs the game rules written in some platform independent user friendly scripting language like python. All object state changes are directly updated to state server and transmitted to clients. Rule server caches the game state but any changes are updated to physics server and state server as soon as possible. Physics related state is kept in short time memory in physics server and long term memory is in state server as all other state information. Rule servers are clustered and each rule server governs cubic volume.

Physics Server

Physics server is high performance implementation of the game physics taking care of real time computation. Physics servers are registered to master server where rule server accesses them on demand. Physics servers sole responsibility is to simulate the physics system and update the information regularly to the observers. Physics server is the most bandwidth and cpu intensive component as it can not be efficiently scaled inside the cubic volume it govers. Physics server has to run reliably under heaviest load to avoid mass event lag problems. Each physics server simulates a cubic space. Rule server adds and removes objects to simulation. When object is close to server boundary all related physics servers simulate that object. The one which actually contains the object is the master which others are mirroring. Physics servers negotiate ownership change when an object crosses the boundary. Physics server is written with high performance real time capable language like C#/C++/C/Assembler.

  • Note: C# is not a high performance language.

Map Server

Map server is a map repository. Each server instance governs a given region in the world.

State Server

State servers are pure databases with atlas interface. State servers are registered to master server where rule server accesses them on demand. Each state server governs cubic space and all objects in that area are stored to that state server. Rule server directs the transit of object from state server to state server when it crosses the server boundary.

Identity Server

Identity server handles all account information. It implements identity and access management for the server system. It is accessed via account management messages of the Atlas protocol.

Service Register

Service register contains information about running services and backup services. Services can be singleton services, spatially divided services or pooled services. Singleton services exist only once for the whole game world. Spatially divided services serve given area in the game world. Pooled services have multiple instances which are used through load balancing algorithm (round robin).