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
なぜ変更を検知できる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
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4.1k
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.5k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
420
AIエージェントの設計で注意するべきポイント6選
har1101
6
2.8k
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
150
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
5
1.5k
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
180
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
300
Implementation Patterns
denyspoltorak
0
140
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
680
SQL Server 2025 LT
odashinsuke
0
110
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
610
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
42
エンジニアに許された特別な時間の終わり
watany
106
220k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
39
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
56
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
110
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
1
210
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
380
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
140
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͕ςʔϒϧมߋΛ௨͢ΔΈ