Version 22 (modified by wouter, 6 years ago) ( diff )

--

Genius2 RunServer

This is the homepage of the Genius2 run server.

The Genius2 main page is here.

The run server can run sessions and tournaments as specified.

Installation

  • Install your apache-tomcat 8 installation ​https://tomcat.apache.org/download-80.cgi. You can re-use an existing installation.
  • Download the runserver war file from the artifactory. Go into the latest version of the runserver and download (right click) the war file. NOTICE: your browser must have cookies enabled to access the artifactory.
  • Copy the downloaded war file into the tomcat webapps directory
  • (Re)start tomcat

After (re)starting tomcat your local profilesserver should be up and running.

After installing and starting, go to ​http://localhost:8080/runserver-XXX (replace XXX with the version you installed) to see if it works.

Running a Session

To run a session using the new-session GUI :

  • Go to ​http://localhost:8080/runserver and click on "new session".
  • enter a valid profilesserver URL in the domain/profile server field
  • enter a valid partiesserver URL in the parties server field
  • Inside the Participants area, select the party and profile for the first party and click add
  • Repeat that until all parties have been added.
  • Press the "Start Session" button.

https://tracinsy.ewi.tudelft.nl/trac/Genius2RunServer/raw-attachment/wiki/WikiStart/snap.png

The information made available about the running session is determined by the protocol. For SAOP, there are currently two ways to check the progress on the running session

  • Check the output of the tomcat web server (eg in catalina.out)
  • Check the log files written by the protocol.

Usually progress is not directly available because this information could be abused by the negotiating parties.

The source code

You can read the source code through the "Browse source" button at the top of this page. You can check out the source code through svn with

svn checkout https://tracinsy.ewi.tudelft.nl/svn/Genius2RunServer/

Communication protocol

This section deals with the communication protocols with the runserver. These may be relevant when you need to communicate directly with it, e.g. when you build your own GUI or start up your own sessions and tournaments from a script. Other implementations of a runserver should adhere to the same communication protocols to ensure compatibility with genius2.

RunSession

The main service available on the runserver is the RunSession service. It is available at http:..:8080//runserver/runsession. This service starts up and runs a complete session when it is accessed (http get or post). To start a session, the http get must include a JSON-serialized genius2.protocol.session.SessionSettings object. Typically this looks like this (assuming you want to use SAOP protocol):

{"SAOPSettings": {
    "participants":[
        {"party":"http://party1","profile":"ws://profile1"},
        {"party":"http://party2","profile":"ws://profile2"}],
    "deadline":{"deadlinetime":{"millis":100}}
}}

The "SAOPSettings" indicates that these settings are SAOPSettings and (see Settings.getProtocol) will be interpreted by the SAOP protocol.

The participants is a list with PartyWithProfile items: a "party" field containing a http address on a partiesserver, and a "profile" field containing a websocket address on a profilesserver.

The deadline contains the deadline for the SAOP, which is how long the negotiation can last.

Running Sessions

The websocket address ws:..runserver/websocket/sessions sends updates of the current list of running sessions. The list is sent as a JSON List of strings , each string being the session ID of the running session. Every time the list changes, a new complete list is sent to clients listening to the websocket.

Attachments (12)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.