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
PORT_Firebase___Algolia.pdf
Search
shogo.yamada
December 11, 2019
0
220
PORT_Firebase___Algolia.pdf
shogo.yamada
December 11, 2019
Tweet
Share
More Decks by shogo.yamada
See All by shogo.yamada
Jetpack ComposeへのリファクタリングのTIPS: CustomViewの便利な使い方 / Refactoring TIPS to Jetpack Compose: Useful usage of CustomView
yshogo
0
680
Android StudioのLiveTemplateの便利な使い方 / Android LiveTemplate Method
yshogo
0
1.1k
ZOZOの新規サービス 「FAANS」の開発 Android編/FAAN App Create on Android
yshogo
0
1.3k
Flutter_meetup_tokyo__10.pdf
yshogo
0
5.8k
PORT Firebase x Flutter
yshogo
0
380
ZOZOTech meetup Frontend #10
yshogo
2
1.7k
flutter-meetup.pdf
yshogo
0
51
Potetochips #61
yshogo
1
500
Firebase ML Kitを使った デモアプリ活用事例 @Google App DOJO
yshogo
1
170
Featured
See All Featured
Visualization
eitanlees
146
15k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
The World Runs on Bad Software
bkeepers
PRO
65
11k
How To Stay Up To Date on Web Technology
chriscoyier
789
250k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
Six Lessons from altMBA
skipperchong
27
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Building Adaptive Systems
keathley
38
2.3k
Transcript
Firebase × Flutter × Alglia PORT Firebase × Alglia Shogo
yamada
ࣗݾհ Nama: Shogo Yamada Job: AndroidΤϯδχΞ Twitter: @yshogo87 Facebook: ࢁాঘޗ
࣍ ɾAlgoliaͷ༻໘ ɾAlgoliaͷ͍ํ ɾAlgoliaΛFlutter͔Β͏ ɾAlgolia͔ΒσʔλΛऔಘ͢ΔϝϦο τ/σϝϦοτ
Algoliaͷ༻໘
Algoliaͷ༻໘
Algoliaͷ༻໘ UserNameͰݕࡧʁ UserIDͰݕࡧʁ ը૾ͷΧςΰϦͰݕࡧʁ
Algoliaͷ༻໘ where userName like hogehoge OR userId like hogehoge OR
categoryName like hogehoge
None
ͦ͜ͰAlgolia
Algoliaͷ༻໘ ɾuser_id ɾuser_name ɾintroduction ͳͲෳͷଐੑͷจࣈྻʹରͯ͠ݕࡧΛ ͛Δ͜ͱ͕Ͱ͖Δ
Algoliaͷ༻໘
Algolia͍ํ
Algoliaͷ͍ํ ɾAlgoliaʹαΠϯΞοϓ ɾαΠϯΞοϓޙʹindexΛ࡞͢Δ
Algoliaͷ͍ํ ɾCloud FunctionsͷηοτΞοϓΛߦ͏ npm install algoliasearch
Algoliaͷ͍ํ ɾFirestoreͷτϦΨʔΛར༻ͯ͠Algoliaʹ σʔλΛ͛Δ
Algoliaͷ͍ํ
Algoliaͷ͍ํ ɾΫϥΠΞϯτଆ͔ΒAlgolia SDKΛͬͯ Algoliaʹऔಘ͠ʹ͍͘
Algoliaͷ͍ํ Firestoreʹอଘ τϦΨʔ SDKͰσʔλΛ͛Δ ΫΤϦ
Flutter͔ΒAlgoliaΛ͏
Flutter͔ΒAlgoliaΛ͏
Flutter͔ΒAlgoliaΛ͏
Algolia͔ΒσʔλΛऔಘ͢Δ ϝϦοτ/σϝϦοτ
͔͜͜Βࣗݸਓͷҙݟͳ ͷͰશͯͷࣄʹͯ·Δ ͱݶΒͳ͍Ͱ͢
Algolia͔ΒσʔλΛऔಘ͢Δϝ Ϧοτ/σϝϦοτ ϝϦοτ ɾFirestoreʹͳ͍ΫΤϦ͕͑ΔΑ͏ʹͳ Δ (likeɺfilterɺෳ߹ΫΤϦɺetc….) ɾϥϯΩϯάઃܭָ͕
Algolia͔ΒσʔλΛऔಘ͢Δϝ Ϧοτ/σϝϦοτ ෳ߹ΫΤϦ
Algolia͔ΒσʔλΛऔಘ͢Δϝ Ϧοτ/σϝϦοτ ϥϯΩϯά
Algolia͔ΒσʔλΛऔಘ͢Δϝ Ϧοτ/σϝϦοτ σϝϦοτ ɾFirestoreͷϩʔΧϧΩϟογϡػೳ͕͑ ͳ͍
Algolia͔ΒσʔλΛऔಘ͢Δϝ Ϧοτ/σϝϦοτ σϝϦοτ ɾFirestoreͷϩʔΧϧΩϟογϡػೳ͕͑ ͳ͍ ͜Ε݁ߏΫϦςΟΧϧ
FirestoreΛԽ ͯ͠औಘ͢Δ͔ Algolia͔ΒΫΤϦ͢Δ͔
ྫΛ͋͛ͯઆ໌͠·͢ɻ
Firestoreͷ߹
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Firestoreͷ߹ ϢʔβʔA(userID: id1)͕πΠʔτ͢Δͱ user/id1/posts/{postsId}/[data]
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Firestoreͷ߹ ϢʔβʔAΛϑΥϩʔ͍ͯ͠ΔϢʔβʔશһͷλΠ ϜϥΠϯʹίϐʔ͢Δɻ user/{followerId1}/timeline/{postsId}/[data] user/{followerId2}/timeline/{postsId}/[data] user/{followerId3}/timeline/{postsId}/[data] ɿ ϢʔβʔA(userID: id1)͕πΠʔτ͢Δͱ
user/id1/posts/{postsId}/[data]
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Firestoreͷ߹ ͋ͱϑΥϩʔ͍ͯ͠ΔϢʔβʔίϐʔ͞Εͨ σʔλΛࢀর͢Δ user/{followerId1}/timeline/{postsId}/[data]
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Firestoreͷ߹ ϝϦοτ ɾಡΈऔΓ͕؆୯(ίϐʔ͞ΕͨσʔλΛࢀর͢ Δ͚ͩ ɾFirestoreͷϩʔΧϧΩϟογϡ͕͑Δ σϝϦοτ ɾσʔλΛԽ͍ͯ͘͜͠ͱͷཧίετ ͔͔Δ
Algoliaͷ߹
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Algoliaͷ߹ ϢʔβʔA(userID: id1)͕πΠʔτ͢Δͱ user/id1/posts/{postsId}/[data]
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Algoliaͷ߹ ϢʔβʔA(userID: id1)͕πΠʔτ͢Δͱ user/id1/posts/{postsId}/[data] τϦΨʔͱͯ͠Algoliaʹσʔλ͛Δɻ
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Algoliaͷ߹ AlgoliaʹΫΤϦ͢Δ
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ Algoliaͷ߹ ϝϦοτ ɾσʔλΛԽ͍ͯ͘͠ඞཁ͕ͳ͍ͷͰཧ ͕ϥΫ ɾFirestoreʹൺͯͬͪ͜ͷ΄͏͕ӡ༻අ͕҆ ͘ͳΔ߹͋Δ σϝϦοτ ɾFirestoreͷϩʔΧϧΩϟογϡ͕͑ͳ͍
TwitterͷλΠϜϥΠϯͷΑ͏ͳػೳΛ࣮͢Δͱ͖ ݁ՌͲͬͪΛ͏͖͔ʮcase by caseʯ ݁ ɾσʔλͷࢀর͕ϥΫʹͳΔͷ -> Firestore ɾσʔλͷߋ৽͕ϥΫʹͳΔͷ ->
Algolia
ࢀরΛͱΔ͔ ߋ৽ΛͱΔ͔
ͪͳΈʹɺɺɺ ͕ࣗࠓ࡞ͬͯΔSNSαʔϏεFirestoreͰλΠϜ ϥΠΛ࡞͍ͬͯ·͢ɻ ཧ༝ ɾFirestoreͷϩʔΧϧΩϟογϡΛ͍͔ͨͬͨ ɾ༻্Ұఆͷ࣌ؒͰλΠϜϥΠϯͷσʔλ͕ফ͑ ΔͷͰߋ৽ճݶఆ͞Ε͍ͯΔ
Ͱ͕͢ɺɺɺ ݕࡧܥ͘͢͝ศརͳͷͰɺFirestoreͱAlgoliaͷ Έ߹Θͤඞਢͱ͍͍͍͔ͬͯͱࢥ͍·͢ɻ ❤
Ҏ্Ͱ͢ɻ ࠙ձͰ͓͠͠·͠ΐ ͏ʂʂ