]
Dan Berindei updated ISPN-3907:
-------------------------------
Fix Version/s: 7.0.0.Alpha2
(was: 7.0.0.Alpha1)
Define a Protobuf custom option for defining numeric IDs for types
------------------------------------------------------------------
Key: ISPN-3907
URL:
https://issues.jboss.org/browse/ISPN-3907
Project: Infinispan
Issue Type: Task
Components: Embedded Querying
Affects Versions: 6.0.0.Final
Reporter: Adrian Nistor
Assignee: Adrian Nistor
Fix For: 7.0.0.Final, 7.0.0.Alpha2
Currently the wire format of all Protobuf encoded keys and values contains a
header/envelope that has some metadata information, like the fully qualified type name
(that is protobuf type name, not java) of the object encoded in the message. This
information is needed so that the other end can decode the message. And we added it
because the Protobuf spec assumes both ends are aware of the message type, which is not
the case most of the time.
While this approach solves the problem nicely, it becomes very inefficient is the FQN is
long, which is usually the case, as people tend to stick the domain name of their company
+ package app name into it.
Solution: provide alternative unique numeric IDs to all types. The IDs can be added to
message type definitions in the protobuf schema and the user is in charge of guaranteeing
their uniqueness while the system must check and enforce the uniqueness when a schema is
registered ib the ProtobufMetadataManager. To do this we define a custom Protobuf Message
type option that accepts a numeric value. If such a numeric ID was assigned to the type
then when it is serialized in protobuf the system has to use this id in the header rather
that the FQN string.
This option should not be mandatory. Existing apps should work without requiring source
code changes or recompiling providing that the relevant jars are upgraded in both client
and server to support the new header encoding.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: