Details
-
Sub-task
-
Status: Done
-
Minor
-
Resolution: Done
-
None
-
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.
- 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.
Attachments
Issue Links
- links to