Uploaded image for project: 'S2Graph'
  1. S2Graph
  2. S2GRAPH-66 Optimize toEdge, IndexEdgeDeserializable using mutable Map.
  3. S2GRAPH-81

Separate Serializable's toKeyValues into 3, toRowKey, toQualifier, toValue

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Done
    • Minor
    • Resolution: Done
    • None
    • 0.1.0
    • None
    • None

    Description

      StorageSerializable trait under core.storage package only have following interface.

      trait StorageSerializable[E] {
        def toKeyValues: Seq[SKeyValue]
      }
      

      This layer is responsible to build SKeyValue from Edge/Vertex, which will be used in each storage implementation to actually store them.

      I am suggesting to separate this into 3 piece.

      1. toRowKey
      2. toQualifier
      3. toValue

      The reason behind of this suggestion is for read path.

      When user query comes in, we need to build rpc into storage which require us to identify the row key.

      Most of time, we only need to identify row key, when getEdges from certain start vertex.
      Sometimes, we additionally need qualifier, when check if edge exist between vertex pair on specific Label.

      We are identifying row, qualifier by using IndexEdgeSerializer, which currently build bytes for row, qualifier, value altogether.

      I think by separating toKeyValues, read path can avoid unnecessary serialization.

      Attachments

        Issue Links

          Activity

            People

              steamshon Do Yung Yoon
              steamshon Do Yung Yoon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 168h
                  168h
                  Remaining:
                  Remaining Estimate - 168h
                  168h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified