Titan graph schema documentation

44 views
Skip to first unread message

Nikolai Grigoriev

unread,
Mar 6, 2017, 10:41:14 AM3/6/17
to Aurelius
Hello,

I am looking for a good way to keep the graph schema under control in multi-team project. If I use the analogy from the relational world, I would have ER diagrams, database schema definition (all these CREATE TABLE/INDEX... statements with comments). I am looking for something similar for Titan- based project. In particular, I think I am looking for:

1. schema initialization script - to create types, indexes etc
2. a way to document the node types and relationships

Any suggestions?

Thanks!

Stephen Mallette

unread,
Mar 7, 2017, 6:54:21 AM3/7/17
to Aurelius
I've tended to use two strategies for this:

1. For smaller schemas (say dozens of properties/labels) and/or those schema that have a domain that isn't likely to grow too much (i.e. the domain is known and stable), I simply use a Groovy script or single Java file with code comments. I commit that to source control with the rest of my application and allow that file to be versioned like any other. A simple Groovy script is nice because you can copy paste it into the Gremlin Console to easily execute it. It can be compiled and then used in unit tests really easily to set up your schema. It provides a lot of flexiblity.
2. For larger schemas and ones that might change fluidly, I will create a schema module (i.e. maven module, separate project, etc.) with homemade utility classes to help build the schema. I'll use full javadoc/groovydoc to generate documentation for the schema. As this is a independent module, you can depend on it in a central way (i.e. multiple projects might depend on this one). You can enclose other utility methods for administering your graph and write test cases around that. 

There really aren't any out-of-the-box tools that I know of around this kind of stuff. It's all homegrown unfortunately. 



--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/fb816c2a-971f-4e13-a21e-dc0452e4a5b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages