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

added registerProtostreamType function #82

Closed NeerajGartia21 closed 2 years ago

NeerajGartia21 commented 2 years ago

This PR is for the issue #72

This PR is the first part of adding protobuf encoded cache feature in the js client.

Protostream is a Protobuf based serialization library, is used by Infinispan to serialize cache entries preserving their type. Client should support protobuf encode/decode for mediatype application/x-protostream.

The proposed design for adding this feature is provided below.

- procedure for setting up the client:

  1. Register the protobuf schema type using registerProtostreamType function by providing the package full name and an id for the schema.
  2. Encode the message object using the protobuf schema.

In this PR the registerProtostream type function is implemented. Also new mediaType application/x-protostream is added.

rigazilla commented 2 years ago

@NeerajGartia21 this looks good to me. If all the code for the Setup Time (as describe here) is in I would merge this and go ahead with the Working Time code in a new PR, so to keep PRs small. Wdyt?

NeerajGartia21 commented 2 years ago

I think after committing requested changes all code for setup time are in.

rigazilla commented 2 years ago

merged, thanks @NeerajGartia21 !