Skip to content

WebSocket Messages

Chris edited this page Oct 23, 2018 · 3 revisions

Clients communicate with Manticore over WebSockets after a job submission in order to receive real-time updates on their position in the waiting list and for service information. The format of a message looks like this:

{ type: “message type”, data: {...} }

The type specifies what kind of message it is and the data holds the specifics about the message. Here are all the types of messages that a client can receive and send:

Message types sent by Manticore

position

Includes a position property which states how many users are in front of the current user, and a wait property which states whether the user is currently not being handled by Manticore (whether the user is in the waiting state)

services

Includes information about all the accessible addresses for a user’s job

dead

An empty message that notifies a user that their requested job is dead and that they have been removed from Manticore's system

activity

Includes the number of seconds left a user has to respond before Manticore stops their job and boots them off the request list

Messages types accepted by Manticore:

activity

When sent to Manticore, and if Manticore is configured to accept this message, then the inactivity timer for this user will reset, thus giving the user more time to use their resources