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
150
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
52
Wildfly em alta disponibilidade
hannelita
0
210
Helios - o backend pra Mobile que você precisava <3
hannelita
0
93
Neo4j - Dia a dia com grafos, Neo4j e Ruby
hannelita
1
120
Swift - uma fama repentina
hannelita
1
110
Curso relâmpago de eletrônica básica para desenvolvedores
hannelita
1
180
Other Decks in Technology
See All in Technology
The Role of Developer Relations in AI Product Success.
giftojabu1
0
110
TypeScript、上達の瞬間
sadnessojisan
42
11k
Windows Autopilot Deployment by OSD Guy
tamaiyutaro
0
390
AWS⼊社という選択肢、⾒えていますか
iwamot
2
1.1k
Lexical Analysis
shigashiyama
1
150
2024年グライダー曲技世界選手権参加報告/2024 WGAC report
jscseminar
0
310
Engineering at LY Corporation
lycorp_recruit_jp
0
650
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
140
SREの組織類型に応じた リーダシップの考察
kenta_hi
PRO
1
650
인디 앱 개발자와 Flutter
tinyjin
0
160
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
150
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
300
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
Making Projects Easy
brettharned
115
5.9k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Code Review Best Practice
trishagee
64
17k
Happy Clients
brianwarren
98
6.7k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
700
Designing for Performance
lara
604
68k
A Philosophy of Restraint
colly
203
16k
RailsConf 2023
tenderlove
29
900
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
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?