1. Where is my data?
Implementing GraphDB capabilities
in XPages
Oliver Busse
We4IT GmbH, Germany
April 13, 2016
2. Oliver Busse
• „Bleeding Yellow“ since R4.5
• Software Architect at We4IT
• Member of the development team of
Aveedo® Application Framework
• IBM Champion for ICS in 2015 + 2016
• OpenNTF Member Director
• XPages Advocate
• IBM Bluemix curious
@zeromancer1972
www.oliverbusse.com
4. Graph DB
A graph database, also called a graph-oriented database, is a type of NoSQL database
that uses graph theory to store, map and query relationships.
A graph database is essentially a collection of nodes and edges. Each node represents
an entity (such as a person or business) and each edge represents a connection or
relationship between two nodes.
http://whatis.techtarget.com/definition/graph-database
6. Who is using Graph DBs?
• Amazon
• Google
• Facebook
• …almost every application that offers something like
• „related posts“ (blogs)
• „others also bought this“ (shops)
• collect relations and „likes“
• …
7. Graphs – terminology
• Vertices (Nodes)
• Properties (Key-Value pairs)
• Edges
• Connections, Relations between Vertices
• ElementStores
• for us: NSF databases
• MetaverseIDs
• Replica + UNID (hashed)
• internal use only (don‘t care about them)
8. Graph DB – in Domino?
• Vertices and Edges are stored as Documents
• The data container is a NSF
• The ElementStore defines the filepath to the NSF
• An ElementStore can hold different types of Vertices
• Usually you create one ElementStore for each Vertice type
9. Data Modelling & Implementation
• Nodes are defined as Interfaces
• Fields are defined as properties with Getter and Setter
• Methods define how the Node can build Edges to other Vertices
• Methods also return all Edges to a certain Vertice
10. Init the Graph
• Define the Element Store(s)
• Add Element Store(s) to the Graph Configuration
• Define the DFramedTransactionalGraph object with the Graph
Configuration
• Work with the Graph object
11. Create an Edge
• Parameterize Object 1
• Get Object 2 by a unique key
• Call one of the „add“ methods of your Node class
• Commit your changes