how shutl delivers even faster using neo4j · 2014. 12. 11. · how shutl delivers even faster...
TRANSCRIPT
![Page 1: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/1.jpg)
![Page 2: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/2.jpg)
How Shutl Delivers Even Faster Using Neo4j
Sam Phillips and Volker Pacher @samsworldofno @vpacher
![Page 3: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/3.jpg)
Volker Pacher
Sam Phillips
![Page 4: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/4.jpg)
Graphs at Shutl
![Page 5: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/5.jpg)
Graphs at Shutl
• Graph databases are awesome
![Page 6: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/6.jpg)
Graphs at Shutl
• Graph databases are awesome
• We’ve seen lots of the talks about modelling
![Page 7: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/7.jpg)
Graphs at Shutl
• Graph databases are awesome
• We’ve seen lots of the talks about modelling
• But querying is important too
![Page 8: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/8.jpg)
Graphs at Shutl
• Graph databases are awesome
• We’ve seen lots of the talks about modelling
• But querying is important too
• So let’s talk about querying too!
![Page 9: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/9.jpg)
Show of hands
![Page 10: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/10.jpg)
Show of hands
• Who has used graph databases before?
![Page 11: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/11.jpg)
Show of hands
• Who has used graph databases before?
• Who has used Neo4j before?
![Page 12: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/12.jpg)
Shutl
![Page 13: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/13.jpg)
Shutl
![Page 14: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/14.jpg)
ECOMMERCE IS QUICK & CONVENIENT
![Page 15: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/15.jpg)
ECOMMERCE IS QUICK & CONVENIENT
![Page 16: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/16.jpg)
PAYPAL FOR AWESOME DELIVERY
![Page 17: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/17.jpg)
PAYPAL FOR AWESOME DELIVERY
![Page 18: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/18.jpg)
PAYPAL FOR AWESOME DELIVERY
Branded, super quick delivery that people trust, embedded in merchant websites
![Page 19: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/19.jpg)
A B
HUB & SPOKE
![Page 20: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/20.jpg)
A B
HUB & SPOKE
![Page 21: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/21.jpg)
A B
Only cost effective means to deliver 10+ miles but slow and unpredictable
HUB & SPOKE
![Page 22: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/22.jpg)
A B
Only cost effective means to deliver 10+ miles but slow and unpredictableHUB & SPOKE
![Page 23: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/23.jpg)
A B
Only cost effective means to deliver 10+ miles but slow and unpredictableHUB & SPOKE
POINT TO POINT
AB
![Page 24: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/24.jpg)
A B
Only cost effective means to deliver 10+ miles but slow and unpredictableHUB & SPOKE
POINT TO POINT
Fast and predictable but cost prohibitive over longer distances
AB
![Page 25: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/25.jpg)
HUB & SPOKE
97% Courier, Express & Parcel Market
![Page 26: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/26.jpg)
POINT TO POINT
3% Courier, Express & Parcel Market
![Page 27: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/27.jpg)
POINT TO POINT
3% Courier, Express & Parcel Market
+7,500 more!
![Page 28: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/28.jpg)
POINT TO POINT
![Page 29: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/29.jpg)
SHOP
![Page 30: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/30.jpg)
Shutl generates a quote from each relevant carrier within platform
SHOP
$$
$$$
$
$$
$
$
![Page 31: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/31.jpg)
Shutl generates a quote from each relevant carrier within platform
Optimum picked basedon price & quality rating
SHOP
$$
$$$
$
$$
$
$$
![Page 32: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/32.jpg)
SHOPSHOP
![Page 33: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/33.jpg)
On checkout, delivery sent via API intochosen carrier’s transportation system
SHOP
$$
SHOP
![Page 34: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/34.jpg)
On checkout, delivery sent via API intochosen carrier’s transportation system
Courier collects from neareststore and delivers to shopper
SHOP
$$
![Page 35: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/35.jpg)
![Page 36: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/36.jpg)
Delivery status updated inreal-time, performancecompared against SLA &carrier quality rating updated
Better performing carriersget more deliveries & candemand higher prices
![Page 37: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/37.jpg)
Delivery status updated inreal-time, performancecompared against SLA &carrier quality rating updated
Better performing carriersget more deliveries & candemand higher prices
![Page 38: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/38.jpg)
Delivery status updated inreal-time, performancecompared against SLA &carrier quality rating updated
Better performing carriersget more deliveries & candemand higher prices
![Page 39: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/39.jpg)
Track your order online…
![Page 40: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/40.jpg)
FEEDBACK
Quality paramount since we are motivated by LTV of shopper
![Page 41: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/41.jpg)
FEEDBACK
Quality paramount since we are motivated by LTV of shopper
![Page 42: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/42.jpg)
FEEDBACK
Shutl sends feedback email to consumer seconds after they have received delivery asking to rate qualitative aspects of experience
![Page 43: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/43.jpg)
FEEDBACK
Feedback streamed unedited to shutl.com/feedback & facebook
![Page 44: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/44.jpg)
FEEDBACK
![Page 45: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/45.jpg)
FEEDBACK
![Page 46: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/46.jpg)
FEEDBACK
![Page 47: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/47.jpg)
FEEDBACK
![Page 48: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/48.jpg)
![Page 49: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/49.jpg)
COMPANYSHUTL IS NOW AN
![Page 50: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/50.jpg)
Version OneRuby 1.8, Rails 2.3 and MySQL
![Page 51: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/51.jpg)
Version OneRuby 1.8, Rails 2.3 and MySQL
![Page 52: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/52.jpg)
Version OneRuby 1.8, Rails 2.3 and MySQL
• Well-known tale: built quickly, worked slowly, tough to maintain
• Getting a quote for an hour time-slot took over 4 seconds
![Page 53: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/53.jpg)
Here is the Shutl price calendar
![Page 54: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/54.jpg)
Here is the Shutl price calendar
To generate this in V1, the merchant site would have had to call Shutl to get available slots (2 seconds)
![Page 55: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/55.jpg)
Here is the Shutl price calendar
To generate this in V1, the merchant site would have had to call Shutl to get available slots (2 seconds)
Then, they would have to call Shutl to generate a quote for each slot - for two days of store opening, that’s 20+ slots
![Page 56: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/56.jpg)
Here is the Shutl price calendar
To generate this in V1, the merchant site would have had to call Shutl to get available slots (2 seconds)
Then, they would have to call Shutl to generate a quote for each slot - for two days of store opening, that’s 20+ slots
So, that’s 2 + (20 x 4) seconds, 1:22 to generate the data for this calendar
![Page 57: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/57.jpg)
Here is the Shutl price calendar
To generate this in V1, the merchant site would have had to call Shutl to get available slots (2 seconds)
Then, they would have to call Shutl to generate a quote for each slot - for two days of store opening, that’s 20+ slots
So, that’s 2 + (20 x 4) seconds, 1:22 to generate the data for this calendar
In V1, this UX could never have happened.
![Page 58: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/58.jpg)
V2
![Page 59: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/59.jpg)
• Broke app into services
• Services focused around functions like quoting, booking, and giving feedback
• Key goal for the project was improving the speed of the quoting operation, which is where we used graph databases
V2
![Page 60: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/60.jpg)
V1
V2
![Page 61: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/61.jpg)
V1
V2
• Quoting for 20 windows down from 82000 ms to 800 ms
![Page 62: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/62.jpg)
V1
V2
• Quoting for 20 windows down from 82000 ms to 800 ms
• Code complexity much reduced
![Page 63: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/63.jpg)
V1
V2
• Quoting for 20 windows down from 82000 ms to 800 ms
• Code complexity much reduced
![Page 64: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/64.jpg)
A large part of the success of our rewrite was down to the graph database.
![Page 65: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/65.jpg)
What is a graph anyway?
![Page 66: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/66.jpg)
![Page 67: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/67.jpg)
a collection of vertices (nodes) connected by edges (relationships)
a simple graph
![Page 68: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/68.jpg)
a short history
Leonard Euler
the seven bridges of Königsberg (1735)!
![Page 69: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/69.jpg)
the seven bridges of Königsberg (1735)!
![Page 70: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/70.jpg)
the seven bridges of Königsberg (1735)!
![Page 71: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/71.jpg)
the seven bridges of Königsberg (1735)!
![Page 72: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/72.jpg)
the seven bridges of Königsberg (1735)!
![Page 73: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/73.jpg)
the seven bridges of Königsberg (1735)!
![Page 74: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/74.jpg)
Euler walk
each node has an even degree
![Page 75: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/75.jpg)
Euler walk
![Page 76: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/76.jpg)
Euler walk
![Page 77: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/77.jpg)
Euler walk
two nodes have an odd degree
![Page 78: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/78.jpg)
Euler walk
two nodes have an odd degree
![Page 79: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/79.jpg)
Euler walk
two nodes have an odd degree
no
![Page 80: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/80.jpg)
directed graph
each relationship has a direction or one start node and one end node
![Page 81: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/81.jpg)
property graph
Person name: Sam
nodes contain properties (key, value) relationships have a type and are always directed relationships can contain properties too
Person name: Volker
:friends
Person name: Megan
:knows since: 2005
Company name: eBay
:friends
:works_for
:works_for
![Page 82: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/82.jpg)
The Case for Graph Databases
![Page 83: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/83.jpg)
relationships are explicit stored
![Page 84: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/84.jpg)
additive domain modelling
![Page 85: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/85.jpg)
whiteboard friendly
![Page 86: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/86.jpg)
traversals of relationships are easy and very fast
![Page 87: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/87.jpg)
DB performance remains relatively constant as
queries are localised to its portion of the graph.
O(1) for same query
![Page 88: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/88.jpg)
a graph is its own index (constant query performance)
![Page 89: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/89.jpg)
a graph is its own index (constant query performance)
![Page 90: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/90.jpg)
a graph is its own index (constant query performance)
![Page 91: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/91.jpg)
the case for Neo4j
![Page 92: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/92.jpg)
standalone or embedded in jvm
![Page 93: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/93.jpg)
ruby/jruby
![Page 94: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/94.jpg)
ruby libraries - neo4j gem by Andreas Ronge (https://github.com/andreasronge/neo4j)
![Page 95: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/95.jpg)
cypher
![Page 96: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/96.jpg)
the neotech guys are awesome
![Page 97: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/97.jpg)
Querying the graph: Cypher
declarative query language specific to neo4j
easy to learn and intuitive
use specific patterns to query for (something that looks like ‘this’)
inspired partly by SQL (WHERE and ORDER BY) and SPARQL (pattern matching)
focuses on what to query for and not how to query for it
switch from a mySQl world is made easier by the use of cypher instead of having to learn
a traversal framework straight away
![Page 98: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/98.jpg)
START: Starting points in the graph, obtained via index lookups or by element IDs. MATCH: The graph pattern to match, bound to the starting points in START. WHERE: Filtering criteria. RETURN: What to return. CREATE: Creates nodes and relationships. DELETE: Removes nodes, relationships and properties. SET: Set values to properties. FOREACH: Performs updating actions once per element in a list. WITH: Divides a query into multiple, distinct parts
cypher clauses
![Page 99: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/99.jpg)
START: Starting points in the graph, obtained via index lookups or by element IDs. MATCH: The graph pattern to match, bound to the starting points in START. WHERE: Filtering criteria. RETURN: What to return. CREATE: Creates nodes and relationships. DELETE: Removes nodes, relationships and properties. SET: Set values to properties. FOREACH: Performs updating actions once per element in a list. WITH: Divides a query into multiple, distinct parts
cypher clauses
START: Starting points in the graph, obtained via index lookups or by element IDs. MATCH: The graph pattern to match, bound to the starting points in START. WHERE: Filtering criteria. RETURN: What to return. CREATE: Creates nodes and relationships. DELETE: Removes nodes, relationships and properties. SET: Set values to properties. FOREACH: Performs updating actions once per element in a list. WITH: Divides a query into multiple, distinct parts
![Page 100: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/100.jpg)
an example
Person name: Sam
Person name: Volker
:friends
Person name: Megan
:knows since: 2005
Company name: eBay
:friends
:works_for
:works_for
Person name: Jim
:friends
Company name: neotech
:works_for
![Page 101: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/101.jpg)
find all the companies my friends work for
MATCH (person{ name:’Volker’ }) -[:friends] - (person) - [:works_for]-> companyRETURN company
![Page 102: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/102.jpg)
find all the companies my friends work for
MATCH (person{ name:’Volker’ }) -[:friends] - (person) - [:works_for]-> companyRETURN company
![Page 103: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/103.jpg)
find all the companies my friends work for
MATCH (person{ name:’Volker’ }) -[:friends] - (person) - [:works_for]-> companyRETURN company
Person name: Sam
Person name: Volker
:friends
Person name: Megan
:knows since: 2005
Company name: eBay
:friends
:works_for
:works_for
Person name: Jim
:friends
Company name: neotech
:works_for
![Page 104: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/104.jpg)
find all the companies my friend’s friends work for
MATCH (person{ name:’Volker’ }) -[:friends*2..2]-(person) - [:works_for] -> company
RETURN company
![Page 105: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/105.jpg)
find all the companies my friend’s friends work for
MATCH (person{ name:’Volker’ }) -[:friends*2..2]-(person) - [:works_for] -> company
RETURN company
![Page 106: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/106.jpg)
find all the companies my friend’s friends work for
MATCH (person{ name:’Volker’ }) -[:friends*2..2]-(person) - [:works_for] -> company
RETURN company
Person name: Sam
Person name: Volker
:friends
Person name: Megan
:knows since: 2005
Company name: eBay
:friends
:works_for
:works_for
Person name: Jim
:friends
Company name: neotech
:works_for
![Page 107: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/107.jpg)
find all my friends who work for neotech
MATCH (person{ name:’Volker’ }) -[:friends] -(friends) - [:works_for]-> companyWHERE company.name = ‘neotech’RETURN friends
![Page 108: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/108.jpg)
find all my friends who work for neotech
MATCH (person{ name:’Volker’ }) -[:friends] -(friends) - [:works_for]-> companyWHERE company.name = ‘neotech’RETURN friends
![Page 109: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/109.jpg)
find all my friends who work for neotech
MATCH (person{ name:’Volker’ }) -[:friends] -(friends) - [:works_for]-> companyWHERE company.name = ‘neotech’RETURN friends
Person name: Sam
Person name: Volker
:friends
Person name: Megan
:knows since: 2005
Company name: eBay
:friends
:works_for
:works_for
Person name: Jim
:friends
Company name: neotech
:works_for
![Page 110: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/110.jpg)
a good place to try it out: !
http://console.neo4j.org/ !
http://gist.neo4j.org/
![Page 111: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/111.jpg)
coverage example
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
![Page 112: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/112.jpg)
coverage example
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
Carrier id = carrier_1
:operates :operates
![Page 113: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/113.jpg)
coverage example
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
Carrier id = carrier_1
:operates :operates
![Page 114: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/114.jpg)
coverage example
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
:operates Carrier id = carrier_2
Carrier id = carrier_1
:operates :operates
![Page 115: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/115.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> (locality) <- [:operates]- carrierRETURN carrier
the query
![Page 116: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/116.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> (locality) <- [:operates]- carrierRETURN carrier
the query
![Page 117: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/117.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> (locality) <- [:operates]- carrierRETURN carrier
the query
Locality id = 94902
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Locality id = 94903
:contains :contains
Carrier id = carrier_1
:operates :operates
![Page 118: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/118.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> () <- [:contains*0..2] - (locality) <- [:operates]- carrierRETURN carrier
the query
![Page 119: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/119.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> () <- [:contains*0..2] - (locality) <- [:operates]- carrierRETURN carrier
the query
![Page 120: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/120.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> () <- [:contains*0..2] - (locality) <- [:operates]- carrierRETURN carrier
the query
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
:operates Carrier id = carrier_2
Carrier id = carrier_1
:operates :operates
![Page 121: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/121.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> () <- [:contains*0..2] - (locality) <- [:operates]- carrierRETURN carrier
the query
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
:operates Carrier id = carrier_2
Carrier id = carrier_1
:operates :operates
![Page 122: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/122.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> () <- [:contains*0..2] - (locality) <- [:operates]- carrierRETURN carrier
the query
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
:operates Carrier id = carrier_2
Carrier id = carrier_1
:operates :operates
![Page 123: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/123.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> () <- [:contains*0..2] - (locality) <- [:operates]- carrierRETURN carrier
the query
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Locality id = 94903
Locality id = 94902
:contains :contains
:operates Carrier id = carrier_2
Carrier id = carrier_1
:operates :operates
![Page 124: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/124.jpg)
SELECT * FROM carriers LEFT JOIN locations ON carrier.location_id = location.id LEFT JOIN stores ON stores.location_id = carrier.location_id WHERE stores.name = ‘ebay_store’
![Page 125: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/125.jpg)
SELECT * FROM carriers LEFT JOIN locations ON carrier.location_id = location.id OR
carrier.location_id = location.parent_id LEFT JOIN stores ON stores.location_id = carrier.location_id WHERE stores.name = ‘ebay_store’
![Page 126: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/126.jpg)
?
![Page 127: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/127.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> () <- [:contains*0..2] - (locality) <- [:operates]- carrierRETURN carrier
![Page 128: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/128.jpg)
root (0)
Year: 2013
Month: 05 Month: 01
:year_2015
:month_01:month_05
:year_2014
Year: 2015
Month: 06
:month_06
Day: 24 Day: 25
:day_24 :day_25
Day: 26
:day_26
Event 1 Event 2 Event 3
:happens :happens :happens :happens
representing dates/times
![Page 129: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/129.jpg)
find all events on a specific day
START root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event
![Page 130: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/130.jpg)
find all events on a specific daySTART root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event
![Page 131: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/131.jpg)
find all events on a specific daySTART root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event root (0)
Year: 2013
Month: 05 Month: 01
:year_2015
:month_01:month_05
:year_2014
Year: 2015
Month: 06
:month_06
Day: 24 Day: 25
:day_24 :day_25
Day: 26
:day_26
Event 1 Event 2 Event 3
:happens :happens :happens :happens
![Page 132: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/132.jpg)
find all events on a specific daySTART root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event root (0)
Year: 2013
Month: 05 Month: 01
:year_2015
:month_01:month_05
:year_2014
Year: 2015
Month: 06
:month_06
Day: 24 Day: 25
:day_24 :day_25
Day: 26
:day_26
Event 1 Event 2 Event 3
:happens :happens :happens :happens
![Page 133: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/133.jpg)
find all events on a specific daySTART root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event root (0)
Year: 2013
Month: 05 Month: 01
:year_2015
:month_01:month_05
:year_2014
Year: 2015
Month: 06
:month_06
Day: 24 Day: 25
:day_24 :day_25
Day: 26
:day_26
Event 1 Event 2 Event 3
:happens :happens :happens :happens
![Page 134: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/134.jpg)
find all events on a specific daySTART root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event root (0)
Year: 2013
Month: 05 Month: 01
:year_2015
:month_01:month_05
:year_2014
Year: 2015
Month: 06
:month_06
Day: 24 Day: 25
:day_24 :day_25
Day: 26
:day_26
Event 1 Event 2 Event 3
:happens :happens :happens :happens
![Page 135: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/135.jpg)
find all events on a specific daySTART root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event root (0)
Year: 2013
Month: 05 Month: 01
:year_2015
:month_01:month_05
:year_2014
Year: 2015
Month: 06
:month_06
Day: 24 Day: 25
:day_24 :day_25
Day: 26
:day_26
Event 1 Event 2 Event 3
:happens :happens :happens :happens
![Page 136: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/136.jpg)
find all events on a specific daySTART root=node(0)MATCH root - [:year_2014] -> () -[:month_05] ->
()- [:day_24] -> () - [:happens] -> event RETURN event root (0)
Year: 2013
Month: 05 Month: 01
:year_2015
:month_01:month_05
:year_2014
Year: 2015
Month: 06
:month_06
Day: 24 Day: 25
:day_24 :day_25
Day: 26
:day_26
Event 1 Event 2 Event 3
:happens :happens :happens :happens
![Page 137: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/137.jpg)
all together
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Carrier id = carrier_1
:operates
root (0)
Year: 2013
Month: 05
:month_05
:year_2014
Day: 24
:day_24
hour 09
hour 10
:hour_09
:hour_10
hour 11 :hour_11:available {premium: 1}
:available {premium: 1.5}
![Page 138: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/138.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> (locality) <- [:operates]- carrier -
[available:available] -> () <- [:hour_10] - () <- [:day_24] - () [:month_05] - () [:year_2014] - ()
RETURN carrier, available.premium as premium
all together
![Page 139: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/139.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> (locality) <- [:operates]- carrier -
[available:available] -> () <- [:hour_10] - () <- [:day_24] - () [:month_05] - () [:year_2014] - ()
RETURN carrier, available.premium as premium
all together
![Page 140: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/140.jpg)
MATCH (store{ id:’ebay_store’ }) -[:located] -> (locality) <- [:operates]- carrier -
[available:available] -> () <- [:hour_10] - () <- [:day_24] - () [:month_05] - () [:year_2014] - ()
RETURN carrier, available.premium as premium
all together
Locality id = california
Locality id = marin_county
Locality id = 94901
:contains
Store id = ebay_store
:located
:contains
Carrier id = carrier_1
:operates
root (0)
Year: 2013
Month: 05
:month_05
:year_2014
Day: 24
:day_24
hour 09
hour 10
:hour_09
:hour_10
hour 11 :hour_11:available {premium: 1}
:available {premium: 1.5}
![Page 141: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/141.jpg)
Other graph uses
![Page 142: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/142.jpg)
Other graph uses• Recommendation engines
![Page 143: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/143.jpg)
Other graph uses• Recommendation engines
• Organisational analysis
![Page 144: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/144.jpg)
Other graph uses• Recommendation engines
• Organisational analysis
• Graphing your infrastructure
![Page 145: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/145.jpg)
Some gotchas
![Page 146: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/146.jpg)
• There was a learning curve in switching from a relational mentality to a graph one
Some gotchas
![Page 147: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/147.jpg)
• There was a learning curve in switching from a relational mentality to a graph one
• Tooling not as mature as in the relational world
Some gotchas
![Page 148: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/148.jpg)
• There was a learning curve in switching from a relational mentality to a graph one
• Tooling not as mature as in the relational world
• No out of the box solution for db migrations
Some gotchas
![Page 149: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/149.jpg)
• There was a learning curve in switching from a relational mentality to a graph one
• Tooling not as mature as in the relational world
• No out of the box solution for db migrations
• Seeding an embedded database was unfamiliar
Some gotchas
![Page 150: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/150.jpg)
Testing was a challenge
![Page 152: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/152.jpg)
• Setting up scenarios for tests was tedious
• Built our own tool based on the geoff syntax developed by Nigel Small
Testing was a challenge
![Page 153: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/153.jpg)
• Setting up scenarios for tests was tedious
• Built our own tool based on the geoff syntax developed by Nigel Small
• Geoff allows modelling of graphs in textual form and provides an
interface to insert them into an existing graph
Testing was a challenge
![Page 154: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/154.jpg)
• Setting up scenarios for tests was tedious
• Built our own tool based on the geoff syntax developed by Nigel Small
• Geoff allows modelling of graphs in textual form and provides an
interface to insert them into an existing graph
(A) {“name”: “Alice”}
Testing was a challenge
![Page 155: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/155.jpg)
• Setting up scenarios for tests was tedious
• Built our own tool based on the geoff syntax developed by Nigel Small
• Geoff allows modelling of graphs in textual form and provides an
interface to insert them into an existing graph
(A) {“name”: “Alice”}
(B) {“name”: “Bob”}
Testing was a challenge
![Page 156: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/156.jpg)
• Setting up scenarios for tests was tedious
• Built our own tool based on the geoff syntax developed by Nigel Small
• Geoff allows modelling of graphs in textual form and provides an
interface to insert them into an existing graph
(A) {“name”: “Alice”}
(B) {“name”: “Bob”}
(A) -[:KNOWS] -> (B)
Testing was a challenge
![Page 157: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/157.jpg)
• Setting up scenarios for tests was tedious
• Built our own tool based on the geoff syntax developed by Nigel Small
• Geoff allows modelling of graphs in textual form and provides an
interface to insert them into an existing graph
(A) {“name”: “Alice”}
(B) {“name”: “Bob”}
(A) -[:KNOWS] -> (B)
• We created a Ruby dsl for modelling a graph and inserting it into the db
that works with factory_girl
Testing was a challenge
![Page 158: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/158.jpg)
• Setting up scenarios for tests was tedious
• Built our own tool based on the geoff syntax developed by Nigel Small
• Geoff allows modelling of graphs in textual form and provides an
interface to insert them into an existing graph
(A) {“name”: “Alice”}
(B) {“name”: “Bob”}
(A) -[:KNOWS] -> (B)
• We created a Ruby dsl for modelling a graph and inserting it into the db
that works with factory_girl
• Open source - https://github.com/shutl/geoff
Testing was a challenge
![Page 159: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/159.jpg)
Wrap Up
![Page 160: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/160.jpg)
Wrap Up
• Neo4j and graph theory enabled Shutl to achieve big performance increases in its most important operation - calculating delivery prices
![Page 161: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/161.jpg)
Wrap Up
• Neo4j and graph theory enabled Shutl to achieve big performance increases in its most important operation - calculating delivery prices
• It’s a new tool based on tested theory, and cypher is the first language that allows you to query graphs in a declarative way (like SQL)
![Page 162: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/162.jpg)
Wrap Up
• Neo4j and graph theory enabled Shutl to achieve big performance increases in its most important operation - calculating delivery prices
• It’s a new tool based on tested theory, and cypher is the first language that allows you to query graphs in a declarative way (like SQL)
• Tooling and adoption is immature but getting better all the time
![Page 163: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/163.jpg)
Thank you! !
Any questions?
Sam Phillips Head of Engineering
!@samsworldofno
http://samsworldofno.com [email protected]
Volker Pacher Senior Developer !@vpacher https://github.com/vpacher [email protected]
![Page 164: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/164.jpg)
![Page 165: How Shutl Delivers Even Faster Using Neo4j · 2014. 12. 11. · How Shutl Delivers Even Faster Using Neo4j Sam Phillips and Volker Pacher! @samsworldofno @vpacher! ... Then, they](https://reader033.vdocument.in/reader033/viewer/2022060906/60a0e3b99b13a667fe5aea64/html5/thumbnails/165.jpg)
our