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
70
Weird Parts
moonglum
0
85
Webanwendungen – Eine Frage des Stils
moonglum
0
270
AdequateJS: Where should I run my Code?
moonglum
0
49
Per Anhalter durch JavaScript
moonglum
0
150
Architectures for Modern Web Front Ends
moonglum
2
470
Per Anhalter durch JavaScript
moonglum
0
180
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
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
220
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
430
快速入門可觀測性
blueswen
0
400
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
290
Jakarta EE meets AI
ivargrimstad
0
270
ChatGPT とつくる PHP で OS 実装
memory1994
PRO
2
120
Amazon S3 NYJavaSIG 2024-12-12
sullis
0
100
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.7k
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Exploring: Partial and Independent Composables
blackbracken
0
100
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
330
Featured
See All Featured
Fireside Chat
paigeccino
34
3.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Writing Fast Ruby
sferik
628
61k
Imperfection Machines: The Place of Print at Facebook
scottboms
266
13k
Typedesign – Prime Four
hannesfritz
40
2.4k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Learning to Love Humans: Emotional Interface Design
aarron
274
40k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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