Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Our Daily Graphs written in Ruby and Neo4j
Search
hannelita
October 24, 2014
Technology
1
140
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
180
JVM Internals Demystified
hannelita
0
330
Eletrônica
hannelita
0
150
Cassandra Meetup
hannelita
0
49
Wildfly em alta disponibilidade
hannelita
0
210
Helios - o backend pra Mobile que você precisava <3
hannelita
0
91
Neo4j - Dia a dia com grafos, Neo4j e Ruby
hannelita
1
110
Swift - uma fama repentina
hannelita
1
110
Curso relâmpago de eletrônica básica para desenvolvedores
hannelita
1
170
Other Decks in Technology
See All in Technology
軽いノリで"自動化"に取り組んではいけないという話
tetsuyaooooo
1
490
Azure Verified Moduleを触って分かった注目ポイント/azure-verified-module-begin
mhrtech
1
380
Efficient zero-copy networking using io_uring
ennael
PRO
0
350
LINEヤフー新卒採用 コーディングテスト解説 実装問題編
lycorp_recruit_jp
1
12k
いまからでも遅くない! コンテナでWebアプリケーションを 動かしてみよう(2-1)WebAPI座学
nomu
0
160
トークナイザー入門
payanotty
2
950
過去のインプットとアウトプットを振り返る
diggymo
0
110
小さな勉強会の始め方、広げ方、あるいは友達の作り方 / How to Start, Grow, and Build Connections with Small Study Groups
ar_tama
6
2.7k
How CERN serves 1EB of data via FUSE
ennael
PRO
0
16k
Case Study: Concurrent Counting
ennael
PRO
0
110
エムスリー全チーム紹介資料 / Introduction of M3 All Teams
m3_engineering
1
310
【shownet.conf_】トポロジ図の歩き方
shownet
PRO
0
510
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
25
660
Robots, Beer and Maslow
schacon
PRO
157
8.2k
Adopting Sorbet at Scale
ufuk
73
9k
Speed Design
sergeychernyshev
22
480
How to name files
jennybc
77
99k
Optimising Largest Contentful Paint
csswizardry
31
2.8k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Embracing the Ebb and Flow
colly
84
4.4k
The Mythical Team-Month
searls
218
43k
It's Worth the Effort
3n
183
27k
Navigating Team Friction
lara
183
14k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
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
[email protected]
Questions?