


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Clement Pang May 11, 2005
Overview
This document serves as a guide to the inner workings of SkyNet. Focus will be put mainly on how the SkyNet Server works as well as how the SkyNet Client talks to the server. Knowledge of ADO.NET, SQL and COM+ is recommended for people trying to understand the SkyNet Server as these technologies are used heavily in the system.
Main tasks of the SkyNet Server
Main tasks of the SkyNet Client
The Database
In SkyNet, the database is a MSDE (Microsoft Data Engine 2000 Release A) powered relational database with transactions support through MTS. MSDE is a stripped-down version of Microsoft SQL Server Enterprise Edition with the only difference being a reduced concurrent connections limit. This limit is usually not seen in the system as each server has its own database engine and queries are generally less than the maximum it can handle concurrently.
The database contains the following tables
Behaviors are the fundamental means of interaction in SkyNet. Every entity can have an arbitrary number of behaviors attached to it and this table records all the necessary information both for the server and the client to execute them. Information such as whether this behavior needs a GUID or whether this behavior takes in an entity target GUID is stored so that both servers and clients can validate and asks the user for his intentions respectively. Note that behaviors are compiled into the system and what is specified here is nothing but a fully qualified namespace and class name to the actual behavior which is instantiated on-the-fly using Reflection.
The database can be converted to a XML file as well as to a .NET dataset. The dataset (SkyNetModel.xsd inside ServerAssembly) is used extensively to store the state of the world in memory during behavior execution and when changes are needed to propagate across servers.
The SkyNet Server
The SkyNet Server is nothing but a COM+ Component hosted by Windows (dllhost.exe) written using .NET Enterprise Services. It can be treated as a simple object that lives on the server which activates when clients request that behaviors are to be executed.
The requirement for activation and deactivation for a COM+ Component means that the SkyNet Server is unable to store any state information about the world. The only means of it keeping information about the world is through the SQL database backend. This is an important piece of information to keep in mind when developing server-side components in COM+.
The default security of COM+ disables networked transactions. Therefore, after installing both the SkyNet Server and the SkyNet Client, a computer will not be able to join an existing grid hosted on another computer or vice versa. Please refer to the SkyNet Server Grid Configuration document for information on how to properly
receive the changes that occurred during that version change, again using the XML Dataset representation of the model.
Due to .NET Datasets not supporting the idea of a one-way merge, the incoming dataset is merged using a custom method that merges changed entities into the local model of the client in a unidirectional manner. Deleted entities are also sent from the server to the client and would be deleted from the local copy accordingly.