Skip to content
mizzao edited this page Dec 10, 2012 · 1 revision

Description of messages sent over CometD by server and clients.

Introduction

Messages are used to send information between server and client, communicate in the lobby, and send data in experiments/interactions. They are documented here for clarity. Knowledge of this protocol is only needed for developers and not important for implementation of your own experiments.

/service/user

The main channel for targeted communication between client and server.

Quiz needed

  • status: "quiz"

Username needed

  • status: "username"

Entering Lobby

  • status: "lobby"

Starting experiment error

  • status: "experror"

Connecting to experiment

  • status: "startexp"
  • channel: string - channel to pub/sub on

Connecting to finished experiment

  • status: "finished"

Inactivity - if the user is not paying attention

  • status: "inactive"
  • time: long, number of seconds inactive

Completed experiment

  • status: "finishexp"

Kicking remainder out of lobby

  • status: "batchfinished"

/lobby

The waiting area before clients join experiments.

Full update - with optional additional info

  • status: "update"

Join or leave

  • status: "join"/"quit"
  • username: string

Status updates

  • ready: boolean
  • msg: string, any message that the client wants to send.

Clone this wiki locally