-
Notifications
You must be signed in to change notification settings - Fork 112
RexPro Messages
spmallette edited this page Feb 16, 2013
·
28 revisions
Communication over RexPro is achieved by sending and receiving messages that adhere to the format specified on this page. There are several clients that communicate via RexPro that would serve as good examples for how communication over RexPro works:
- Rexster Console
- RexsterClient – A Java language binding
- rexpro-python – A Python languge binding
Evern RexPro message consists of the following segments:
[protocol version][message type][message size][message body]
segment | type(bytes) | description |
---|---|---|
protocol version | byte(1) | The version of RexPro. Currently this value should be zero. |
message type | byte(1) | The type of message as described below. |
message size | int(4) | The length of the message body |
message body | int(n) | The body of the message itself containing the instructions for the RexPro Server. |
RexPro messages are divided into those that deal with requests made from the client and those that involved a response from the server. The following table represents an overview of the basic message set:
message | type | description |
---|---|---|
session | request | A request to open or close the session with the RexPro Server. |
session | response | The response from the RexPro Server to a session request containing session information. |
script | request | A request to process a Gremlin script on the RexPro Server. |
script | response | A response to a script request. Script response messages actually refer to a set of response messages that are unique to each serialization channel (i.e. MsgPack, GraphSON, and Console). |
error | response | A response from the RexPro Server indicating a problem has occurred. |