NetLogo / Teletortoise

NetLogo on the JVM, mirrored to your browser
8 stars 7 forks source link

Improve netlogo command request-response protocol #5

Open TheBizzle opened 9 years ago

TheBizzle commented 9 years ago

From @qiemem on May 31, 2013 15:4

Currently, the protocol consists of sending a command to the server. You then get a response that contains either the output that would've been printed to the command center printed or an error. This response is not traceable back to the original request.

The protocol should support:

Copied from original issue: NetLogo/Galapagos#45

TheBizzle commented 9 years ago

From @qiemem on July 28, 2013 15:7

Current protocol examples

{"agentType":"chatter","cmd":"hi"}
{
  "kind":"chatter",
  "context":"chatter",
  "user":"Bryan",
  "message":"hi",
  "members":["Bryan","BizzleBot"]
}
{"agentType":"observer","cmd":"create-turtles 5"}
{
  "kind":"command",
  "context":"observer",
  "user":"Bryan",
  "message":"create-turtles 5",
  "members":["Bryan","BizzleBot"]
}
{
  "kind":"response",
  "context":"netlogo",
  "user":"observer",
  "message":"",
  "members":["Bryan","BizzleBot"]
}
{"agentType":"observer","cmd":"show count turtles"}
{
  "kind":"command",
  "context":"observer",
  "user":"Bryan",
  "message":"show count turtles",
  "members":["Bryan","BizzleBot"]
}
{
  "kind":"response",
  "context":"netlogo",
  "user":"observer",
  "message":"observer: 5",
  "members":["Bryan","BizzleBot"]
}

Notes: