52
David Colebatch @dcolebatch [email protected] Graph Applications for the Enterprise, FAST Wednesday, 6 November, 13

Enterprise graph applications

Embed Size (px)

DESCRIPTION

The opportunities to enhance today's enterprise applications with graph database technologies are out there - and now there is a way to implement graph applications quickly with the xnlogic framework.

Citation preview

Page 1: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  @[email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  

Graph����������� ������������������  Applications����������� ������������������  for����������� ������������������  the����������� ������������������  Enterprise,����������� ������������������  FAST

Wednesday, 6 November, 13

Page 2: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Who����������� ������������������  Are����������� ������������������  We?

• Toronto-based Graph Database services company

• Partner with Neo Technology

• Organizers of GraphTO

• Authors of the popular Pacer gem, an extensible graph traversal library

GraphTO

Wednesday, 6 November, 13

Page 3: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Enterprise����������� ������������������  Application����������� ������������������  Examples

Wednesday, 6 November, 13

Page 4: Enterprise graph applications

ERPCRM

Accounting

MRPPLM

CMDBAMDB

InventoryExcel

MDM

Wednesday, 6 November, 13

Page 5: Enterprise graph applications

ERPCRM

Accounting

MRPPLM

CMDBAMDB

InventoryExcel

MDM

Wednesday, 6 November, 13

Page 6: Enterprise graph applications

Data complexity

Perfo

rman

ce

SQL database

Requirement of application

The����������� ������������������  Zone����������� ������������������  of����������� ������������������  SQL����������� ������������������  Adequacy

Wednesday, 6 November, 13

Page 7: Enterprise graph applications

Data complexity

Perfo

rman

ce

SQL database

Requirement of application

The����������� ������������������  Zone����������� ������������������  of����������� ������������������  SQL����������� ������������������  Adequacy

Wednesday, 6 November, 13

Page 8: Enterprise graph applications

Data complexity

Perfo

rman

ce

SQL database

Requirement of application

The����������� ������������������  Zone����������� ������������������  of����������� ������������������  SQL����������� ������������������  Adequacy

Salary List

ERP

CRM

Wednesday, 6 November, 13

Page 9: Enterprise graph applications

Data complexity

Perfo

rman

ce

SQL database

Requirement of application

Network / CloudManagement

Social

MDM

Geo

The����������� ������������������  Zone����������� ������������������  of����������� ������������������  SQL����������� ������������������  Adequacy

Salary List

ERP

CRM

Wednesday, 6 November, 13

Page 10: Enterprise graph applications

Data complexity

Perfo

rman

ce

SQL database

Requirement of application

Network / CloudManagement

Social

MDM

Geo

The����������� ������������������  Zone����������� ������������������  of����������� ������������������  SQL����������� ������������������  Adequacy

Salary List

ERP

CRM

Wednesday, 6 November, 13

Page 11: Enterprise graph applications

Configuration����������� ������������������  Management

Wednesday, 6 November, 13

Page 12: Enterprise graph applications

Configuration����������� ������������������  Management

Wednesday, 6 November, 13

Page 13: Enterprise graph applications

Configuration����������� ������������������  Management

Wednesday, 6 November, 13

Page 14: Enterprise graph applications

Configuration����������� ������������������  Management

Wednesday, 6 November, 13

Page 15: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Enterprise����������� ������������������  Application����������� ������������������  #fails

Wednesday, 6 November, 13

Page 16: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Often CRUD Only• One screen for each record type

• UI maps to table structure• ...or rather, is constrained by the table structure

Enterprise����������� ������������������  Application����������� ������������������  #fails

Wednesday, 6 November, 13

Page 17: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Relationships to one-degree• “This thing is related to that thing”

• Slow to traverse relationships

• Inhibits discovery by serendipity

Enterprise����������� ������������������  Application����������� ������������������  #fails

Wednesday, 6 November, 13

Page 18: Enterprise graph applications

Configuration����������� ������������������  Management

Wednesday, 6 November, 13

Page 19: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

So����������� ������������������  what’s����������� ������������������  the����������� ������������������  solution?

Wednesday, 6 November, 13

Page 20: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Wednesday, 6 November, 13

Page 21: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Manager/Client:����������� ������������������  ����������� ������������������  “But����������� ������������������  it’s����������� ������������������  new...”

• Only 32% of software projects considered successful

• 44% are considered “challenged”• 24% never get completed

• 50% for project > $1mil

Wednesday, 6 November, 13

Page 22: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Gather Requirements

Define Data Model

Define Security Constraints

Develop Business Logic

Implement API

Implement UI

Test

Training

Acceptance. Go/No Go

Iterate!

Wednesday, 6 November, 13

Page 23: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Gather Requirements

Training

Acceptance. Go/No Go

Iterate!

Define Data Model

Define Security Constraints

Develop Business Logic

Implement API

Implement UI

Test

Wednesday, 6 November, 13

Page 24: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Gather Requirements

Training

Acceptance. Go/No Go

Iterate!

Define Data Model

Define Security Constraints

Develop Business Logic

Implement API

Implement UI

Test

Wednesday, 6 November, 13

Page 25: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

So����������� ������������������  what’s����������� ������������������  the����������� ������������������  solution?

Wednesday, 6 November, 13

Page 26: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Wednesday, 6 November, 13

Page 27: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Wednesday, 6 November, 13

Page 28: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

The����������� ������������������  xnlogic����������� ������������������  framework

• RESTful API driven application framework• Declare your model, define your business logic• Framework then produces a domain-specific

JSON and xml api

Wednesday, 6 November, 13

Page 29: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Advanced����������� ������������������  Features

• Composable models vs Inheritance• Fine-grained security• History Graph for temporal queries• Multi-tenant: • One framework, multiple applications

• Customer segregation

Wednesday, 6 November, 13

Page 30: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Composable����������� ������������������  Parts

ContactDetails

HasAccounts

HasFriends

HasEmployer

Person

ContactDetails

HasAccounts

Jurisdiction

CorporateDetails

Business

Employer

Wednesday, 6 November, 13

Page 31: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Composable����������� ������������������  Parts

ContactDetails

HasAccounts

HasFriends

HasEmployer

Person

ContactDetails

HasAccounts

Jurisdiction

CorporateDetails

Business

Employer

Wednesday, 6 November, 13

Page 32: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

• Composition promotes code reuse (DRY)

• Here, color shows the delta between a Person and a Business model (Hypothetical)

• User permissions are tied to the “Part”

• Parts define properties, relationships, actions and traversals

Wednesday, 6 November, 13

Page 33: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Simple����������� ������������������  Part����������� ������������������  Definitions

module YourApplication module ContactDetails pacer_vertex

property :address, type: :text property :lat, type: :numeric property :lon, type: :numeric endend

module YourApplication module HasEmployer pacer_vertex

to_one :employer endend

Wednesday, 6 November, 13

Page 34: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

RESTful����������� ������������������  API

Wednesday, 6 November, 13

Page 35: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Self����������� ������������������  Describing,����������� ������������������  Domain����������� ������������������  Specific����������� ������������������  API

GET /is[ 'contact_details', 'has_accounts', 'has_employer', 'has_friends', 'corporate_details', 'jurisdiction']

GET /model[ 'person', 'business']

PartsThe building blocks of your application

ModelsComposed of Parts

Wednesday, 6 November, 13

Page 36: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Metadata����������� ������������������  Driven

GET /is/contact_details/metadata{ update_access: true, create_access: true, delete_access: true, parts: [ 'record', 'contact_details' ], descriptive_parts: [ 'contact_details' ], properties: { name: { name: 'name', label: 'Name', type: 'text', unit: null, default: null, validations: { allow_blank: true }, part: 'record', index: true },...

Includes: 1)Current-user’s access rights2)Property definitions3)Relationship definitions4)Validation rules5)Actions/Jobs6)Queries/Traversals

