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
Introduction to RethinkDB: 1KE Meetup
Search
Jorge Silva
June 12, 2015
Programming
0
42
Introduction to RethinkDB: 1KE Meetup
Jorge Silva
June 12, 2015
Tweet
Share
More Decks by Jorge Silva
See All by Jorge Silva
Introduction to RethinkDB : Move fast and break things
thejsj
2
250
ForwardJS - RethinkDB - Getting Started
thejsj
0
180
ForwardJS - RethinkDB - Advanced Queries
thejsj
1
180
Automatic Failover in RethinkDB
thejsj
0
220
Workshop: Introduction to RethinkDB : Santa Cruz JS
thejsj
1
110
Push databases: A better way to build realtime apps
thejsj
0
120
Data Modeling in RethinkDB
thejsj
4
260
RethinkDB+Angular.js: Building realtime web applications
thejsj
10
30k
Introduction to RethinkDB : Hack Reactor
thejsj
4
400
Other Decks in Programming
See All in Programming
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
140
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
9
2.1k
Online-Dokumentation, die hilft: Strukturen, Prozesse, Tools
ahus1
0
100
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
880
情報漏洩させないための設計
kubotak
4
1k
Запуск 1С:УХ в крупном энтерпрайзе: мечта и реальность ПМа
lamodatech
0
760
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
360
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
420
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
280
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
760
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
870
GitHubで育つ コラボレーション文化 : ニフティでのインナーソース挑戦事例 - 2024-12-16 GitHub Universe 2024 Recap in ZOZO
niftycorp
PRO
0
450
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Pragmatic Product Professional
lauravandoore
32
6.3k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
530
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Transcript
1KE Tech Talks San Francisco, California June 12, 2015 RethinkDB
The database for the realtime web
Jorge Silva @thejsj Developer Evangelist @ RethinkDB
Preface Why is realtime important?
Realtime apps
Realtime apps
Realtime apps • More and more apps are built to
be realtime • Users have come to want and expect this behavior in their apps
Building realtime apps is hard • You can keep everything
in a single server • You can poll the database to keep track of updates • You can publish updates through a message broker
Building realtime apps is hard • All solutions present a
tradeoff between scalability and complexity • It’s hard to keep track of state in realtime architectures.
Introduction What is RethinkDB?
What is RethinkDB? • Open source database for building realtime
web applications • NoSQL database that stores schemaless JSON documents • Distributed database that is easy to scale
Built for Realtime Apps • Subscribe to change notifications from
database queries • No more polling — the database pushes changes to your app • Reduce the amount of plumbing needed to stream live updates
Built for Realtime Apps RethinkDB is an excellent database for:
• Collaborative web and mobile apps • Multiplayer games • Streaming analytics apps • Realtime marketplaces • Connected devices
Introduction to ReQL RethinkDB Query Language
Introduction to ReQL • ReQL embeds natively into your programming
language • Compose ReQL queries by chaining commands
Anatomy of a ReQL Query r.table("players") .orderBy({ index: r.desc("score") })
.limit(3) Top three players by score
Anatomy of a ReQL Query r.table("players") .orderBy({ index: r.desc("score") })
.limit(3) Access a database table
Anatomy of a ReQL Query r.table("players") .orderBy({ index: r.desc("score") })
.limit(3) Order results
Anatomy of a ReQL Query r.table("players") .orderBy({ index: r.desc("score") })
.limit(3) Use index as pre-processed lookup
Anatomy of a ReQL Query r.table("players") .orderBy({ index: r.desc("score") })
.limit(3) Order results in descending order
Anatomy of a ReQL Query r.table("players") .orderBy({ index: r.desc("score") })
.limit(3) Only get the first three results
Subscribe to change notifications on database queries Changefeeds
r.table("users").changes() Track changes on the users table Changefeeds
Changefeeds r.table("players") .orderBy({ index: r.desc("score") }) .limit(3) .changes() Get updates
on top three players
Realtime apps Demo
http://questions.rethinkdb.com Questions
Additional Resources • RethinkDB website: http://rethinkdb.com • RethinkDB installation: http://rethinkdb.com/docs/
install/
Questions • jorge@rethinkdb.com • @thejsj