GeneralSoftwareArchitecture
From OpenCity
This page describes the general software architecture of the OpenCity project. It shows how the different software layers work together. The preferred client-server architecture is a n-tiers architecture where the clients can talk to one server and the servers can talk between them.
The current software architecture document describes a possible implementation of the software specifications. The solution for each specification should not be detailed here.
A client is a view node in the whole system. Where as a server is a simulation node. The client can switch from one simulation node to another. In other words, it means that the end user who uses the client application can view any simulation node's data. The simulation data is distributed over the simulation nodes in the system.
Contents |
Server architecture layout
Server communication layer
The server communication layer is the top layer in the server architecture stack. It processes the requests from the outside and delivers the answers produced from the inside.
- Windows Communication Foundation service like
Server service
The server service layer completes the server business service with user session handling and server to server communication services.
- Servers handling
- Users sessions
- City DML
- Node DML
- Arc DML
Server business service
The business model offers the system primitives to manipulate the business objects. Those primitives are encapsulated as business services by the server business service layer.
- City insert, update, delete and select (Data Manipulation Language)
- Node DML
- Arc DML
Server business model
The business model implements the business logic and represents the intelligence of the system. It knows how to make the different business elements work together. It processes the business objects which are produced by the object factories.
For a given a business object, the business model knows how to serialize it in a suitable form for storage or transmission over the networks. And in the other way, it knows how to produce a business object from the deserialized data coming from the storage system or the remote networks.
- CityObject
- NodeObject
- ArcObject
Server data model
The data model represents the essential data elements in the system. Those data elements must be easily serialized and deserialized from the storage system. The data model is stupid because it doesn't have any business logic.
- City
- City's name
- Major's name
- City's budget
- City's policy
- ArrowArc
- Source node's identifier
- Destination node's identifier
- Arc value
- Arc
- First node's identifier
- Second node's identifier
- Arc value
- PathNode
- GouvernmentNode
- ResidenceNode
- CommerceNode
- IndustryNode
- Node
- Identifier: universal unique identifier
- World coordinates: x, y, z (in world unit)
- Influence radius: r (in world unit)
Client architecture layout
The client manipulates the instance and aspect elements. A client instance element contains specific values of a server object element. The aspect elements are the client visual representation of the instance's values.
Client communication layer
- Windows Communication Foundation service like
Client service
- Server communication
- CityInstance DML
- NodeInstance DML
- ArcInstance DML
Client business service
- CityInstance DML
- NodeInstance DML
- ArcInstance DML
Client business model
- CityAspect
- NodeAspect
- ArcAspect
Client data model
- CityInstance
- NodeInstance
- ArcInstance
External links
http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/IntroductionToMultiplayerGameProgramming

