-
Notifications
You must be signed in to change notification settings - Fork 1
Protocol
A description of the protocol used in the evalserver
This is a session based protocol, after the session is closed all in progress and pending jobs are destroyed. Every connection is it's own session, they cannot be shared between connections and are fully isolated from each other.
There are three priorities currently supported
- Realtime - These are answered in first come first serve order, as many as the server will allow.
- Deadline - As long as there's a free worker, they will try to be run before the scheduled deadline. This does not make any promises about the running time of the code given.
- Batch - Answered as long as nothing else is in front of them. Only one will be run at any given time for a session.
Since you can have many in flight requests, you need a way to know which response is to which request. You do this by providing a mandatory sequence number for every request. There's no fixed method of how you can do this, as long as it fits in a 64bit integer and isn't 0 then it'll work.
If you re-use a sequence number, while a job is pending you'll cancel the previous job.
You can cancel an eval if it hasn't run yet y sending a cancel message for the proper sequence number.
- 4 bytes - Reserved, MUST be 0
- 4 bytes - length of the message
- 0..2**32 bytes - Protocol buffer data
see here for the protocol buffer file.
All messages start from the type Packet, this is used as a crude Algebriac Data Type. It will contain only one actually sub-message.