Upgrade to Pro — share decks privately, control downloads, hide ads and more …

可能な限りRDB脳のままCloud_Firestoreを使ってみる.pdf

 可能な限りRDB脳のままCloud_Firestoreを使ってみる.pdf

https://gunmaweb.connpass.com/event/127593/

のLTスライドです!

TsukasaSekiguchi

June 01, 2019
Tweet

More Decks by TsukasaSekiguchi

Other Decks in Technology

Transcript

  1. ໊લ: ؔޱ࢘ SNS: GitHub: TsukasaGR Twitter: TsukasaGr NewsPicks: ؔޱ࢘ ࠲ӈͷ໏

    ࣗ෼ͷͨΊʹɺଞਓʹਚ͘͢ ࢓ࣄ: αϥϦʔϚϯ: SIerͰ৽نࣄۀ(toC޲͚ͷWebαʔϏε)։ൃ ϑϦʔϥϯε: ελʔτΞοϓͷWebΤϯδχΞ ࠷ۙ৮ͬͯΔ΋ͷ: PHP(Laravel)ɺJavascript/Typescript(Vue.js/Nuxt.js)ɺGraphQLɺDockerɺAWSɺFirebase ࣗݾ঺հ
  2. ͬ͘͟ΓRDB NoSQL 3%# 'JSFTUPSF /P42- • ݫີ͞ʹΑΔ҆৺ײ • ͔Ώ͍ͱ͜Ζʹख͕ಧ͘ •

    େن໛σʔλʹ଱͑͏Δͷ͕ͭΒ ͨΜ • ܰշ͞ɺॊೈ͞ʹΑΔߴ଎ύϑΥʔ Ϛϯε • γϯϓϧ͕ނʹ͔Ώ͍ͱ͜Ζ͸ࣗ෼ ͰؤுΔ
  3. ͬ͘͟ΓRDB NoSQL 3%# 'JSFTUPSF /P42- • ݫີ͞ʹΑΔ҆৺ײ • ͔Ώ͍ͱ͜Ζʹख͕ಧ͘ •

    େن໛σʔλʹ଱͑͏Δͷ͕ͭΒ ͨΜ • ܰշ͞ɺॊೈ͞ʹΑΔߴ଎ύϑΥʔ Ϛϯε • γϯϓϧ͕ނʹ͔Ώ͍ͱ͜Ζ͸ࣗ෼ ͰؤுΔ ޻෉͕ඞཁ
  4. ͦΕͰ΋΍ͬͺΓਏΈ͸͋Δ • ࢖͑Δൺֱԋࢉࢠ͸ <, <=, ==, >, >= ͷΈ •

    OR͕࢖͑ͳ͍ • In۟΋࢖͑ͳ͍ • Like΋࢖͑ͳ͍
  5. ϩΩιχϯͷ࢖͍࣌ • SPA • DBαʔόʔΛ؅ཧͨ͘͠ͳ͍ • ϦΞϧλΠϜσʔλಉظΛ࢖͍͍ͨ DBΞΫηεҎ֎ ͸ϑϩϯτͷΈ Ͱ׬݁͢Δ

    (※)AlgoliaΛར༻͢Δ৔߹͸όοΫΤϯυ͕ඞཁ͕ͩɺCloudFunctions౳Λ࢖͏͜ͱͰAppServerෆཁʹͳΔ
  6. ϩΩιχϯͷ࢖͍࣌ • SPA • DBαʔόʔΛ؅ཧͨ͘͠ͳ͍ • ϦΞϧλΠϜσʔλಉظΛ࢖͍͍ͨ εέʔϧ͢Δ͔΋͠Εͳ͍͚Ͳɺ͠ͳ͍͔ ΋͠Εͳ͍ɺͨͩϦιʔε͸ݶΒΕ͍ͯ ΔɺΈ͍ͨͳ࣌ʹ࠷ॳ͔ΒΦʔτεέʔϧ

    ͷ࢓૊Έ΍৑௕ԽͳΜͯ΍ͬͯΒΕͳ͍ DBΞΫηεҎ֎ ͸ϑϩϯτͷΈ Ͱ׬݁͢Δ (※)AlgoliaΛར༻͢Δ৔߹͸όοΫΤϯυ͕ඞཁ͕ͩɺCloudFunctions౳Λ࢖͏͜ͱͰAppServerෆཁʹͳΔ
  7. ϩΩιχϯͷ࢖͍࣌ • SPA • DBαʔόʔΛ؅ཧͨ͘͠ͳ͍ • ϦΞϧλΠϜσʔλಉظΛ࢖͍͍ͨ εέʔϧ͢Δ͔΋͠Εͳ͍͚Ͳɺ͠ͳ͍͔ ΋͠Εͳ͍ɺͨͩϦιʔε͸ݶΒΕ͍ͯ ΔɺΈ͍ͨͳ࣌ʹ࠷ॳ͔ΒΦʔτεέʔϧ

    ͷ࢓૊Έ΍৑௕ԽͳΜͯ΍ͬͯΒΕͳ͍ ௨஌όοξ΍νϟοτػೳ͚ͩαΫοͱϦΞϧλΠϜಉظ͍͚ͨ͠Ͳ WebSocketཧղ͖͠Εͯͳ͍࣌ؒ͠΋ͳ͍ DBΞΫηεҎ֎ ͸ϑϩϯτͷΈ Ͱ׬݁͢Δ (※)AlgoliaΛར༻͢Δ৔߹͸όοΫΤϯυ͕ඞཁ͕ͩɺCloudFunctions౳Λ࢖͏͜ͱͰAppServerෆཁʹͳΔ
  8. ϩΩιχϯͷ࢖͍࣌ • SPA • DBαʔόʔΛ؅ཧͨ͘͠ͳ͍ • ϦΞϧλΠϜσʔλಉظΛ࢖͍͍ͨ εέʔϧ͢Δ͔΋͠Εͳ͍͚Ͳɺ͠ͳ͍͔ ΋͠Εͳ͍ɺͨͩϦιʔε͸ݶΒΕ͍ͯ ΔɺΈ͍ͨͳ࣌ʹ࠷ॳ͔ΒΦʔτεέʔϧ

    ͷ࢓૊Έ΍৑௕ԽͳΜͯ΍ͬͯΒΕͳ͍ ௨஌όοξ΍νϟοτػೳ͚ͩαΫοͱϦΞϧλΠϜಉظ͍͚ͨ͠Ͳ WebSocketཧղ͖͠Εͯͳ͍࣌ؒ͠΋ͳ͍ DBΛਖ਼نԽͨ͠··FirestoreΛ࢖͏೔͕͘Δ ͔΋͠Εͳ͍(͠ɺདྷͳ͍͔΋͠Εͳ͍) DBΞΫηεҎ֎ ͸ϑϩϯτͷΈ Ͱ׬݁͢Δ (※)AlgoliaΛར༻͢Δ৔߹͸όοΫΤϯυ͕ඞཁ͕ͩɺCloudFunctions౳Λ࢖͏͜ͱͰAppServerෆཁʹͳΔ
  9. • ࠓ͍ͭͬͯ͘ΔϓϩμΫτͰࢼ͍ͯ͠Δ͕ɺ·ͩྑ ͠ѱ͠Λ൑அͰ͖͍ͯͳ͍ • RDB͕࿀͘͠ͳΔ࣌͸ਖ਼௚݁ߏ͋Δ • ͦΕͰ΋ݸਓతʹ࢖͏ཧ༝͸ҎԼ • DB Serverෆཁ

    >>> App Serverෆཁ >>> ϦΞ ϧλΠϜσʔλಉظ • ແྉ͔Β࢝ΊΒΕΔͷͰɺͥͻօ͞Μ΋৮ͬͯΈͯ ͸͍͔͕Ͱ͠ΐ͏͔ʂ