[ https://issues.apache.org/jira/browse/TINKERPOP-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
stephen mallette updated TINKERPOP-1346: ---------------------------------------- Summary: Gryo 4.0 (was: Create custom ReferenceXXX GryoSerializers) This ticket was about changing the format of Reference* classes, but it really is about stamping out a new version of Gryo which I don't think we'll do for 3.4.x (i think we need to let the serializers settle after the big changes there for 3.3.0). I think that if we look at the Reference* classes, we might look at the Detached* classes as well, though as we go deeper into 3.x releases the reliance on Detached* becomes less and less I guess. Anyway, I think this ticket can be the catch-all for ideas related to Gryo 4.0. > Gryo 4.0 > -------- > > 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 > Priority: Major > Labels: breaking > > 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 (v7.6.3#76005)