Understanding the Multiverse Servers

From Multiverse

Jump to: navigation, search

Contents

Server processes

The server startup scripts, multiverse.sh (for Linux and Cygwin users) and start-multiverse.bat (for Windows) call the Java runtime executable to start each server process, initially loading the multiverse.server.marshalling.Trampoline that in turn loads the "startup class" that reads a set of Python scripts. For the message domain server, the startup class is multiverse.msgsys.DomainServer. For all the other servers, the startup class is multiverse.server.engine.Engine.

The startup scripts provided are examples for Sampleworld. In many cases, you will be able to use them "as is" for your world; in some cases, you may need to modify the startup script; for example, if you create your own server plug-in. See Running the Servers for details on using the shell scripts.

Each server process reads a property file containing all the initialization settings for the servers. See Using the Server Property File for more information.

Except for the Message server, each server process runs one or more server plug-ins. A server plug-in is a class that extends multiverse.server.engine.EnginePlugin. The servers can be divided into infrastructure servers, that provide the fundamental basis for the virtual world, and MARS plug-in servers, that provide gameplay and other features that you can extend, modify, or even replace.

Scripts and messaging configuration files

When they start, the server processess read in scripts in the config directory, including scripts in the multiverse/config/common directory, and the multiverse/config/sampleworld directory (or the equivalent for the specific world). If a server process tries to read a script that does not exist, it will log a warning and continue.

The servers also read some text (.txt) files that configure messaging. See Messaging configuration for more information.

NOTE: In this document, the /multiverse directory represents the directory where you installed the multiverse servers, often referred to as mv-home. If you extracted the server archive to your system root directory, then this directory will be simply /multiverse (On Linux) or C:\multiverse on Windows.

Using Python

The Multiverse servers use a Java implementation of Python, Jython. Jython provides access to base Python commands and language syntax, but does not automatically provide access to any of the standard Python modules. You can however, use all the Java libraries as well as the Multiverse libraries, if you include the requisite import statements in your script file.

By default, Jython includes the org.python.core, org.python.util, and com.ziclix.python.sql packages. The latter is not relevant, because it is for database access. The other packages are primarily for internal use by Jython, however, the API docs are available for reference.

Logging

The log file name is specified on the Java command line as follows: -Dmultiverse.loggername=name The server will then create a log file in mv-home/logs/world-name/name.out, where world-name is the name of the world and loggername is the specified loggername.

See Server Logging for details on configuring logging.

Messaging configuration

All server processes read two Python scripts to configure messaging:

Additionally, each server process "advertises" messages that it publishes in multiverse/config/common/process-name-ads.txt. Multiverse defines a set of marshalled objects in multiverse/config/common/mvmarshallers.txt.

See Multiverse Messaging System for more information.

Global properties

All plug-ins except except login manager load the following scripts that define global properties:

Message domain server

The Message Domain Server provides a message registry that enables all the other servers to communicate with each other. It is not a server plug-in, but is its own special process.

See Multiverse Messaging System for more information.

Infrastructure server plug-ins

The Multiverse infrastructure servers provide the basic services used by other plug-in servers. They include:

Login Manager
Handles character creation and selection.
Plug-in class: multiverse.mars.plugins.MarsLoginPlugin
World Manager
Controls a world's geography and what PCs and mobs are able to see.
Plug-in class: multiverse.mars.plugins.MarsWorldManagerPlugin.
Proxy Server
Handles all communication with Multiverse Clients, and sends messages to the other servers.
Plug-in class: multiverse.mars.plugins.MarsProxyPlugin
Instance Server
Loads and manages world instances.
Plug-in class: multiverse.server.plugins.InstancePlugin.
Multiverse Voice Server
Controls voice chat. This is an optional server plug-in.
Plug-in class: multiverse.server.plugins.VoicePlugin

MARS Server plug-ins

The MARS plug-in servers are:

Combat Server
Controls combat between players and mobs, and related functions.
Plug-in class multiverse.mars.plugins.CombatPlugin for combat
Plug-in class multiverse.mars.plugins.GroupPlugin for grouping. See MARS Group System.
Plug-in class SampleWorldClassAbilityPlugin (extends multiverse.mars.plugins.ClassAbilityPlugin for experience system. See MARS Experience System.
Object Manager
Creates and manageds objects and object persistence.
Plug-in class multiverse.mars.plugins.MarsInventoryPlugin for inventory management
Plug-in class multiverse.server.plugins.ObjectManagerPlugin for object management
Plug-in class multiverse.mars.plugins.MarsWorldManagerPlugin
Mob Server
Controls mobs and quests.
Plug-in class multiverse.server.plugins.MobManagerPlugin
Plug-in class multiverse.mars.plugins.QuestPlugin
Plug-in class multiverse.mars.plugins.TrainerPlugin for trainer plug-in. See MARS Trainer Plug-in.

For more information, see MARS.

Startup monitor

The startup monitor is a process that notifies you when the servers have all initialized and are ready for clients to log in.

It reads the following scripts:

Personal tools