Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Michael Nitschinger on Building a reactive Couchbase driver for the JVM
Enterprise Java User Group Austria
September 29, 2015
Technology
0
61
Michael Nitschinger on Building a reactive Couchbase driver for the JVM
Enterprise Java User Group Austria
September 29, 2015
Tweet
Share
More Decks by Enterprise Java User Group Austria
See All by Enterprise Java User Group Austria
Spring Framework 5.2 - Core Container Revisited
ejug
0
76
Andreas Caternberg on Jenkins Pipelines
ejug
0
150
Martin Ahrer on Continuous Delivery Infrastructure With Docker
ejug
0
82
Dirk Mahler on Software Analyse mit jQAssistant & Neo4j
ejug
0
100
Christoph Strobl on Spring Data & Hypermedia
ejug
0
27
Stefan Armbruster on Graph Modelling Antipatterns
ejug
0
52
Stefan Armbruster on Introduction into Neo4J
ejug
0
54
Michael Nitschinger on State of the art JVM networking with Netty
ejug
1
35
Andres Almiray on Ascii Doctor
ejug
0
85
Other Decks in Technology
See All in Technology
SRE の歩き方・進め方 / sre-walk-through-procedure
rrreeeyyy
0
560
runn is a package/tool for running operations following a scenario. / golang.tokyo #32
k1low
1
240
失敗から学ぶAWSコスト管理入門 ~想定の50倍以上の請求がきた話~
msato
0
450
Poolにおける足を止めないシステム基盤構築
winebarrel
3
1.1k
YAMLを書くだけで構築できる分散ストレージ
sat
PRO
0
200
スクラムマスターの「観察」スキルを掘り下げる / Scrum Fest Niigata 2022
ama_ch
0
800
OSINT/GEOINT ワークショップ 20220514 古橋資料
furuhashilab
2
310
[AKIBA.AWS] それ、t2.micro選んで大丈夫?
tsukuboshi
0
370
Oracle Database Technology Night #55 Oracle Autonomous Database 再入門
oracle4engineer
PRO
1
140
tfcon-2022-cpp
cpp
5
5.2k
OSS ことはじめ
hsbt
3
580
220521_SFN_品質文化試論と『LEADING QUALITY』/220521_SFN_Essay_of_Quality_Culture_and_LEADING_QUALITY
mkwrd
0
310
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
151
12k
Building Your Own Lightsaber
phodgson
94
4.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
19
1.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
29
4.3k
Statistics for Hackers
jakevdp
781
210k
BBQ
matthewcrist
74
7.9k
Building Flexible Design Systems
yeseniaperezcruz
310
33k
Keith and Marios Guide to Fast Websites
keithpitt
404
21k
How GitHub (no longer) Works
holman
296
140k
Documentation Writing (for coders)
carmenhchung
48
2.5k
Music & Morning Musume
bryan
35
4.2k
Become a Pro
speakerdeck
PRO
3
780
Transcript
A Retrospective: Couchbase on the JVM or
how we’ve built the first reactive driver and still love it Michael Nitschinger, SDK Engineer
©2015 Couchbase Inc. 2 Some History
©2015 Couchbase Inc. 3 Memcached
©2015 Couchbase Inc. 4 Memcached
©2015 Couchbase Inc. 5 Membase + CouchOne =
©2015 Couchbase Inc. 6 = Couchbase
©2015 Couchbase Inc. 7 Java SDK 1.x
§ Extends Spymemcached § Adds Config & View Capabilities § Stable & Mature § Old codebase, difficult to maintain and evolve § API grew organically
©2015 Couchbase Inc. 8 Spymemcached § Initial
Work Started mid 2006 (Java 5) § No Generics § Memcached ASCII Protocol
©2015 Couchbase Inc. 9 API Inconsistencies
©2015 Couchbase Inc. 10 Reworking the API
©2015 Couchbase Inc. 11 From Key Value to
Documents Key Value Views N1QL Search mcd ✔ 1.8 ✔ 2.0 ✔ ✔ 3.0 ✔ ✔ 4.0 ✔ ✔ ✔ .next ✔ ✔ ✔ ✔
©2015 Couchbase Inc. 12 Reworking the API –
The Document
©2015 Couchbase Inc. 13 Reworking the API –
2.x
©2015 Couchbase Inc. 14 Reworking the API
©2015 Couchbase Inc. 15 Rx Semantics single
multiple sync T Iterable<T> async Future<T> Observable<T>
©2015 Couchbase Inc. 16 Rx Semantics Event
Iterable<T> Observable<T> data retrieval T next() onNext(T) discover error throws Exception onError(Throwable) complete returns onCompleted()
©2015 Couchbase Inc. 17 Consuming Observables 17
§ The Observer subscribes and receives events. § A cold Observable starts when subscribed. § onNext can be called 0..N times
©2015 Couchbase Inc. 18 RxJava: Creating Observables
just 18
©2015 Couchbase Inc. 19 RxJava: Creating Observables
19
©2015 Couchbase Inc. 20 RxJava: Creating Observables
20
©2015 Couchbase Inc. 21 RxJava: Creating Observables
21
©2015 Couchbase Inc. 22 RxJava: Creating Observables
22
©2015 Couchbase Inc. 23 RxJava: Creating Observables
23
©2015 Couchbase Inc. 24 RxJava: Transforming Observables
24
©2015 Couchbase Inc. 25 RxJava: Transforming Observables
25
©2015 Couchbase Inc. 26 RxJava: Transforming Observables
26
©2015 Couchbase Inc. 27 RxJava: Transforming Observables
27
©2015 Couchbase Inc. 28 RxJava: Transforming Observables
28
©2015 Couchbase Inc. 29 RxJava: Transforming Observables
29
©2015 Couchbase Inc. 30 RxJava: Transforming Observables
30
©2015 Couchbase Inc. 31 RxJava: Transforming Observables
31
©2015 Couchbase Inc. 32 RxJava: Transforming Observables
32
©2015 Couchbase Inc. 33 RxJava: Filtering Observables
33
©2015 Couchbase Inc. 34 RxJava: Filtering Observables
34
©2015 Couchbase Inc. 35 RxJava: Filtering Observables
35
©2015 Couchbase Inc. 36 RxJava: Filtering Observables
36
©2015 Couchbase Inc. 37 Simple Query 37
©2015 Couchbase Inc. 38 Parameterized Query 38
§ Named Params
©2015 Couchbase Inc. 39 Parametrized Query 39
§ Positional Params
©2015 Couchbase Inc. 40 Conditional Index Creation
40
©2015 Couchbase Inc. 41 Coordinated Fallback 41
©2015 Couchbase Inc. 42 Coordinated Retry: Builder
42 § Declarative API instead of complicated retryWhen
©2015 Couchbase Inc. 43 Levelling up the Architecture
©2015 Couchbase Inc. 44 Why Reactive? 44
©2015 Couchbase Inc. 45 Java != JVM
©2015 Couchbase Inc. 46 Architecture
©2015 Couchbase Inc. 47 Smart Batching
©2015 Couchbase Inc. 48 Backpressure
©2015 Couchbase Inc. 49 Netty
©2015 Couchbase Inc. 50 Netty – In the
next Session!