「Extensions:Uni-Verse/Alternative Verse Server」の版間の差分
細 (Uni-Verse/Alternative Verse Server moved to Extensions:Uni-Verse/Alternative Verse Server: moving to Extensions:) |
細 (1版 をインポートしました) |
(相違点なし)
|
2018年6月29日 (金) 02:51時点における最新版
Introduction
Within the Uni-Verse project an Alternative Verse Server was developed. It was develiped using the GUI toolkit wxWidgets [1] which is platform independent. The Alternative Verse Server uses multiple threads to enable an asynchronous internal communication between the Verse interface, the Verse command interpreter and the data storage. For storage mostly stl containers like vectors or hash_maps are used for fast and efficient access.
Libraries
The server was developed in a modular way using a number of libraries connected together by the main application. These libraries are:
- VS2Common: A library containing global defines and globally used objects
- VS2System: All objects and tools needed within the server system, e.g. threads, lists, id-manager etc.
- VS2Network: The servers connection to Verse and the network handling
- VS2Storage: The data storage of the server containing project management functionality
- VS2CommandProcessor: The interpreter of the Verse commands that decides for every command what will happen if such a command arrives.
- VS2Admin: A library containing functionality for user management. The library uses a data base connection to read user data.
- VS2GUI: User interface of the Alternative Verse Server.
How it works
The server uses VerseCommands for internal communication between the different. for every Verse callback one VerseCommand is created which contains all data of the Verse callback. The callbacks are triggered by a worker thread that listens to Verse. Optionally more than one worker could be used if needed.
The Network library copies all Verse callback data into a corresponding VerseCommand and sends it to the command queue of the internal connection class the command is coming from. If the command queue contains data the internal command processor is triggered by an event to read out the queue and process the commands.
The command processor library contains the intelligence what to do with which command and how to react back to the clients. On the other side it triggers the storage library to save data if needed. If a command requires a send-back or to send commands to other connected clients the command processor generates these Verse commands and sends them back to the network library for sending via a command queue for outgoing commands. The network worker thread takes a look into that queue everytime it triggers Verse for data. If there are commands for sending to the connection currently set the network worker thread does that.
User Interface
Using wxWidgets a user interface for the server was established. The library VS2GUI contains the user interface classes. The user interface provides the user with information about the currently connected users, the currently established projects, the nodes within the projects and the data the different nodes are containing. The menu item Options contains a possiblity to steer the Log-properties of the server. Several Log-Levels are defined from No Logging to Debug and Message Logging providing especially developers with more information what currently happens within the server. Note that heavy logging will drop the performance of the server.
Projects
The Alternative Verse Server has the possibility to save Verse data into different projects. When the server is started a default project is established. Every Verse data is stored into that project by default. To create another project or to change a project Verse Tags must be used. The server sends a tag group containing tags with information about all projects existing on the server to every avatar node of every connected client. It is up to the client wether to interprete this information or not. To store data into another project the client must change the project using such a Tag. One client can only be present in one project at the same time and will only see the data set of this project.
User Administration
The library VS2Admin contains functionality for access control to the server. The library uses an ODBC connection to a user data base. An example MySQL database table for user and rights data is included in the source code in the subdirectory db. The database definitions (name, password, location etc.) can be found in VS2Common/VS2Defines.h. If the server can not find this database or the table it will disable the user administration and start the server with free access for everyone. If the server finds the data base it will only accept clients with the correct login data.
Additionally the user data base contains rights for every user. The rights read/write, read only or admin can be given to a user. If a user has read-only rights all commands that would initiate a write operation internally are blocked.