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
BaseCouch
Search
Jens Alfke
October 25, 2012
Programming
0
230
BaseCouch
Letting CouchDB (and TouchDB) replicate with Couchbase Server 2
Jens Alfke
October 25, 2012
Tweet
Share
More Decks by Jens Alfke
See All by Jens Alfke
Couchbase Mobile 101
snej
0
99
Couchbase Mobile Architecture
snej
2
360
Couchbase Mobile Update
snej
3
630
Introduction To TouchDB
snej
6
3k
Other Decks in Programming
See All in Programming
CSC509 Lecture 07
javiergs
PRO
0
250
kiroとCodexで最高のSpec駆動開発を!!数時間で web3ネイティブなミニゲームを作ってみたよ!
mashharuki
0
970
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
260
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
390
Software Architecture
hschwentner
6
2.4k
Vue 3.6 時代のリアクティビティ最前線 〜Vapor/alien-signals の実践とパフォーマンス最適化〜
hiranuma
2
260
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
CSC509 Lecture 08
javiergs
PRO
0
270
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
450
ドメイン駆動設計のエッセンス
masuda220
PRO
15
6.2k
CSC305 Lecture 08
javiergs
PRO
0
280
Blazing Fast UI Development with Compose Hot Reload (droidcon London 2025)
zsmb
0
400
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
8
320
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
The Invisible Side of Design
smashingmag
302
51k
The Cult of Friendly URLs
andyhume
79
6.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.3k
Faster Mobile Websites
deanohume
310
31k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Agile that works and the tools we love
rasmusluckow
331
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Transcript
BaseCouch letting CouchDB (and TouchDB) replicate with Couchbase Server 2
Jens Alfke ~ Oct 24, 2012 Thursday, October 25, 12
BaseCouch Thursday, October 25, 12
BaseCouch Is… a little HTTP listener written in Go (~2500LOC;
my first Go program!) that understands a subset of CouchDB’s REST API: For pull: _changes, GET doc … For push: _revs_diff, _bulk_docs … and stores CouchDB docs in Couchbase Thursday, October 25, 12
BaseCouch Is Not… a full CouchDB-compatible server (no views, no
replicator, other API bits missing) a way to make Couchbase databases accessible through CouchDB Thursday, October 25, 12
IT HAZ A SCHEMA LET ME SHOW U IT… Thursday,
October 25, 12
Schema: Database {“name”: “demodb”, “docPrefix”: “doc:demodb/A9FF:”} cdb:demodb 232 seq:demodb Thursday,
October 25, 12
Schema: Document {“id”: “sample-doc”, “rev”: “3-cfsdklaeip”, “sequence”: 231, “history”: {
“revs”: [...], “parents”: [...], “keys”: [...], “deleted”: [...] } } doc:demodb/A9FF:sample-doc parent 2-9#f(Jq key sha1-X*@! deleted false 3-cfsdklaeip Conceptually, “history” is a map: Thursday, October 25, 12
Revisions/Attachments {“name”: “INVISIBLE SANDWICH”, “year”: 2007, “subtype”: “invisible things” “_attachments”:
{ “img.jpg”: { “digest”: “md5-X&_x3”, “length”: 8032 } } } rev:sha1-X*@! att:md5-X&_x3 Thursday, October 25, 12
Revisions/Attachments Content-Addressable Store No duplicates are stored Efficient for Syncpoint-style
server with lots of similar databases Requires explicit garbage collection Thursday, October 25, 12
Views Used all_dbs all_docs changes all_bits revs atts for garbage
collection } Thursday, October 25, 12
github.com/couchbaselabs/basecouch Thursday, October 25, 12