DOYUNG YOON created S2GRAPH-81:
----------------------------------

             Summary: Separate Serializable's toKeyValues into 3, toRowKey, 
toQualifier, toValue
                 Key: S2GRAPH-81
                 URL: https://issues.apache.org/jira/browse/S2GRAPH-81
             Project: S2Graph
          Issue Type: Sub-task
            Reporter: DOYUNG YOON
            Assignee: DOYUNG YOON
            Priority: Minor


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

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

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.

# toRowKey
# toQualifier
# 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.



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

Reply via email to