Difference between revisions of "Running the dev preview"

From Sirikata Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by one other user not shown)
Line 9: Line 9:
 
Also, some commands in here are quite long because they require specifying a lot of parameters.  You should be able to set up configuration files to save you some typing.  Just run dev preview specifying the config file on the command line and it should pull in all the options correctly, e.g.:
 
Also, some commands in here are quite long because they require specifying a lot of parameters.  You should be able to set up configuration files to save you some typing.  Just run dev preview specifying the config file on the command line and it should pull in all the options correctly, e.g.:
 
   
 
   
<source lang="bash">
 
 
  ../../src/meru --config=server1.cfg
 
  ../../src/meru --config=server1.cfg
</source>
 
  
 
==== Single Server, Multiple Clients ====
 
==== Single Server, Multiple Clients ====
Line 17: Line 15:
 
This is the simplest mode to get running.  All the options default to settings appropriate for this scenario.  To run the server, simply run
 
This is the simplest mode to get running.  All the options default to settings appropriate for this scenario.  To run the server, simply run
  
<source lang="bash">
 
 
  ../../src/meru --mode=server
 
  ../../src/meru --mode=server
</source>
 
  
 
This starts the server up with all the default subsystems (see descriptions below).
 
This starts the server up with all the default subsystems (see descriptions below).
Line 27: Line 23:
 
In this mode, the method for starting clients remains exactly the same, simply adjust the connection parameters for each one to connect to different servers.  Note that you can do this from the command line, e.g.:
 
In this mode, the method for starting clients remains exactly the same, simply adjust the connection parameters for each one to connect to different servers.  Note that you can do this from the command line, e.g.:
  
<source lang="bash">
 
 
  ../../src/meru --username=testplayer --password=testplayer --server=mytestserver --port=mytestport1
 
  ../../src/meru --username=testplayer --password=testplayer --server=mytestserver --port=mytestport1
</source>
+
 
  
 
===== Server Options =====
 
===== Server Options =====
Line 53: Line 48:
  
 
From Meru/:
 
From Meru/:
<source lang="bash">
 
 
  python util/small_table.py
 
  python util/small_table.py
</source>
+
 
  
 
From Meru/:
 
From Meru/:
<source lang="bash">
 
 
  python util/centralized_proximity_manager.py
 
  python util/centralized_proximity_manager.py
</source>
+
 
  
 
From Meru/data/bin:
 
From Meru/data/bin:
<source lang="bash">
 
 
  ../../src/server --port=8888 --accounts=smalltable --proximity=central --object-store=smalltable --message-router=smalltable --reference-registry=smalltable --object-connections=smalltable
 
  ../../src/server --port=8888 --accounts=smalltable --proximity=central --object-store=smalltable --message-router=smalltable --reference-registry=smalltable --object-connections=smalltable
</source>
+
 
  
 
From Meru/data/bin:
 
From Meru/data/bin:
<source lang="bash">
 
 
  ../../src/server --port=8889 --accounts=smalltable --proximity=central --object-store=smalltable --message-router=smalltable --reference-registry=smalltable --object-connections=smalltable
 
  ../../src/server --port=8889 --accounts=smalltable --proximity=central --object-store=smalltable --message-router=smalltable --reference-registry=smalltable --object-connections=smalltable
</source>
+
 
  
 
Then you could connect to localhost on ports 8888 and 8889 with the client.
 
Then you could connect to localhost on ports 8888 and 8889 with the client.
  
---Importing meshes---
+
===Importing meshes===
hit 'l'
+
Hit the 'l' key then you can select:
then you can select a mesh exported from
+
 
 +
# a mesh exported from 3d studio max using our exporter http://sirikata.com/res/dev_preview/SirikataSceneExporter.zip
 +
# a mesh from [http://www.ogre3d.org/ Ogre3D] in general (with appropriate materials, etc in the same folder)
 +
# or pick a few example meshes by typing in a URI. For instance:
 +
meru://cplatz@/ArchD_Triumph_01.mesh
  
or pick a few example meshes by typing in a URI
 
for instance
 
meru://cplatz@/ArchD_Triumph_01.mesh
 
 
or
 
or
meru://cplatz@/Plant_Big_04.mesh
+
meru://cplatz@/Plant_Big_04.mesh
 
or
 
or
meru://cplatz@/Tree_Common_trop_02.mesh
+
meru://cplatz@/Tree_Common_trop_02.mesh
 
in the filename field
 
in the filename field
more examples are listed here
+
 
http://graphics.stanford.edu/~danielrh/dns/names/global/cp/la/cplatz/
+
More examples are listed at http://graphics.stanford.edu/~danielrh/dns/names/global/cp/la/cplatz/ (be sure to prefix the filename with meru://cplatz@/)

Latest revision as of 04:40, 28 March 2009

Disclaimer

This page documents how to actually run The Sirikata Dev Preview (codename Meru) servers and clients once you've compiled the source. Beyond some simple options that won't change, everything is controlled by the options mechanism. So if you can't find something here (or it doesn't seem to match up with your experience) your next stop should be Options.hpp and Options.cpp in the source tree.

Notes for All Scenarios

In all cases you need to start the client and server from the Meru/data/bin/ directory. This is required so we can find all the necessary libraries and resources.

Also, some commands in here are quite long because they require specifying a lot of parameters. You should be able to set up configuration files to save you some typing. Just run dev preview specifying the config file on the command line and it should pull in all the options correctly, e.g.:

../../src/meru --config=server1.cfg

Single Server, Multiple Clients

This is the simplest mode to get running. All the options default to settings appropriate for this scenario. To run the server, simply run

../../src/meru --mode=server

This starts the server up with all the default subsystems (see descriptions below).

Multiple Servers, Multiple Clients

In this mode, the method for starting clients remains exactly the same, simply adjust the connection parameters for each one to connect to different servers. Note that you can do this from the command line, e.g.:

../../src/meru --username=testplayer --password=testplayer --server=mytestserver --port=mytestport1


Server Options

In order to get a functional distributed server system working you need to specify distributed implementations of all the server subsystems. Below are listed the subsystems by the option name (by which you specify them on the command line) followed by the implementations. For many, the current "distributed" implementation is in fact one that works with multiple servers but is centralized on yet another server.

  • Account Manager (--accounts=) - sqlite, smalltable
  • Proximity Manager (--proximity=) - simple, bullet, central
  • Object Storage (--object-store=) - sqlite, smalltable
  • Message Router (--message-router=) - local, smalltable
  • Reference Registry (--reference-registry=) - sqlite, smalltable
  • Object Connection Manager (--object-connections=) - simple, smalltable

You will also need to set separate listening ports for each server.

Centralized Utilities

Many of the current "distributed" subsystems require a centralized controller. Currently this refers to all the smalltable implementations as well as the centralized proximity manager. You can find these utilities in Meru/util/. Both are python scripts that should run fine with no parameters (all the subsystem implementations are set to use the same default settings).

Example

As an example, lets say you wanted to run a two node server network. You would need to run these commands in separate terminals:

From Meru/:

python util/small_table.py


From Meru/:

python util/centralized_proximity_manager.py


From Meru/data/bin:

../../src/server --port=8888 --accounts=smalltable --proximity=central --object-store=smalltable --message-router=smalltable --reference-registry=smalltable --object-connections=smalltable


From Meru/data/bin:

../../src/server --port=8889 --accounts=smalltable --proximity=central --object-store=smalltable --message-router=smalltable --reference-registry=smalltable --object-connections=smalltable


Then you could connect to localhost on ports 8888 and 8889 with the client.

Importing meshes

Hit the 'l' key then you can select:

  1. a mesh exported from 3d studio max using our exporter http://sirikata.com/res/dev_preview/SirikataSceneExporter.zip
  2. a mesh from Ogre3D in general (with appropriate materials, etc in the same folder)
  3. or pick a few example meshes by typing in a URI. For instance:
meru://cplatz@/ArchD_Triumph_01.mesh

or

meru://cplatz@/Plant_Big_04.mesh

or

meru://cplatz@/Tree_Common_trop_02.mesh

in the filename field

More examples are listed at http://graphics.stanford.edu/~danielrh/dns/names/global/cp/la/cplatz/ (be sure to prefix the filename with meru://cplatz@/)