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
rage against annotate_predecessor
junk0612
0
170
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
280
旅行プランAIエージェント開発の裏側
ippo012
2
930
ユーザーも開発者も悩ませない TV アプリ開発 ~Compose の内部実装から学ぶフォーカス制御~
taked137
0
190
Improving my own Ruby thereafter
sisshiki1969
1
160
Android端末で実現するオンデバイスLLM 2025
masayukisuda
1
170
print("Hello, World")
eddie
2
530
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
240
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.5k
@Environment(\.keyPath)那么好我不允许你们不知道! / atEnvironment keyPath is so good and you should know it!
lovee
0
130
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
250
楽して成果を出すためのセルフリソース管理
clipnote
0
190
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Why Our Code Smells
bkeepers
PRO
339
57k
The Art of Programming - Codeland 2020
erikaheidi
56
13k
Producing Creativity
orderedlist
PRO
347
40k
Typedesign – Prime Four
hannesfritz
42
2.8k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Docker and Python
trallard
46
3.6k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Being A Developer After 40
akosma
90
590k
KATA
mclloyd
32
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
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