[ 
https://issues.apache.org/jira/browse/TINKERPOP-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16691816#comment-16691816
 ] 

Jorge Bay commented on TINKERPOP-1942:
--------------------------------------

I've added support for writing serialized object structures to buffer.

I've been working on supporting null values with type information, which is 
required when dealing with generic custom structures (e.g., generic lists or 
tuples, like {{Tuple<T1, T2>}} where the type information must be maintained at 
all times, even with null values) and I think the problem is solved, see "Null 
Handling" section in the doc. Later, I'll add a working example in the repo 
tree.

Regarding moving the implementation to {{gremlin-core}}, the Netty dependency 
prevent us to do it.
 There are a couple of workarounds we could use:
 - Add dependency to {{netty-buffer}} on {{gremlin-core}}. {{netty-buffer}} is 
a buffer API that can be used independently, But pushing a new dependency 
downstream is something most users/implementors won't appreciate.
 - Providing a wrapper to the Netty Buffer API ({{ByteBuf}}, 
{{ByteBufAllocator}}, {{CompositeByteBuf}}, ...). The effort is not trivial and 
the gain (making it buffer-api agnostic?) is not clear for me.
 - Use Java NIO for serialization. We would still be using Netty for existing 
driver/server modules (GraphSON serialization depends on it) but loosing all 
the possible benefits (buffer pooling, leak detection, ...) for this 
serialization format :/

In short, I think we should focus in providing the serializers for this new 
format in gremlin-driver and continue using the Netty Buffer API within the 
serializers.

I'll submit a pull request soon, in case somebody wants to provide early 
feedback / collaborate while this is still a WIP.

> Binary serialization format
> ---------------------------
>
>                 Key: TINKERPOP-1942
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1942
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 3.3.4
>            Reporter: Jorge Bay
>            Assignee: Jorge Bay
>            Priority: Major
>
> We should provide a binary serialization format designed to reduce 
> serialization overhead and minimizing the size of the payload that is 
> transmitted over the wire.
> It could be implemented in a very similar way as Kryo support but with 
> interoperability in mind and ultimately we could fade Gryo out, as now with 
> the GLVs it doesn't have a role to play.
> The main benefit would be the performance improvement, making serialization 
> and deserialization processing time negligible on both the server and the 
> client.
> Background: 
> https://lists.apache.org/thread.html/13e70235591853801bab16ed457ee4f56f3dfe2d1c5817c34a036408@%3Cdev.tinkerpop.apache.org%3E



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to