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
Nosql - getting over the bad parts
Search
David Dahl
March 04, 2013
Programming
120
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Nosql - getting over the bad parts
Talk held at Scandinavian Developer Conference in Gothenburg
David Dahl
March 04, 2013
More Decks by David Dahl
See All by David Dahl
Building a real time analytics engine in JRuby
effata
1
540
Other Decks in Programming
See All in Programming
OSもどきOS
arkw
0
570
Agentic UI
manfredsteyer
PRO
0
160
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
280
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
580
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
790
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
140
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
560
net-httpのHTTP/2対応について
naruse
0
490
AI時代のUIはどこへ行く?その2!
yusukebe
21
7.2k
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
180
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
640
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
360
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Navigating Team Friction
lara
192
16k
The Curse of the Amulet
leimatthew05
1
13k
Color Theory Basics | Prateek | Gurzu
gurzu
0
360
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Context Engineering - Making Every Token Count
addyosmani
9
970
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Odyssey Design
rkendrick25
PRO
2
700
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Transcript
“nosql” Getting over the bad parts David Dahl @effata
Rant
Overview ‣ Real life lessons ‣ Production systems ‣ Write
heavy ‣ MongoDB ‣ Redis ‣ Cassandra
generic ‣ Took a DB class? - Forget everything you
learned! ‣ Denormalize all the things - Up to a limit ‣ Consistency is your responsibility ‣ Primary keys - Give them a lot of thought
None
{ "_id" : ObjectId("51235a80472689978000004e"), "access" : { "admin": ['some_app'], "deep_access":
{ "another_level": 1 } }, "apps" : [ 'some_app', 'some_other_app' ], "created_at" : ISODate("2012-07-23T13:31:17Z"), "email" : "
[email protected]
", "state" : "active" }
Default behaviour Reckless writes
Brutally Slow Object Notation
Quite the complex beast Sharding
Global Write Lock Really? ... Actually, not anymore.
Deleting stuff
Good stuff ‣ Replication - It just works, and it
works REALLY well - rs.init(), rs.add(“second.node”) ‣ Schemaless + secondary indexes - Add whatever, query however ‣ Javascript CLI - db.find({name: “Clive”, birthdate: {$gte: ISODate(“1975-05-01”)}})
None
‘some/arbitary/key’ => ‘string’ {‘single_level’: ‘hash’} [‘list’, ‘of’, ‘items’] Set(‘a’, ‘b’)
Moar memory! In memory database
Single threaded a.k.a That 30s list command i just ran
blocked the entire production system (that totally never happened)
Persistance ‣ RDB - point in time snapshot - Entire
process forks. - Enable overcommit memory! ‣ AOF - write log - Very slow on startup ‣ AOF has higher priority on startup - Enable at runtime or loose stuff ‣ Monitor your log files!
No clustering ‣ Only master-slave replication - No failover ‣
Redis sentinel - promising but not ready ‣ Redis cluster - unstable/”not production ready” ‣ Twemproxy
Good stuff ‣ Wicked fast - To a limit ‣
Deletion - not a problem ‣ TTL - on key level
None
row_key column_1 column_2 column_3 row_key value value value row_key column_1
column_4 row_key value value
Dynamo By Amazon Not to be confused with DynamoDB -
by Amazon
Black magic Or maybe I’m just dumb
Extremely java centric Some of you might think thats a
good thing... 1.2 and CQL3 makes things a lot better
Data modeling Spend a lot of time on it!
“No” indexes Secondary indexes only good for low uniqueness (make
your own)
Good stuff ‣ Black magic - Complex, but well made
‣ TTL on rows and columns ‣ Writes scale linearly “to infinity” - Netflix benchmarked 1 million writes/s (EC2)
Thank you @effata
[email protected]