[ https://issues.apache.org/jira/browse/S2GRAPH-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15171352#comment-15171352 ]
DOYUNG YOON commented on S2GRAPH-17: ------------------------------------ This is quite large PR. apologize for large changes. The main motivation on this PR is changing followings. # remove unnecessary abstraction like MutationBuilder, QueryBuilder. # most of common codes are located on Storage level. if specific storage like redis, cassandra, rocksdb want to implement Storage trait, then there are fewer methods that they need to implement. also I added some comments and expectation on Storage so others who are interested in implementing their own storage can see what is expected. Basically they need to following methods(brief explanation follows). # writeToStorage: decide how actually store given SKeyValues into specific storage. # fetchSnapshotEdgeKeyValues: decide how to fetch snapshotEdge from storage and build SKeyValues. # writeLock: how to atomically store request SKeyValue with expected value. make sure that this need to be atomic. # buildRequest: convert QueryRequest into storage specific fetch request. # fetch: decide how to fetch IndexEdgeKeyValues and use toEdge on storage to convert SKeyValue into Edge. # fetches: decide how to call fetch in parallel and merge their result. # fetchVertexKeyValues: decide how to fetch sKeyValue for vertex. # incrementCounts: decide how to increment value for given edges. # flush: resource clean up during shutdown. # createTable: create namespace for given tableName. > Remove unnecessary abstraction layer, Storage. > ---------------------------------------------- > > Key: S2GRAPH-17 > URL: https://issues.apache.org/jira/browse/S2GRAPH-17 > Project: S2Graph > Issue Type: Task > Reporter: DOYUNG YOON > Assignee: DOYUNG YOON > Labels: client, refactoring > Original Estimate: 168h > Remaining Estimate: 168h > > Currently Graph contains following components. > Graph has storage and each storage have followings. > # SerDe: serialize and deserialize IndexEdge/SnapshotEdge/Vertex into bytes. > # MutationBuilder: convert IndexEdge/SnapshotEdge into RPC which is dependent > on storage backend. > # QueryBuilder: issue RPC for fetch on storage backend > With these components, storage know how to actually store/fetch > IndexEdge/SnapshotEdge/Vertex to, from storage backend. > In my opinion, storage layer is unnecessary since all graph instance does is > delegating into storage. I am suggesting to remove storage layer and use > different Graph class for different storage backend. > So for example, change AsynchbaseStorage into AsynchbaseGraph. > I want to discuss how our Graph Client should be on this issue and change it > according to discussion. -- This message was sent by Atlassian JIRA (v6.3.4#6332)