i think we have a somewhat confusing story about Graph.addVertex() and
GraphTraversalSource.addV().  We've wanted to promote use of
TraversalSource but our docs make a fair bit of use of Graph.addVertex()
and Vertex.addEdge() in various places.  It seems that if we want to
downplay core Graph API methods, we should limit core Graph API methods to
here only
http://tinkerpop.incubator.apache.org/docs/3.0.2-incubating/#_the_graph_structure

of course, @dkuppitz made the side-comment to me that he would never use
addV() when data loading, citing possible performance reasons.

I'd also note that for simple data loading use cases the
GraphTraversalSource.addE() isn't quite as intuitive to use as
Vertex.addEdge(),

gremlin> v1 = g.addV(id, 1, label, "person", "name", "marko", "age",
29).next()
==>v[1]
gremlin> v2 = g.addV(id, 3, label, "software", "name", "lop", "lang",
"java").next()
==>v[3]
gremlin> g.V(v1).as('a').V(v2).addInE('created', 'a', "weight", 0.4)
==>e[4][1-created->3]

compared with just:

gremlin> v1.addEdge("created", v2, id, 9, "weight", 0.4)
==>e[9][1-created->3]

So, up for discussion is: Do we promote core Graph API methods for bulk
loading? Or do we promote consistent use of GraphTraversalSource in all
cases?

Reply via email to