Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1565

Setup GraphSON 3.0

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.3.0
    • Component/s: io
    • Labels:
      None

      Description

      GraphSON 2.0 has some issues that should be recified for its "official release" in 3.3.0.

      Supporting Attachment

      We need to make sure that every element and property can be attached back to the main graph.

      • For Vertex, this means that we need to have the ID encoded (CHECK).
      • For Edge, this means we need to have the out/in vertex ids encoded (CHECK).
      • For VertexProperty, this means we need to have the vertex ID encoded (ERROR).
      • For Property, this means we need to have the the element ID (vertex property or edge) encoded and then the subsequent vertex ID (ERROR).

      Maintaining Consistency

      Currently, property encoding in Edge is different than property encoding in VertexProperty.

      Edge -->

      properties : {
      	key : "aKey",
      	value : { @type: "gProperty", @value : {"key","aKey","value",10}}
      }
      

      VertexProperty-->

      properties : {
      	key : "aKey",
      	value : 10
      }
      

      This should be consistent.

      Reducing Verbosity

      We have the problem of representing both DetachedElements and ReferenceElements. DetachedElements contain lots of information and is typicaly used to ensure a data rich result set. ReferenceElements contain only the necessary information for attachment. I think we can support both representations by making certain fields "optional."

      Vertex-->

      return new Vertex(json.get("id"),json.getOrDefault("label",Vertex.DEFAULT_LABEL),json.getOrDefault("properties",Collections.emptyMap()))
      

      That is, lots of getOrDefault() use will make sure that when desesired, we only send/recv information that is needed for the particular computatation. E.g. as dictated by HaltedTraverserStrategy.

      This issue has evolved a bit since it was first written. The work thus far has been to setup GraphSON 3.0. The other stuff mentioned in the description above will be discussed/handled in other tickets. Those things are beyond the scope of this ticket at this point.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                okram Marko A. Rodriguez
                Reporter:
                okram Marko A. Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: