You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2016/06/20 15:09:05 UTC

[jira] [Updated] (TINKERPOP-1346) Create custom ReferenceXXX GryoSerializers

     [ https://issues.apache.org/jira/browse/TINKERPOP-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marko A. Rodriguez updated TINKERPOP-1346:
------------------------------------------
    Description: 
Right now, to send a {{ReferenceEdge}} message, we serialize the form as:

{code}
KryoClassInteger[ReferenceEdge] + KryoClassObject[Edge ID] + KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID] + KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID]
{code}

Assuming {{Long}} Element ids, the math says:

{code}
48 bytes = 4 bytes + (4 bytes + 8 bytes [long]) + 4 bytes + (4 bytes + 8 bytes [long]) + 4 bytes + (4 bytes + 8 bytes [long])
{code}

We could get this smaller by not relying on Kryo's {{FieldSerializer}}.

{code}
KryoClassInteger[ReferenceEdge] + KryoClassInteger[VertexIDClass] + KryoClassObject[Edge ID] + KryoObject[Vertex ID] + KryoObject[Vertex ID]
{code}

The math says:

{code}
36 bytes = 4 bytes + 4 bytes + (4 bytes + 8 bytes [long]) + 8 bytes [long] + 8 bytes [long]
{code}

Similar techniques would apply to {{ReferenceVertexProperty}} and {{ReferenceProperty}}.

  was:
Right now, to send a {{ReferenceEdge}} message, we serialize the form as:

{code}
KryoClassInteger[ReferenceEdge] + KryoClassObject[Edge ID] + KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID] + KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID]
{code}

Assuming {{Long}} Element ids, the math says:

{code}
48 bytes = 4 bytes + (4 bytes + 8 bytes [long]) + 4 bytes + (4 bytes + 8 bytes [long]) + 4 bytes + (4 bytes + 8 bytes [long])
{code}

We could get this smaller by not relying on Kryo's {{FieldSerializer}}.

{code}
KryoClassInteger[ReferenceEdge] + KryoClassInteger[VertexIDClass] + KryoClassObject[Edge ID] + KryoObject[Vertex ID] + KryoObject[Vertex ID]
{code}

The math says:

{code}
36 bytes = 4 bytes + 4 bytes + (4 bytes + 8 bytes [long]) + 8 bytes [long] + 8 bytes [long]
{code}
{code}

Similar techniques would apply to {{ReferenceVertexProperty}} and {{ReferenceProperty}}.


> Create custom ReferenceXXX GryoSerializers
> ------------------------------------------
>
>                 Key: TINKERPOP-1346
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1346
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: io, structure
>    Affects Versions: 3.2.0-incubating
>            Reporter: Marko A. Rodriguez
>              Labels: breaking
>             Fix For: 3.3.0
>
>
> Right now, to send a {{ReferenceEdge}} message, we serialize the form as:
> {code}
> KryoClassInteger[ReferenceEdge] + KryoClassObject[Edge ID] + KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID] + KryoClassInteger[ReferenceVertex] + KryoClassObject[Vertex ID]
> {code}
> Assuming {{Long}} Element ids, the math says:
> {code}
> 48 bytes = 4 bytes + (4 bytes + 8 bytes [long]) + 4 bytes + (4 bytes + 8 bytes [long]) + 4 bytes + (4 bytes + 8 bytes [long])
> {code}
> We could get this smaller by not relying on Kryo's {{FieldSerializer}}.
> {code}
> KryoClassInteger[ReferenceEdge] + KryoClassInteger[VertexIDClass] + KryoClassObject[Edge ID] + KryoObject[Vertex ID] + KryoObject[Vertex ID]
> {code}
> The math says:
> {code}
> 36 bytes = 4 bytes + 4 bytes + (4 bytes + 8 bytes [long]) + 8 bytes [long] + 8 bytes [long]
> {code}
> Similar techniques would apply to {{ReferenceVertexProperty}} and {{ReferenceProperty}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)