Changes between Version 20 and Version 21 of WikiStart
- Timestamp:
- 03/11/19 13:13:56 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v20 v21 31 31 32 32 == 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 34 This section describes the communication protocols with the partiesserver. 35 36 Other implementations of a partiesserver should adhere to the same communication protocols to ensure compatibility with genius2. 34 37 35 38 === Provide a list of available parties on the server … … 43 46 }}} 44 47 48 The 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 45 50 These fields are automatically generated from the parties contained in the jar files in the {{{partiesserver/partiesrepo}}} directory that was mentioned above. 46 51 … … 50 55 The following steps are needed to create a new running instance of a party. 51 56 52 * create an running instance of a party when a certain address on the server is requested53 * 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) 56 61 * can send JSON-formatted Action objects as requested by the agent (see the events module in genius2 core) 57 62 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.61 63 62 64 == Using the source code ==