Changes between Version 20 and Version 21 of WikiStart


Ignore:
Timestamp:
03/11/19 13:13:56 (6 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v20 v21  
    3131
    3232== Communication protocol
    33 The parties server is a component in the bigger genius2 framework. Its mains function are discussed in the following subsections. Other implementations of a partiesserver should adhere to the same communication protocols to ensure compatibility with genius2.
     33
     34This section describes the communication protocols with the partiesserver.
     35
     36Other implementations of a partiesserver should adhere to the same communication protocols to ensure compatibility with genius2.
    3437
    3538=== Provide a list of available parties on the server
     
    4346}}}
    4447
     48The uri contains a http address that, when accessed, starts up a new instance of the party. This is discussed in more detail in the next section.
     49
    4550These fields are automatically generated from the parties contained in the jar files in the {{{partiesserver/partiesrepo}}} directory that was mentioned above.
    4651
     
    5055The following steps are needed to create a new running instance of a party.
    5156
    52 * create an running instance of a party when a certain address on the server is requested
    53 * It then returns the address of a a websocket on which the party can be contacted. Usually this websocket will be on the same computer, but it might be elsewhere)
    54 * The websocket connection implements
    55  * accepts JSON-formatted Inform objects and these are passed into the party (see the the party module in genius2 core)
     57* Do a http get on the uri provided in the GeneralPartyInfo field above. This  creates a running instance of that party
     58* The http get returns a websocket address on which the party can be contacted.
     59* The websocket connection implements a {{{Connection<Inform, Action>}}} which means the following:
     60 * it accepts JSON-formatted Inform objects and these are passed into the party (see the the party module in genius2 core)
    5661 * can send JSON-formatted Action objects as requested by the agent (see the events module in genius2 core)
    5762
    58 In Genius2, this is implemented in the RunParty class. The class {{{Connection<Inform, Action>}}} (see the references module in genius2 core) represents an abstract connection, the actual conversion is done with Jackson in RunParty.
    59 
    60 However different services could be implemented based on different languages, as long as the procedure above is met.
    6163
    6264== Using the source code ==