[
https://jira.jboss.org/browse/ISPN-508?page=com.atlassian.jira.plugin.sys...
]
Galder Zamarreno commented on ISPN-508:
---------------------------------------
I've been playing around with protobufs trying to figure out whether it could be used
as a general marshalling mechanism and I don't think that's really possible. The
problem with protobufs is that reading requires strongly type access to the class
you're trying to deserialize, i.e. Person.parseFrom(bytes)
(
http://code.google.com/apis/protocolbuffers/docs/javatutorial.html). In the java world u
could get around adding class name to generated bytes and then using reflection on the
reading part, but this won't fly with Python or C++.
Partial incomplete solutions to this problem include using cache generic information to
find out key/value types but this is not a guarantee and it's not clear to me how
these would be translated to Python or C++ client impls. Protobufs also offers the
possibility of using self describing messages but the API to build the read object is not
available for Python (see bottom of:
http://code.google.com/apis/protocolbuffers/docs/techniques.html), so this is not option
in my opinion.
So, my conclusion of protobufs is that clients would need to do the work of transforming
their pojos to byte[] and pass them to us, and they'd parse the the byte[] from remote
cache with the knowledge of the type to be read. In this scenario, we'd offer some
guidelines via a wiki or similar to anyone wanting to do this.
Next I'll check Thrift and Avro in greater detail to see if they offer a better
solution than protobufs.
ProtoBuf as portable serialization for Hot Rod
----------------------------------------------
Key: ISPN-508
URL:
https://jira.jboss.org/browse/ISPN-508
Project: Infinispan
Issue Type: Feature Request
Components: Cache Server
Reporter: Galder Zamarreno
Assignee: Galder Zamarreno
Priority: Critical
Fix For: 5.0.0.BETA1, 5.0.0.Final
Consider using Google ProtoBufs as a way to serialize data into a wire so that a single
Hot Rod server can simulatneously be accessed by clients written in different languages.
At the moment, cos Java client uses standard serialization, only Java clients would really
be able to understand the contents of it, unless there's a non-JVM implementation that
can understand java serialization.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira