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
Graphs + Hamsters
Search
Lucas Dohmen
November 09, 2013
Programming
0
310
Graphs + Hamsters
My talk about Graphs, Hamsters & ArangoDB from yesterday.
Lucas Dohmen
November 09, 2013
Tweet
Share
More Decks by Lucas Dohmen
See All by Lucas Dohmen
Frontend Architecture
moonglum
1
75
Weird Parts
moonglum
0
90
Webanwendungen – Eine Frage des Stils
moonglum
0
270
AdequateJS: Where should I run my Code?
moonglum
0
54
Per Anhalter durch JavaScript
moonglum
0
160
Architectures for Modern Web Front Ends
moonglum
2
480
Per Anhalter durch JavaScript
moonglum
0
190
Architectures for Modern Web Front Ends
moonglum
0
110
AdequateJS: Wie viel JavaScript darf es denn sein?
moonglum
1
380
Other Decks in Programming
See All in Programming
Jasprが凄い話
hyshu
0
150
5分で理解する SOLID 原則 #phpcon_nagoya
shogogg
1
300
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
260
Introduction to kotlinx.rpc
arawn
0
760
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
230
もう僕は OpenAPI を書きたくない
sgash708
5
1.9k
GoとPHPのインターフェイスの違い
shimabox
2
210
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
230
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
220
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
980
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
160
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
210
Featured
See All Featured
Thoughts on Productivity
jonyablonski
69
4.5k
Producing Creativity
orderedlist
PRO
344
40k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Designing Experiences People Love
moore
140
23k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
990
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Transcript
RWTH Aachen, Computer Science Student triAGENS GmbH, Developer moonglum moonbeamlabs
by Lucas Dohmen Graphs and Hamsters Modelling things differently
Hamster + Food = ❤️
Cave 1 Cave 2 Tunnel
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9
Task • The hamster wants to know how much grain
and how much nuts it has • It can’t remember the way back if it travels through more than two caves • It remembers which caves it already has visited
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 0 Nuts: 0
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 2 Nuts: 3
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9 Grain: 4 Nuts: 3
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9
Grain: 0 Nuts: 0 Grain: 2 Nuts: 3 Grain: 2
Nuts: 0 Grain: 5 Nuts: 5 Grain: 1 Nuts: 1 Grain: 0 Nuts: 2 Grain: 1 Nuts: 1 Grain: 2 Nuts: 1 Grain: 8 Nuts: 9
Grain: 13 Nuts: 13
The hamster is a visitor • There’s a natural way
to implement it called traversals • There are a lot of things that you can implement very comfortably with traversals
ArangoDB • Free & Open Source • Documents & Graphs
• ArangoDB Query Language, but also simple queries • Real transactions • Master/Slave Replication • Extensible API • Embedded V8 • Extremely space efficient • High performance
Post Request to /_api/traversal { "startVertex": "caves/Start", "edgeCollection": "tunnel", "direction":
"any", "minDepth": 1, "maxDepth": 2, "uniqueness": { "vertices":"global", "edges":"global" }, "init": "result.grain = 0;result.nuts = 0;", "visitor": "result.grain += vertex.grain;result.nuts += vertex.nuts" }
ArangoDB + Graphs • Graphical Graph Explorer is part of
the admin interface • AQL has support for graphs • Iterators as shown before • Built in algorithms like shortest path etc.
ArangoDB + Ruby • Ashikawa Core (https://github.com/triagens/ ashikawa-core): Low Level
Driver • Guacamole (https://github.com/triagens/ guacamole): ODM with Rails Support