Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Our Daily Graphs written in Ruby and Neo4j
hannelita
October 24, 2014
Technology
1
130
Our Daily Graphs written in Ruby and Neo4j
Talk given at RubyConf AR 2014 - Buenos AIres
hannelita
October 24, 2014
Tweet
Share
More Decks by hannelita
See All by hannelita
Java EE 8 - Future, Wishes and Predictions
hannelita
1
140
JVM Internals Demystified
hannelita
0
270
Eletrônica
hannelita
0
130
Cassandra Meetup
hannelita
0
41
Wildfly em alta disponibilidade
hannelita
0
170
Helios - o backend pra Mobile que você precisava <3
hannelita
0
81
Neo4j - Dia a dia com grafos, Neo4j e Ruby
hannelita
1
110
Swift - uma fama repentina
hannelita
1
89
Curso relâmpago de eletrônica básica para desenvolvedores
hannelita
1
97
Other Decks in Technology
See All in Technology
Building smarter apps with machine learning, from magic to reality
picardparis
4
3.2k
FoodTechにおける商流・金流・物流の進化/Evolution of Commercial, Financial, and Logistics in FoodTech
dskst
0
400
SlackBotで あらゆる業務を自動化。問い合わせ〜DevOpsまで #CODT2022
kogatakanori
0
790
Implementing Kubernetes operators in Java with Micronaut - TechWeek Java Summit 2022
alvarosanchez
0
120
QiitaConference2022
fuwasegu
0
170
データエンジニアリングの潮流を俯瞰する
tetsuroito
1
730
220628 「Google AppSheet」タスク管理アプリをライブ作成 吉積情報伊藤さん
comucal
PRO
0
180
リファインメントは楽しいかね?
kitamu_mu
1
410
データ分析で切り拓け! エンジニアとしてのデータ分析職キャリア戦略
ksnt
0
110
The Fractal Geometry of Software Design
vladikk
0
760
ソフトウェアライセンス 2022 / Software License 2022
cybozuinsideout
PRO
1
1.1k
サーバレスECにおける Step Functions の使い方 〜ステートマシン全部見せます!〜
miu_crescent
0
190
Featured
See All Featured
Scaling GitHub
holman
451
140k
In The Pink: A Labor of Love
frogandcode
131
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_i
23
15k
Debugging Ruby Performance
tmm1
65
10k
Learning to Love Humans: Emotional Interface Design
aarron
261
37k
Why You Should Never Use an ORM
jnunemaker
PRO
47
7.6k
Code Reviewing Like a Champion
maltzj
506
37k
Making Projects Easy
brettharned
98
4.3k
A Tale of Four Properties
chriscoyier
149
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
29
4.3k
Clear Off the Table
cherdarchuk
79
280k
Transcript
Our Daily Graphs Written in Ruby and Neo4j
Hola! / Oi! / Hi! • Hanneli - from Brazil
• CodeMiner 42 • Coffee (coffee, coffee, coffee, coffee, coffee, coffee), Pokémon, Lego and animals <3 HIRING
We *WON’T* see here • Advanced graph theory • Neo4j
complete guide • Java stuff (Neo4j is written in Java) • Social Networks classics example (eeeww)
Why graphs? In a Ruby Conference!
Example How does Codeminer build dev teams?
Example How does Codeminer build dev teams? MATCH
How many times have you made drawings like these?
Some history • Euler • Statistics • Patterns/relationship • Dependencies
• Routes
Persistence
Persistence
Persistence One of the first CS subjects is…
Do you remember? Queue Stack Hash Tree Graphs
Persistence What’s the first storing system we study! into databases
class? a. Queue b. Stack c. Hash d. Tree e. None
Persistence
Have you ever thought about it?
When did I notice that?
Hydropower modelling
Hydropower in Brazil
Wanna represent hydropower map into relational model HYDROPOWER_PLANT locale:float capacity:float
name:float providing_city_id:CITY neighbor_id:HYDROPOWER_PLANT population:int
FUUUUUUU….
FUUUUUUU…. • According to population, how should I create hydropower
plants neighbors? • If one plant shuts off, which one should replace it without causing damage to the entire system? • How should I avoid underuse? • Monitoring?
Double Fail….
‘Unleraned?'
Look at this
Similar?
Similar?
Graphs oriented databases Because not all data need to live
in tables
Neo4j
Our plants into graphs Itaipu! is_neighbor Itá latitude:33.43 longitude:32:33 capacity:1400
latitude:43.43 longitude:56:33 capacity:700 line_voltage:230
Our plants into graphs Itaipu! is_neighbor Itá latitude:33.43 longitude:32:33 capacity:1400
latitude:43.43 longitude:56:33 capacity:700 line_voltage:230 Node Relationship Attributes index
Visual representation Itaipu! Itá
Our plants into graphs Itaipu! feeds Foz do iguaçu latitude:33.43
longitude:32:33 capacity:1400 population:265000 feeds Curitiba population:1700000
How many people does Itaipu feed?
Traversal - Search Itaipu! feeds Foz do iguaçu latitude:33.43 longitude:32:33
capacity:1400 population:265000 feeds Curitiba population:1700000
Cypher
Neo4j with Ruby <3 neo4j.rb Active Record
Neo4j with Ruby <3 REST API Wrapper Neography
Neo4j - When should I not use?
Neo4j - When should I not use? • NoSQL Hater?
• Searches - BE CAREFUL (depth x width) • Cloud • Node Monitor • Infra (backup) • Limted RAM
Obrigada! @hannelita hannelita@gmail.com Questions?