PlatformLab / TorcDB

TorcDB: A Low-Latency Graph Database on RAMCloud
Apache License 2.0
17 stars 4 forks source link

Edge implementation not in compliance with TinkerPop API #8

Open jdellithorpe opened 8 years ago

jdellithorpe commented 8 years ago

TinkerPop allows multiple edges with the same label to be added from a source vertex to a destination vertex. TorcGraph, however, assumes that the tuple <src vertex, dst vertex, label, type> where type is either directed or undirected (an extension of TinkerPop in TorcGraph) is unique. TorcGraph.addEdge does not currently check for this uniqueness, however (since that could be potentially very expensive with the given implementation of edge lists as a simple unindexed list of edges).

To fix this, which also side-steps the need for checking duplicate edges on calls to addEdge, unique IDs need to be issued to edges. The uniqueness of the ID must be at least enough to distinguish to edges having the same endpoints and label.