infinispan / js-client

Javascript client for Infinispan, over the Hot Rod wire protocol
https://infinispan.org/docs/hotrod-clients/js/latest/js_client.html
Apache License 2.0
15 stars 28 forks source link

Implement PING v3.0 operation #74

Closed rigazilla closed 2 years ago

rigazilla commented 2 years ago

Client now support 2.9 hotrod protocol.

Task Implement PING operation v3.0 so client can work with hotrod 3.0 protocol

tristantarrant commented 2 years ago

I assume 3.0 means >= 3.0

rigazilla commented 2 years ago

Version 3.0 extends PING operation response with additional information:

Specification below comes from Hotrod 3.0 ref

Version 2.9

Ping Response (0x18):

Field Name Size Value
Header variable same as before
Response status 1 byte same as before
Key Type MediaType Media Type of the key stored in the server
Value Type MediaType Media Type of the value stored in the server

Version 3.0

Response (0x18):

Field Name Size Value
Header variable Response header
Response status 1 byte 0x00 = success, if no errors
Key Type MediaType Media Type of the key stored in the server
Value Type MediaType Media Type of the value stored in the server
Version 1 byte Hot Rod server version.
opCount vInt Number of supported operations
opRequestCode1 1 short Request opcode of the first operation
…​ …​ …​
opRequestCodeN 1 short Request opcode of the nth operation

Development hints:

rigazilla commented 2 years ago
rigazilla commented 2 years ago

Use the test suite to check the progress, i.e. setting 3.0 should make the testsuite fails at the beginning then adding code should fix the test suite