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
68
Weird Parts
moonglum
0
81
Webanwendungen – Eine Frage des Stils
moonglum
0
260
AdequateJS: Where should I run my Code?
moonglum
0
46
Per Anhalter durch JavaScript
moonglum
0
140
Architectures for Modern Web Front Ends
moonglum
2
470
Per Anhalter durch JavaScript
moonglum
0
180
Architectures for Modern Web Front Ends
moonglum
0
100
AdequateJS: Wie viel JavaScript darf es denn sein?
moonglum
1
360
Other Decks in Programming
See All in Programming
CSC509 Lecture 11
javiergs
PRO
0
180
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
CSC509 Lecture 12
javiergs
PRO
0
160
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Jakarta EE meets AI
ivargrimstad
0
160
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
macOS でできる リアルタイム動画像処理
biacco42
9
2.4k
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Better Code Design in PHP
afilina
PRO
0
130
Contemporary Test Cases
maaretp
0
140
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
860
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Embracing the Ebb and Flow
colly
84
4.5k
Building Adaptive Systems
keathley
38
2.3k
Being A Developer After 40
akosma
86
590k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Gamification - CAS2011
davidbonilla
80
5k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Navigating Team Friction
lara
183
14k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
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