Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
なぜ変更を検知できるDBが必要なのか
Search
Shun Hosaka
July 14, 2017
Programming
1
140
なぜ変更を検知できるDBが必要なのか
第4回スタートアップAndroid勉強会 - スタートアップにおけるアーキテクチャとの向き合い方 -の発表資料
Shun Hosaka
July 14, 2017
Tweet
Share
More Decks by Shun Hosaka
See All by Shun Hosaka
Android Goodbye `shape`
reyurnible
0
430
独自設計のAndroidアプリを設計ごとKotlinizeした話
reyurnible
1
1.5k
Kotlin + Kodein Test Data Mocking
reyurnible
1
670
RxDownloader
reyurnible
0
110
Other Decks in Programming
See All in Programming
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
100
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
100
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
100
バックエンドエンジニアによる Amebaブログ K8s 基盤への CronJobの導入・運用経験
sunabig
0
150
tparseでgo testの出力を見やすくする
utgwkk
1
210
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
AIコーディングエージェント(Manus)
kondai24
0
170
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.6k
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
260
複数人でのCLI/Infrastructure as Codeの暮らしを良くする
shmokmt
5
2.3k
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.8k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
5
2k
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.4k
Designing for humans not robots
tammielis
254
26k
Being A Developer After 40
akosma
91
590k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
Visualization
eitanlees
150
16k
GraphQLとの向き合い方2022年版
quramy
50
14k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
Building Applications with DynamoDB
mza
96
6.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Transcript
ͳͥมߋΛݕͰ͖ΔDB ͕ඞཁͳͷ͔
؆୯ͳࣗݾհ • อࡔ ॣ • ৽ଔҰ • ݸਓࣄۀओ • Twitter:
@Reyurnible • https://github.com/Reyurnible
ࠓɺDBΛͬͯΞϓϦͷΠϕϯ τΩϟογϡΛྑ͘͢Δ͔͠Εͳ ͍
ͦͦɺσʔλϕʔε͍ͬͯ·͢ ͔ʁ
ελʔτΞοϓͱσʔλϕʔε • ࣮ίετ͕ߴ͍ • ϚΠάϨʔγϣϯͱ͔͍͜͠ • APTͰམͪͨΓΑ͘Θ͔Βͳ͍ΤϥʔʹҾ͔͔ͬΓ͕ͪ • εϨουͷ੍ͳͲɺAPIҎ্ʹ໘ •
ϥΠϒϥϦଟͯ͘ͲΕ͕͍͍ͷ͔Θ͔Βͳ͍ -> ͋·Γ࣮ͨ͘͠ͳ͍
σʔλϕʔεΛ࣮͠ͳ͍͚ͯ͘ͳ͍έʔε • ϩʔΧϧͰ࣋ͬͯஔ͔ͳ͚Ε͍͔Ͷ͍ใ͕͋Δ • ͦͦαʔόʔ͕ͳ͍ɺAPI͕ͳ͍
ࠓσʔλϕʔεͰΓ͍ͨ͜ͱ • ը໘ؒͷσʔλอ࣋ • ը໘ؒͷΠϕϯτॲཧ • ը໘෮ؼ࣌ͷσʔλॲཧ • σʔλͷΩϟογϡ ->
Ͳ͏͍ͯ͠·͔͢ʁ
ελʔτΞοϓͩͱ • σβΠϯͰղܾ • ը໘දࣔ͝ͱʹߋ৽ • αϙʔτ͠ͳ͍ -> ࣮͠ͳ͍͍ͯ͘ͷ͕Ұ൪͍͍
ͪΌΜͱαϙʔτΛ͠ͳ͍ͱ͍͚ͳ͘ ͳͬͨ࣌ͷ
ͦͦDBͰͲ͏ղܾ͢Δͷ͔
σʔλϕʔεͰΓ͍ͨ͜ͱ • ΞϓϦͷΩϟογϡ • ຖىಈ͝ͱͷηογϣϯใͷཧ • ΠϕϯτPubSubతͳͭ
DBܥϥΠϒϥϦͷτϨϯυ
ੲ͔Β͋ΔORMϥΠϒϥϦ • SQLite • ActiveAndroid • GreanDAO
࠷ۙͷORMϥΠϒϥϦDB • Room • Realm • Requery • SQL Brite
google / Room • Room provides an abstraction layer over
SQLite to allow fluent database access while harnessing the full power of SQLite • https://developer.android.com/topic/libraries/architecture/ room.html • RxJavaରԠ • LiveDataରԠ
square / SQL Brite • A lightweight wrapper around SQLiteOpenHelper
which introduces reactive stream semantics to SQL operations. • ⭐ 4100 • https://github.com/square/sqlbrite • RxJavaରԠ
realm / Realm • mobile database: a replacement for SQLite
& ORMs • ⭐ 8000 • https://github.com/realm/realm-java • RxJavaରԠ
requery / requery • modern SQL based query & persistence
for Java / Kotlin / Android • ⭐ 2000 • https://github.com/requery/requery • RxJavaରԠ
ײ͍ͯ͡ΔτϨϯυ • RxJavaରԠ • ςʔϒϧͷมߋͷݕ • KotlinରԠ
ςʔϒϧͷมߋΛݕͰ͖ΔDBͱ • INSERT, UPDATE, DELETEͳͲɺσʔλϕʔεʹมߋ͕͋ͬ ͨࡍʹΠϕϯτ௨Λͯ͘͠ΕΔ͜ͱ • RxJavaʹରԠ͍ͯ͠Δ͔͕1ͭͷ伴 -> ͜ΕΛઃܭʹΈࠐΉͱͲ͏ͳΔ͔ɻ
None
None
ίετΛͲ͏͑Δ͔ • LocalSourceͱɺContentProviderΛΦϯϝϞϦͰ࣮͓ͯ͠ ͘ • ୯७ͳBehaviroSubjectLiveDataͳͲ • ͦͷޙɺ༨༟͕Ͱ͖ͨλΠϛϯάͰஔ͖͑Λߦ͏ • ΞϓϦىಈ࣌ʹςʔϒϧͷ༰Λɺશͯഁغ͢Δ
• API͕͋Γɺηογϣϯͷใ͚ͩͰ͍͍߹
·ͱΊΔͱ • ࠷ۙͷDBɺσʔλͷมߋΛݕͰ͖Δ • DBͷ࣮͕ਏ͍߹ɺΦϯϝϞϦʔͰ͍͍ • ͰɺσʔλͷϑϩʔΛม͑ΒΕΔ༨Λ͓ͯ͘͠
ؔ࿈ϦϯΫ • googlesamples/android-architecture • RxJava + FluxʹΑΔAndroidΞϓϦઃܭ • SQLBrite͕ςʔϒϧมߋΛ௨͢ΔΈ