Skip to the content.

REQUEST

← Back to Home - To Transport


The REQUEST packet is used to get one or more values in a range from a bucket and to subscribe to bucket updates (in the selected range).

Request

Request request bytemap

Figure A: REQUEST request byte-map (header and body)


The REQUEST request (see Figure A) includes a header. This header contains one field: the bucket id which indicates the bucket to request values from.

The REQUEST packet accepts one flag:

The body can contain the following fields:

If both indexes are omitted, the entire bucket will be requested.

Response

REQUEST response bytemap

Figure B: REQUEST response byte-map


The response packet contains an array of n times the following data (where n equals the amount of requested slots) alongside a status code:

You might encounter the following error codes:

Process and flow

Request process

Figure C: REQUEST process flow


The REQUEST process (see Figure C) goes as follows:

  1. The client sends a REQUEST packet to the server
  2. If the bucket exists but the user does not have write permission, return error code 3.
  3. If the subscribe flag is set, subscribe user to bucket (optionally with range), see SUBSCRIBE.
  4. If the flag is not set but a range is provided, select the slots from the database within the range.
  5. If the range is not provided, get all slots from the database
  6. Create the response and send it to the user.

Note: If the user has subscribed and an update is pushed to the bucket, the server will send another response to the REQUEST request if this request asked to subscribe. This packet looks the same as a REQUEST response.


← Back to Home - To Transport - Prev: WIPE packet - Next: SUBSCRIBE packet