Download presentation
Presentation is loading. Please wait.
1
Titan Graph Database Meet Bhatt(13MCEC02)
2
What is Titan? Titan is a distributed graph database optimized for storing and querying graphs represented over a group of machines. The group of machines can elastically scale to support a growing dataset and user base.
3
How does Titan work? Titan uses Gremlin query language for graph traversals Example Queries: g = TitanFactory.open('local/tmp'); g.createKeyIndex('name', Vertex.class); v = g.addVertex(null); Get A Vertex By Its Id: g.v(1); Get All The Vertices With ID Range: g.V[1..100].firstName;
4
A few other queries Get The Attribute Of A Vertex By Its Id: g.v(1).firstName; Get A Vertex By An Attribute: g.V('firsName','John'); Get The Id Of A Vertex By An Attribute: g.V('firsName','John').id; Get The Count Of Vertices With A Attribute Value: g.V('firsName','John').count();
5
Few other queries Get The Edge Of A Vertex With A Label "friend": g.v(1).outE('friend'); Get The Age Of All Friends: g.V('lastName','Doe').outE('friend').inV().age; Get All People That Have Address: g.V.hasNot(' ', null) Get Unique Results: g.V('lastName','Doe').outE('friend').inV().dedup(); Find All People That Have Age Greater Than 25: g.V.filter{it.age > 25}.firstName
6
Benefits of Titan Elastic and linear scalability for a growing data and user base. Data distribution and replication for performance and fault tolerance. Support for ACID and eventual consistency. Support for various storage backends: Apache Cassandra Apache HBase Oracle BerkeleyDB,etc
7
Comparison with other graph databases
8
How does Titan distribute a graph database?
Titan "understands" how the underlying storage backend distributes the data and uses graph partitioning techniques that exploit this awareness. Titan determines the key sort order of the underlying storage backend and then assigns ids to vertices such that vertices which are assigned to the same partition block have ids that are assigned to the same physical machine.
9
Limitations of Titan Edge Retrievals are not O(1)
Key Index Must Be Created Prior to Key Being Used Once an index has been created for a key, it can never be removed. Batch loading in Titan is currently slower than batch loading modes provided by single machine databases.
10
Few other limitations Running multiple Titan instances on one machine backed by the same storage backend might lead to data corruption. Precision of Double and Float data type is limited
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.