Service endpoints accepting BOSH command for different transport protocol.

POST /cmd

API endpoint for command exchange.

Users can also initiate bulk transfer by setting chunked encoding with multiple JSON document in succession.

POST /cmd HTTP/1.1
Content-Type: application/json
Transfer-Encoding: chunked

There are no limitation to the size of request and response body. It is only limited by the machine's capability.

Multiple JSON requests maybe submitted in a single POST connection. In other words:

{"Stmt":"CREATE TABLE hash (id STRING, val STRING, key(id))", "Workspace":"", "Opts":{}}
{"Stmt":"INSERT INTO hash VALUES (key:1, hello_internet)",    "Workspace":"", "Opts":{}}
{"Stmt":"INSERT INTO hash VALUES (key:2, hello_world)",       "Workspace":"", "Opts":{}}
{"Stmt":"INSERT INTO hash VALUES (key:3, hello_jeff)",        "Workspace":"", "Opts":{}}
{"Stmt":"INSERT INTO hash VALUES (key:4, hello_eugene)",      "Workspace":"", "Opts":{}}
{"Stmt":"INSERT INTO hash VALUES (key:5, hello_ethan)",       "Workspace":"", "Opts":{}}

Will have a response that looks like:

{"Content": {}, "Status": 0, "Err": ""}
{"Content": {}, "Status": 0, "Err": ""}
{"Content": {}, "Status": 0, "Err": ""}
{"Content": {}, "Status": 0, "Err": ""}
{"Content": {}, "Status": 0, "Err": ""}
{"Content": {}, "Status": 0, "Err": ""}

POST /cmd/pipe

API endpoint for one way command stream.

Behaves much like /cmd except it does not wait for completion. This endpoint is designed to handle streaming input.

GET /exec

API endpoint for initiating WebSocket duplex communication.

Upon successful connection upgrade, users could not send and resv data in low latency communication channel.

The message format exchanged is the same as /cmd endpoint.

GET /exec/pipe

API endpoint for, as the name implies, stream up data via WebSocket half-duplex connection.

Once the user decides a schema for a table, the user can stream INSERT command continuously through this channel, but expect no reply from service endpoint.

It is up to the user to determine if the result of the stream is correct.