Wednesday, 6 November, 13

Page 37: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Built-in����������� ������������������  Documentation

GET /is/contact_details/metadata/doc

Wednesday, 6 November, 13

Page 38: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

URLs����������� ������������������  map����������� ������������������  to����������� ������������������  Traversals

GET /model/person/rel/employer[ { meta: { xnid: '/model/business/2028', model_name: 'business', rendered: [ 'record', 'contact_details', ‘has_accounts’, ‘corporate_details’], format: 'partial' }, id: 2028, name: 'Acme Bank', rel: {}, description: 'A very large FI.', created_at: ‘2012-10-02 12:07:31, updated_at: null, address: '88 Fairtrade Blvd., NYC.', lat: '40.755622', lon: '-73.977221', company_url: 'http://www.acme.com', display_name: 'FI - US - ACME' ...},

Returns: 1)All employers of all people

Wednesday, 6 November, 13

Page 39: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Limitless����������� ������������������  Queries

/model/person/filter/name/rel/employer/rel/customer/filter/related_employer ?name[regex]=J.*Bloggs

Wednesday, 6 November, 13

Page 40: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Limitless����������� ������������������  Queries

/model/person/filter/name/rel/employer/rel/customer/filter/related_employer ?name[regex]=J.*Bloggs

Wednesday, 6 November, 13

Page 41: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Limitless����������� ������������������  Queries

/model/person/filter/name/rel/employer/rel/customer/filter/related_employer ?related_employer[id]=972

Wednesday, 6 November, 13

Page 42: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Limitless����������� ������������������  Queries

/model/person/filter/name/rel/employer/rel/customer/filter/related_employer ?related_employer[id]=972

Wednesday, 6 November, 13

Page 43: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Limitless����������� ������������������  Queries

/model/person/filter/name/rel/employer/rel/customer/filter/related_employer ...&related_employer[id]=972

Wednesday, 6 November, 13

Page 44: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

So����������� ������������������  What?

Wednesday, 6 November, 13

Page 45: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

So����������� ������������������  What?

• Eliminate “infrastructure” development cycles• Bootstrap HTML5 User Interface

Wednesday, 6 November, 13

Page 46: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

So����������� ������������������  What?

• Eliminate “infrastructure” development cycles• Bootstrap HTML5 User Interface

• Shorter Time To Market

Wednesday, 6 November, 13

Page 47: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

So����������� ������������������  What?

• Eliminate “infrastructure” development cycles• Bootstrap HTML5 User Interface

• Shorter Time To Market• Software Project Risk Reduction

Wednesday, 6 November, 13

Page 48: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

So����������� ������������������  What?

• Eliminate “infrastructure” development cycles• Bootstrap HTML5 User Interface

• Shorter Time To Market• Software Project Risk Reduction• Powered by Graph™ - Answer the hard Q’s

Wednesday, 6 November, 13

Page 49: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Quick����������� ������������������  Example

Wednesday, 6 November, 13

Page 50: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Questions?

Wednesday, 6 November, 13

Page 51: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  @[email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  

Graph����������� ������������������  Applications����������� ������������������  for����������� ������������������  the����������� ������������������  Enterprise,����������� ������������������  FAST

Wednesday, 6 November, 13

Page 52: Enterprise graph applications

David����������� ������������������  Colebatch����������� ������������������  ����������� ������������������  ����������� ������������������  [email protected]����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  @dcolebatch

Resources

xnlogic.comgithub.com/pangloss/pacermeetup.com/GraphTO

Wednesday, 6 November, 13