SlideShare a Scribd company logo
1 of 27
Download to read offline
Jun 2021
Neptune Graph
Database
0 to Production
Ohad Israeli
Platform Architect @ NI
, Ohad.Israeli@naturalint.com
Whiteboard
Objects
Connections
Flow
Graphs are all around us
Places
Roads
Cars
Branches
PRs
Build Flow
Friends
Likes
Shares
Ohad Israeli
Platform Architect @ NI
20+ Years of Software Architecture
What are we
going to talk about today?
Sharing my experience of mapping
entities @ NI using AWS Neptune / Kafka / NestJS
1. Why graph database ?
2. How did we use it ?
3. What we learned ?
4. What you need to know ?
setTimeout(presentationEnd, 30min, ‘lets start');
90% 5% 5%
Natural Intelligence in a Nutshell
www.naturalint.com/jobs Full Stack, Frontend, Data Scientists, QA Lead, R&D Directors, Senior DevOps …
Natural Intelligence in a Nutshell
6M
Leads generated
annually
9M
Monthly
Unique Visitors
130+
Countries
Reached
10
Years of
Expertise
320+
Talented
Employees
www.naturalint.com/jobs Full Stack, Frontend, Data Scientists, QA Lead, R&D Directors, Senior DevOps …
Natural Intelligence R&D in a Nutshell
NodeJS / NestJS
Serving platform + Backend
Microservices
Java / Python
Data science / Machine learning
KAFKA / Kinesis
Event Bus
AWS
Fully invested
www.naturalint.com/jobs Full Stack, Frontend, Data Scientists, QA Lead, R&D Directors, Senior DevOps …
meetup.com/CodeNaturally
OK, let’s get started
Chapter 1
Graph Data What ?
Databases Types
Relational Databases
Sql server
Oracle
DB2
MySQL
Postgresql
…
...
Document Databases
Aerospike
CouchDB
MongoDB
Elasticsearch
Solr
…
…
What is Graph Database ?
- No pre-defined model
- Data modeled like a drawing on a whiteboard
- Relationships between data as equally
important to the data itself
Role In the
Name
Age
Height
Phone
Name
Person Company
Graph Databases
Graph Databases
AWS Neptune
NEO4J
DataStax
JanusGraph
OrientDB
ArangoDB
Dgraph
NabulaGraph
…
…
Query Language
Gremlin
SparQL
Cypher
nGQL
Proprietary
…
…
Gremlin
g.V(person).valueMap();
SparQL
select ?p where {?p}
Cypher
MATCH (n:character {name:”person"}) RETURN properties(n)
nGQL
FETCH PROP ON character hash(”person");
Coding time start in …
github.com / israelio / graphdb-intro
Chapter 2
How did we use it ?
Entity relations mapping solution architecture
Product
Feature
Rule
Kafka
Event Bus
Graph DB
Neptune
Mapping
Service
CRUD Events
Consume Events
Gremlin Queries
Chapter 3
What did we learn ???
What do you need to know ?
Let’s get into it
● Development
● Data import
● Data export
● Testing
● Deployment
DEVELOPMENT LIFECYCLE
Mapping Service
● NodeJS MicroServices Framework ( nestjs.com )
● Extensible
● Promote Design patterns
● Reusable services
● Lots of integrations
● Typescript enabled
● KafkaJS integration (already implemented – we extended it a bit)
● AWS Neptune repository service (we wrote it internally)
Mapping
Service
NestJS + Kafka
npm i -g @nestjs/cli
● Use @EventPattern to handle Kafka events
nest new project-name
Javascript + Gremlin
import * as gremlin from 'gremlin'
● Use retry mechanism
● Use direct references
● Use UpSert pattern
● Add singularity
1
2
3
4
5
Cost explorer
AWS
Neptune
Cloud
Production / Staging
Development / Testing
MIN
250$
● Price per instance / instance type
?
Local
Cost explorer
AWS
Neptune
Cloud
Tinkerpop
Local
JanusGraph
Production / Staging
Development / Testing
MIN
250$
FREE
● In memory
● Large database is an issue in
load time and memory
consumption
● Price per instance / instance type
tinkerpop.apache.org / janusgraph.org
Dev/Test - Tinkerpop + Kafka
● Use dockers to host Tinkepop and Kafka locally
● Configure Tinkerpop server yml to use persistency / Use JanusGraph
● Add all dockers to the same network
● Add dependencies between the dockers
● Add Xeotek KaDeckWeb docker – it will assist you in dev / test / prod with kafka
● Add AWS graph notebook docker - github.com/BarrMan/graph-notebook-docker
Import / Export
Export data
Import data
Production / Staging
Development / Testing
AWS
Neptune
Cloud
Tinkerpop
Local
● Write your own code / scripts
Java/NodeJS/Python
● AWS Bulk data loader
● Write your own code / scripts
Java/NodeJS/Python
● Neptune-Export.jar
github.com/awslabs/amazon-neptune-tools
● Configure persistency
Export
Export data
● Neptune-Export.jar
github.com/awslabs/amazon-neptune-tools
● java -jar neptune-export.jar export-pg -e db-name.neptune.amazonaws.com
-d ./Neptune ß Dump to local folder
--use-ssl
--serializer GRAPHBINARY_V1D0 ß Compatibility with tinkerpop
--clone-cluster ß Create new export cluster
--clone-cluster-instance-type db.r5.larg
Production
● Use AWS support if you need – they are great !
● We had performance issue with UpSert
It took 4.5 sec to complete
we got hotfix from AWS Support and it had been fixed in a later version
● We had high CPU for low numbers of gremlin transactions even on huge instances
Use direct references to nodes / edges when you can
● Do not forget to add retry on concurrency failures
● Monitor your queries, server load and gremlin errors
Summary
- Don’t be afraid from using Graph Databases
- Use them only when / where it makes sense
( 3 – 4 joins | traversal path )
- Working with NodeJS ? - Give NestJS a try
- Event sourcing is great for system decoupling
Kafka is awesome !
More info about this topic will be posted at:
medium.com/natural-intelligence
Ohad Israeli
Platform Architect
Natural Intelligence
Ohad.israeli@naturalint.com
https://github.com/israelio/graphdb-intro

More Related Content

What's hot

SIGGRAPH Presentation 2016 Slides
SIGGRAPH Presentation 2016 SlidesSIGGRAPH Presentation 2016 Slides
SIGGRAPH Presentation 2016 SlidesAaron Carey
 
Hey Terraform, build me GCP Infrastructure
Hey Terraform, build me GCP InfrastructureHey Terraform, build me GCP Infrastructure
Hey Terraform, build me GCP InfrastructurePradeep Bhadani
 
AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...
AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...
AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...AWS User Group - Thailand
 
Cloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansibleCloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansibleGeert Theys
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knativeMofizur Rahman
 
Techconnectseattle
TechconnectseattleTechconnectseattle
TechconnectseattleBlake Diers
 
Google Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlowGoogle Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlowHayato Yoshikawa
 
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...Tom Kerkhove
 
Serverless Reality
Serverless RealityServerless Reality
Serverless RealityLynn Langit
 
Knative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and OpenshiftKnative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and OpenshiftChris Suszyński
 
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...Carol Chen
 
Machine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE FukuokaMachine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE FukuokaLINE Corporation
 
Machine learning in the physical world by Kip Larson from AWS IoT
Machine learning in the physical world by  Kip Larson from AWS IoTMachine learning in the physical world by  Kip Larson from AWS IoT
Machine learning in the physical world by Kip Larson from AWS IoTBill Liu
 
Hands on Compute Engine
Hands on Compute EngineHands on Compute Engine
Hands on Compute EngineSimon Su
 
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...Tom Kerkhove
 
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.devEnd-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.devKonstantin Tarkus
 
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...Codit
 

What's hot (20)

SIGGRAPH Presentation 2016 Slides
SIGGRAPH Presentation 2016 SlidesSIGGRAPH Presentation 2016 Slides
SIGGRAPH Presentation 2016 Slides
 
Hey Terraform, build me GCP Infrastructure
Hey Terraform, build me GCP InfrastructureHey Terraform, build me GCP Infrastructure
Hey Terraform, build me GCP Infrastructure
 
AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...
AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...
AWS Community Day Bangkok 2019 - How AWS Parallel Cluster can accelerate high...
 
Cloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansibleCloudformation vs terraform_vs_ansible
Cloudformation vs terraform_vs_ansible
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Techconnectseattle
TechconnectseattleTechconnectseattle
Techconnectseattle
 
Google Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlowGoogle Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlow
 
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
AZUG Lightning Talk - Application autoscaling on Kubernetes with Kubernetes E...
 
Serverless Reality
Serverless RealityServerless Reality
Serverless Reality
 
Fermilab aws on demand
Fermilab aws on demandFermilab aws on demand
Fermilab aws on demand
 
Go With The Flow
Go With The FlowGo With The Flow
Go With The Flow
 
Knative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and OpenshiftKnative, Serverless on Kubernetes, and Openshift
Knative, Serverless on Kubernetes, and Openshift
 
Industrial Light & Magic
Industrial Light & MagicIndustrial Light & Magic
Industrial Light & Magic
 
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
Ansible Dresden meetup (Dec 2019) - How Operators with Ansible make Kubernete...
 
Machine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE FukuokaMachine Learning Platform in LINE Fukuoka
Machine Learning Platform in LINE Fukuoka
 
Machine learning in the physical world by Kip Larson from AWS IoT
Machine learning in the physical world by  Kip Larson from AWS IoTMachine learning in the physical world by  Kip Larson from AWS IoT
Machine learning in the physical world by Kip Larson from AWS IoT
 
Hands on Compute Engine
Hands on Compute EngineHands on Compute Engine
Hands on Compute Engine
 
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
Microsoft Partners - Application Autoscaling Made Easy With Kubernetes Event-...
 
End-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.devEnd-to-end test automation with Endtest.dev
End-to-end test automation with Endtest.dev
 
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
Application Autoscaling Made Easy with Kubernetes Event-Driven Autoscaling (K...
 

Similar to Neptue Graph Database - 0 to Production

Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21JDA Labs MTL
 
DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT_MTL
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...NETWAYS
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAmazon Web Services
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetessparkfabrik
 
Cloud-native Patterns
Cloud-native PatternsCloud-native Patterns
Cloud-native PatternsVMware Tanzu
 
Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)Alexandre Roman
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAmazon Web Services
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegVMware Tanzu
 
Making Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaMaking Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaGregor Heine
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSAOracle Korea
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflixaspyker
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesChakradhar Rao Jonagam
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless ToolboxJohan Eriksson
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startQuentin Adam
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316Jupil Hwang
 
Deep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayDeep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayAdam Gibson
 
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and KnativeBuild and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and KnativeOmar Al-Safi
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 

Similar to Neptue Graph Database - 0 to Production (20)

Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21Dsdt meetup 2017 11-21
Dsdt meetup 2017 11-21
 
DSDT Meetup Nov 2017
DSDT Meetup Nov 2017DSDT Meetup Nov 2017
DSDT Meetup Nov 2017
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
Cloud-native Patterns
Cloud-native PatternsCloud-native Patterns
Cloud-native Patterns
 
Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)
 
AWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for GovernmentAWS Webcast - Build Agile Applications in AWS Cloud for Government
AWS Webcast - Build Agile Applications in AWS Cloud for Government
 
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott DeegExploring Next Generation Buildpacks - Anand Rao & Scott Deeg
Exploring Next Generation Buildpacks - Anand Rao & Scott Deeg
 
Making Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with NovaMaking Service Deployments to AWS a breeze with Nova
Making Service Deployments to AWS a breeze with Nova
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
 
Developing Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/KubernetesDeveloping Microservices Directly in AKS/Kubernetes
Developing Microservices Directly in AKS/Kubernetes
 
Azure Serverless Toolbox
Azure Serverless ToolboxAzure Serverless Toolbox
Azure Serverless Toolbox
 
Confoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to startConfoo - Javascript Server Side : How to start
Confoo - Javascript Server Side : How to start
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
Deep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayDeep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the Bay
 
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and KnativeBuild and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
Build and Deploy Cloud Native Camel Quarkus routes with Tekton and Knative
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 

Recently uploaded

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 

Recently uploaded (20)

Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 

Neptue Graph Database - 0 to Production

  • 1. Jun 2021 Neptune Graph Database 0 to Production Ohad Israeli Platform Architect @ NI , Ohad.Israeli@naturalint.com
  • 2. Whiteboard Objects Connections Flow Graphs are all around us Places Roads Cars Branches PRs Build Flow Friends Likes Shares
  • 3. Ohad Israeli Platform Architect @ NI 20+ Years of Software Architecture
  • 4. What are we going to talk about today? Sharing my experience of mapping entities @ NI using AWS Neptune / Kafka / NestJS 1. Why graph database ? 2. How did we use it ? 3. What we learned ? 4. What you need to know ? setTimeout(presentationEnd, 30min, ‘lets start'); 90% 5% 5%
  • 5. Natural Intelligence in a Nutshell www.naturalint.com/jobs Full Stack, Frontend, Data Scientists, QA Lead, R&D Directors, Senior DevOps …
  • 6. Natural Intelligence in a Nutshell 6M Leads generated annually 9M Monthly Unique Visitors 130+ Countries Reached 10 Years of Expertise 320+ Talented Employees www.naturalint.com/jobs Full Stack, Frontend, Data Scientists, QA Lead, R&D Directors, Senior DevOps …
  • 7. Natural Intelligence R&D in a Nutshell NodeJS / NestJS Serving platform + Backend Microservices Java / Python Data science / Machine learning KAFKA / Kinesis Event Bus AWS Fully invested www.naturalint.com/jobs Full Stack, Frontend, Data Scientists, QA Lead, R&D Directors, Senior DevOps … meetup.com/CodeNaturally
  • 8. OK, let’s get started Chapter 1 Graph Data What ?
  • 9. Databases Types Relational Databases Sql server Oracle DB2 MySQL Postgresql … ... Document Databases Aerospike CouchDB MongoDB Elasticsearch Solr … …
  • 10. What is Graph Database ? - No pre-defined model - Data modeled like a drawing on a whiteboard - Relationships between data as equally important to the data itself Role In the Name Age Height Phone Name Person Company
  • 11. Graph Databases Graph Databases AWS Neptune NEO4J DataStax JanusGraph OrientDB ArangoDB Dgraph NabulaGraph … … Query Language Gremlin SparQL Cypher nGQL Proprietary … … Gremlin g.V(person).valueMap(); SparQL select ?p where {?p} Cypher MATCH (n:character {name:”person"}) RETURN properties(n) nGQL FETCH PROP ON character hash(”person");
  • 12. Coding time start in … github.com / israelio / graphdb-intro
  • 13. Chapter 2 How did we use it ?
  • 14. Entity relations mapping solution architecture Product Feature Rule Kafka Event Bus Graph DB Neptune Mapping Service CRUD Events Consume Events Gremlin Queries
  • 15. Chapter 3 What did we learn ??? What do you need to know ?
  • 16. Let’s get into it ● Development ● Data import ● Data export ● Testing ● Deployment DEVELOPMENT LIFECYCLE
  • 17. Mapping Service ● NodeJS MicroServices Framework ( nestjs.com ) ● Extensible ● Promote Design patterns ● Reusable services ● Lots of integrations ● Typescript enabled ● KafkaJS integration (already implemented – we extended it a bit) ● AWS Neptune repository service (we wrote it internally) Mapping Service
  • 18. NestJS + Kafka npm i -g @nestjs/cli ● Use @EventPattern to handle Kafka events nest new project-name
  • 19. Javascript + Gremlin import * as gremlin from 'gremlin' ● Use retry mechanism ● Use direct references ● Use UpSert pattern ● Add singularity 1 2 3 4 5
  • 20. Cost explorer AWS Neptune Cloud Production / Staging Development / Testing MIN 250$ ● Price per instance / instance type ? Local
  • 21. Cost explorer AWS Neptune Cloud Tinkerpop Local JanusGraph Production / Staging Development / Testing MIN 250$ FREE ● In memory ● Large database is an issue in load time and memory consumption ● Price per instance / instance type tinkerpop.apache.org / janusgraph.org
  • 22. Dev/Test - Tinkerpop + Kafka ● Use dockers to host Tinkepop and Kafka locally ● Configure Tinkerpop server yml to use persistency / Use JanusGraph ● Add all dockers to the same network ● Add dependencies between the dockers ● Add Xeotek KaDeckWeb docker – it will assist you in dev / test / prod with kafka ● Add AWS graph notebook docker - github.com/BarrMan/graph-notebook-docker
  • 23. Import / Export Export data Import data Production / Staging Development / Testing AWS Neptune Cloud Tinkerpop Local ● Write your own code / scripts Java/NodeJS/Python ● AWS Bulk data loader ● Write your own code / scripts Java/NodeJS/Python ● Neptune-Export.jar github.com/awslabs/amazon-neptune-tools ● Configure persistency
  • 24. Export Export data ● Neptune-Export.jar github.com/awslabs/amazon-neptune-tools ● java -jar neptune-export.jar export-pg -e db-name.neptune.amazonaws.com -d ./Neptune ß Dump to local folder --use-ssl --serializer GRAPHBINARY_V1D0 ß Compatibility with tinkerpop --clone-cluster ß Create new export cluster --clone-cluster-instance-type db.r5.larg
  • 25. Production ● Use AWS support if you need – they are great ! ● We had performance issue with UpSert It took 4.5 sec to complete we got hotfix from AWS Support and it had been fixed in a later version ● We had high CPU for low numbers of gremlin transactions even on huge instances Use direct references to nodes / edges when you can ● Do not forget to add retry on concurrency failures ● Monitor your queries, server load and gremlin errors
  • 26. Summary - Don’t be afraid from using Graph Databases - Use them only when / where it makes sense ( 3 – 4 joins | traversal path ) - Working with NodeJS ? - Give NestJS a try - Event sourcing is great for system decoupling Kafka is awesome ! More info about this topic will be posted at: medium.com/natural-intelligence
  • 27. Ohad Israeli Platform Architect Natural Intelligence Ohad.israeli@naturalint.com https://github.com/israelio/graphdb-intro