graphdb in xpages

Post on 22-Jan-2018

495 Views

Category:

Software

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Where is my data?Implementing GraphDB capabilities

in XPages

Oliver Busse

We4IT GmbH, Germany

April 13, 2016

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@zeromancer1972www.oliverbusse.com

„Graphs“

http://whatis.techtarget.com/definition/graph-database

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

Some Graph DBs & Frameworks

• Neo4J

• OrientDB

• DEX

• Tinkerpop

• Apache Lucene / Solr

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“

• …

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)

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

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

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

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

Let‘s see the demo &some code

Resources• The XPages demo application

• https://bitbucket.org/zeromancer1972/sutol-2015-oda-graph-demo

• http://notesx.net:8090/obusse/ec16

• A nice glossary

• http://www.intec.co.uk/from-xpages-to-web-app-glossary/

• OpenNTF Domino API

• http://www.openntf.org/main.nsf/project.xsp?r=project/OpenNTF%20Domino%20API

• http://www.openntf.org/main.nsf/project.xsp?r=project/OpenNTF%20Domino%20API%20Demo%20Database

• Xots

• http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-one/

• http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-two/

• http://www.intec.co.uk/xots-background-and-multithreaded-tasks-the-openntf-domino-api-way-part-three/

• Graphs

• http://de.slideshare.net/ktree19/the-graph-revolution

Q & A

top related