Slide 1

Slide 1 text

ݱ৔ͷ՝୊Λղܾ͢ΔͨΊʹ େࣄʹ͍ͯ͠Δ͜ͱ CloudNative Days Fukuoka 2023/08/03 @_arstkn 1

Slide 2

Slide 2 text

ࣗݾ঺հ ໊લ : ∁໺ ཛྷ ॴଐ : QUANDO,Inc. ໾৬ : ςοΫϦʔυ 𝕏 : _arstkn ΫΞϯυҰے7೥໨ʂ 2

Slide 3

Slide 3 text

ݱ৔ʹಛԽͨ͠ϦϞʔτίϛϡχέʔγϣϯπʔϧ SynQ Remote ʮ͋ΕɾͦΕɾ͜Εʯ͕؆୯ʹ఻ΘΔ - ඞͣಉ͡ө૾ΛࢀՃऀશһ͕ݟΔ - ը໘ΛλοϓʢΫϦοΫʣͰϙΠϯλΛදࣔ ௨৴؀ڥ͕ѱͯ͘΋Ͱ͖ΔݶΓߴը࣭ - શһ͕ݟ͍ͯΔө૾ͷΈ͕ 
 ഑৴͞ΕΔΑ͏੍ޚ ΞϓϦΠϯετʔϧ͚ͩͰར༻Մೳ - ಛघͳ୺຤͸ෆཁ - ΞϓϦΛΠϯετʔϧ͢Δ͚ͩ 3

Slide 4

Slide 4 text

ࠓ೔࿩͍ͨ͜͠ͱ 4

Slide 5

Slide 5 text

5 ݱ৔ʢΤϯυϢʔβʔʣͷ՝୊ղܾʹ 
 ΠϯύΫτ͕͋Δͱ͜Ζʹ ϦιʔεΛ͔͚Δ͜ͱ͕Ͱ͖ΔΑ͏ʹߏங͢Δ͜ͱ େࣄͩͱࢥ͏͜ͱ

Slide 6

Slide 6 text

ϦϦʔε౰ॳ ΤϯδχΞͷເͱر๬͕٧·͍ͬͯͨ 6

Slide 7

Slide 7 text

ΤϯδχΞͷເͱر๬ ٕज़త޷ح৺ 7

Slide 8

Slide 8 text

ͲΜͳເͱر๬͔ͩͬͨ ϕϯμʔϩοΫΠϯΛආ͚ΔͨΊOSSΛ࢖ͬͯ ϚΠΫϩαʔϏεͰ࡞Γ͍ͨ 8

Slide 9

Slide 9 text

ٕज़ελοΫ 9 Kubernetes ίϯςφΦʔέετϨʔ γϣϯΛϕϯμʔʹґଘͤ ͣʹӡ༻͍ͨ͠ ElasticSearch ϩάج൫Λϕϯμʔʹґଘ ͤͣʹӡ༻͍ͨ͠

Slide 10

Slide 10 text

10 ηϧϑϚωʔδυʹ͕͗ͨͨ͢͠Ίʹ 
 ӡ༻͢Δ͜ͱʹίετ͕͔͔͍ͬͯͨ ໰୊

Slide 11

Slide 11 text

ݱ৔ͷ՝୊ 11 ߴྸԽ ਓखෆ଍ ಠΓཱͪʹ 
 ͕͔͔࣌ؒΔ

Slide 12

Slide 12 text

ٕज़ελοΫ 12 Kubernetes ίϯςφΦʔέετϨʔ γϣϯΛϕϯμʔʹґଘͤ ͣʹӡ༻͍ͨ͠ ElasticSearch ϩάج൫Λϕϯμʔʹґଘ ͤͣʹӡ༻͍ͨ͠

Slide 13

Slide 13 text

Kubernetesฤ 13

Slide 14

Slide 14 text

14 ϝΠϯͷػೳʹؔͯ͠͸ 
 KubernetesͰͷӡ༻ΛࣙΊͨ ݱࡏ

Slide 15

Slide 15 text

Kubernetesӡ༻ʹ͓͚Δ࠴຿ ίϯςφԽ͞ΕͨΞϓϦέʔγϣϯ͕ಈ͘ͱ͍͏͜ͱΛ 
 อূͯ͘͠ΕΔΘ͚Ͱ͸ͳ͍ 15 Kubernetes͕֤ίϯςφΛͲ͏ಈ͔͔͢Λ 
 ࣗࣾͷ੹೚Ͱద੾ʹઃܭ͢Δඞཁ͕͋Δ

Slide 16

Slide 16 text

ద੾ʹઃܭ͢Δ͜ͱ͕Ͱ͖Ε͹ ϕϯμʔϩοΫΠϯΛආ্͚ͨͰ ίϯςφΛಈ͔͢͜ͱ͕Մೳ 16

Slide 17

Slide 17 text

ฐࣾ΋ϦϦʔε౰ॳ͸໰୊ͳ͘ίϯςφ͕ಈ͍͍ͯ·ͨ͠ 17

Slide 18

Slide 18 text

1ਓͷઋਓ͕Kubernetesͷӡ༻Λʹͳͬͯ͘Ε͍͔ͯͨΒ 18

Slide 19

Slide 19 text

͜ͷ··্ख͍͔͘͘ͳͱࢥ͍ͬͯͨ໼ઌʹɺ ͜ͷઋਓ͕૊৫Λ཭ΕΔ͜ͱʹͳΓ·ͨ͠ 19

Slide 20

Slide 20 text

৽͍͠Ձ஋ͷఏڙͷͨΊ 
 ৽نػೳͷ։ൃͱϦϦʔε ຖճόλόλɾ෮چʹ΋͕͔͔࣌ؒΔ 20

Slide 21

Slide 21 text

Kubernetes → Azure App Service 21 Azure App Service Web ΞϓϦ΍ API Λ৚݅ʹ߹Θͤͯਝ଎ʹߏஙɺσϓϩΠɺεέʔϦϯάͰ͖· ͢ɻίϯςφʔ಺΍ɺWindows ·ͨ͸ Linux ্Ͱ࣮ߦ͞Ε͍ͯΔ .NETɺ .NET Coreɺ Node.jsɺ Javaɺ Pythonɺ·ͨ͸ PHP Λૢ࡞Ͱ͖·͢ɻ1 ೔͋ͨΓ 600 ԯ݅Λ௒͑ΔཁٻΛॲཧ͢Δ৴པੑʹ༏Εͨϑϧ Ϛωʔδυ αʔϏεΛ࢖͏͜ͱ ͰɺΤϯλʔϓϥΠζ Ϋϥεͷݫ͍͠ύϑΥʔϚϯεɺηΩϡϦςΟɺ͓Αͼί ϯϓϥΠΞϯεཁ݅ʹରԠͰ͖·͢ɻ

Slide 22

Slide 22 text

22 ίϯςφΦʔέετϨʔγϣϯͱ͍͏࠴຿Λ 
 Azureʹݞ୅ΘΓͯ͠΋Β͏ ͭ·Γ

Slide 23

Slide 23 text

CDͷҠߦ 23 App Service × Container Registry Azure Container Registry ͢΂ͯͷ OCI ੒Ռ෺Λαϙʔτ͢ΔɺDocker Πϝʔδͱ Open 
 Container Initiative (OCI) ΠϝʔδͷϨδετϦɻ

Slide 24

Slide 24 text

CDͷҠߦ App Serviceͷ೚ҙͷContainer RegistryͷλάΛ؂ࢹͯ͠ 
 มߋΛݕ஌͢Δͱࣗಈతʹ৽͍͠DockerΠϝʔδΛσϓϩΠ͢Δػೳ → Ϗϧυͨ͠Πϝʔδʹରͯ͠versionλάͱlatestλάΛ෇͚ɺ Container RegistryʹPush͠ɺlatest͕ߋ৽͞Εͨ৔߹ʹσϓϩΠ͞ΕΔ Α͏ͳઃఆΛߦ͍ӡ༻͠·ͨ͠ɻ 24

Slide 25

Slide 25 text

25 ӡ༻ͷෛՙ͕ܰݮ ϏδωεϩδοΫʹूத ։ൃͷεϐʔυ͕޲্

Slide 26

Slide 26 text

ͳͥઋਓʹґଘ͔ͨ͠ 26

Slide 27

Slide 27 text

27 ߏ੒ͱͯ͠ 
 ίετ͕͔͔Δ෦෼ Ձ஋ఏڙ͍ͯ͠Δ෦෼ ౤ࢿ͕ૄ͔ʹͳΔ ࠷ѱӡ༻ͷةػʁ

Slide 28

Slide 28 text

ݱࡏͷKubernetesͷར༻༻్ 28

Slide 29

Slide 29 text

29 ࿥ըػೳͷͨΊʹར༻ ར༻༻్

Slide 30

Slide 30 text

௨࿩ػೳ WebRTCΛར༻࣮ͯ͠૷ WebRTC͸࣮૷ίετ͕ߴ͍ 
 → Twilio Programmable VideoΛར༻ 30

Slide 31

Slide 31 text

Composition API Twilio Programmable Videoͷ࿥ըੜ੒API ύϒϦογϡ͞Εͨө૾ͱԻ੠ͷه࿥͔Β 
 ೚ҙͷө૾ͱͦͷ഑ஔΛܾΊ 
 ೚ҙͷԻ੠ͱ݁߹͠ಈըΛੜ੒ 31

Slide 32

Slide 32 text

ϙΠϯλػೳ WebRTCͷσʔλνϟωϧΛհͯ͠ ʮࠓͲ͜Λࢦ͍ࠩͯ͠Δ͔ʯ 
 ͱ͍͏৘ใͷ΍ΓऔΓΛ࣮ͯ͠ݱ 32

Slide 33

Slide 33 text

໰୊఺ Composition APIͰ݁߹Ͱ͖Δͷ͸ 
 ө૾ͱԻ੠ͷΈͰσʔλνϟωϧ͸ͦ΋ͦ΋ه࿥͞Εͳ͍ → ʮ͋ΕɾͦΕɾ͜Εʯͱݴ͍ͳ͕Βձ࿩ͯ͠ϙΠϯλ͕ه ࿥͞Ε͍ͯͳ͚Ε͹ɺ͋ͱ͔Βݟ௚ͨ࣌͠ʹԿʹ͍ͭͯ࿩͠ ͍ͯΔ͔͕෼͔Βͳ͍ 33

Slide 34

Slide 34 text

Ͳ͏΍͍ͬͯΔ͔ botΛ௨࿩ʹࢀՃͤ͞ 
 Ծ૝ͷϒϥ΢βʹϨϯμϦϯάͤͨ͞΋ͷΛ 
 GstreamerͰऩ࿥ 34

Slide 35

Slide 35 text

Kubernetesʹͨ͠ཧ༝ ө૾ͷॲཧΛ͢ΔͨΊॏ͘ 
 ͍ͭ࢝·Γ͍ͭऴྃ͢Δ͔෼͔Βͳ͍ॲཧ Λޮ཰Α࣮͘ߦͰ͖ͦ͏͔ͩͬͨΒ 35

Slide 36

Slide 36 text

ElasticSearchฤ 36

Slide 37

Slide 37 text

ϩάج൫ӡ༻ͷ՝୊ ϩάج൫ʹ͸ৗʹେྔͷϦΫΤετ͕ඈΜͰ͖ͯ 
 ϚγϯϦιʔε؅ཧ͕ෳࡶ 37

Slide 38

Slide 38 text

ฐࣾͷ৔߹ Kubernetes্ͰElasticSearchΛӡ༻͍ͯͨ࣌͠ʹ 
 શͯͷίϯςφ͕Pending → શͯͷαʔϏεͷϩάΛऔಘ͠Α͏ͱ͍ͯͨͨ͠Ί 
 ɹ ElasticSearch͕ϝϞϦΛ৯͍௵͠ 
 ɹ ଞͷίϯςφΛىಈͰ͖ͳ͍ 38

Slide 39

Slide 39 text

͋͘·Ͱ΋ϩάج൫Λӡ༻͢Δ͜ͱ͕໨తͰ͸ͳ͍ 39

Slide 40

Slide 40 text

ElasticSearch → Azure Application Insights 40 "[VSF"QQMJDBUJPO*OTJHIUT "QQMJDBUJPO*OTJHIUT͸"[VSF.POJUPSͷ֦ுػೳͰ͋ΓɺΞϓϦέʔγϣϯ ύϑΥʔϚϯε؂ࢹ "1. ػೳΛఏڙ͠·͢ɻ"1.πʔϧ͸ɺ࣍ͷํ๏Ͱɺ ։ൃɺςετɺӡ༻؀ڥ͔ΒΞϓϦέʔγϣϯΛ؂ࢹ͢Δͷʹ໾ཱͪ·͢ɻ

Slide 41

Slide 41 text

App Insightsͷ౷߹ 41 "QQMJDBUJPO*OTJHIUTΛ&OBCMFEʹ͠ 
 Ͳͷ"QQ*OTJHIUTʹϩάΛૹ৴͢Δ͔બ୒͢Δ͚ͩͰઃఆ͕׬ྃ

Slide 42

Slide 42 text

ΞϓϦέʔγϣϯϚοϓ ෳ਺ͷApp Service͔ΒಉҰͷApplication Insightsʹ 
 ϩάΛૹ৴͢ΔΑ͏ʹઃఆ͢Δ͚ͩ 42

Slide 43

Slide 43 text

τϥϯβΫγϣϯͷݕࡧ 43

Slide 44

Slide 44 text

ϕϯμʔϩοΫΠϯΛڐ༰ͨ͜͠ͱʹΑΓ 
 ϩάͷऩू͔Β෼ੳػೳͷߏங·ͰϫϯετοϓͰ׬ྃ 
 εϐʔυײ΍खܰ͞ͳͲͷԸܙ 44

Slide 45

Slide 45 text

45 ϩάج൫ͷӡ༻ʹ಄Λ೰·͢ඞཁੑ͕ݱ৅ ϏδωεϩδοΫʹूத ։ൃͷεϐʔυ͕޲্

Slide 46

Slide 46 text

͜͜·Ͱ 46

Slide 47

Slide 47 text

ϕϯμʔʹґଘ͠ͳ͍ Ձ஋ఏڙͰ͸ͳ͍෦෼Ͱ 
 ӡ༻ͷͨΊʹϦιʔεΛׂ͍ ͍ͯͨߏ੒ ϕϯμʔʹґଘ ӡ༻ʹඞཁͳϦιʔεΛܰݮ ػೳͷ։ൃʹϦιʔεΛूத Ͱ͖ΔΑ͏ʹߏ੒Λมߋ 47

Slide 48

Slide 48 text

ٕज़త޷ح৺ʹ໨Λ޲͚ΔͷͰ͸ͳ͘ 
 ݱ৔ͷ՝୊ʹ໨Λ޲͚Δ 48

Slide 49

Slide 49 text

OSSಋೖͷऔΓ૊Έ 49

Slide 50

Slide 50 text

ԿΛ͠Α͏ͱ͍ͯ͠Δ͔ʁ Relation-Based Access ControlʢReBACʣΛ͢ΔͨΊʹ OpenFGAͱ͍͏OSSΛ࠾༻͠Α͏ͱ͍ͯ͠·͢ɻ 50

Slide 51

Slide 51 text

OpenFGAͱ͸ ● OpenFGA͸ReBACΛ؆୯ʹߏங͠ར༻Ͱ͖ΔOSS ● CNCFͷSandBoxͷϓϩδΣΫτ ● GoogleͷೝՄج൫Ͱ͋ΔZanziberͷ࿦จΛ΋ͱʹ 
 Auth0͕࣮૷͠OSSͱͯ͠ެ։ 51

Slide 52

Slide 52 text

52 ݱ৔͔Βͷχʔζ͕͋Δ ReBACΛ࣮ݱ͢ΔͨΊͷαʔϏε͕ͳͦ͞͏ ͳͥOpenFGAʁ

Slide 53

Slide 53 text

ݱ৔ͷχʔζ 53 🏭 ݱ৔ 👤 Ϣʔβʔ 👤 Ϣʔβʔ 🏭 ݱ৔ 👤 Ϣʔβʔ ੹೚ऀ ࢀՃऀ ੹೚ऀ ήετ

Slide 54

Slide 54 text

OpenFGAͰͷReBAC 1. DSLͰσʔλϞσϧΛఆٛ 2. Relation TupleΛ࡞੒ 3. ݖݶΛ͍࣋ͬͯΔ͔Ͳ͏͔ΫΤϦ 54

Slide 55

Slide 55 text

DSLͰσʔλϞσϧΛఆٛ 55

Slide 56

Slide 56 text

Relation TuppleΛ࡞੒ 56

Slide 57

Slide 57 text

ݖݶΛ͍࣋ͬͯΔ͔Ͳ͏͔ΫΤϦ 57

Slide 58

Slide 58 text

ΫΤϦͷྫ ● anne͸ࢿྉZʹରͯ͠ӾཡݖݶΛ͍࣋ͬͯΔ͔ʁ ● anne͕ӾཡݖݶΛ͍࣋ͬͯΔࢿྉ͸ʁ 58

Slide 59

Slide 59 text

anne͸Zʹରͯ͠ӾཡݖݶΛ͍࣋ͬͯΔ͔ʁ 59

Slide 60

Slide 60 text

anne͕ӾཡݖݶΛ͍࣋ͬͯΔࢿྉ͸ʁ 60

Slide 61

Slide 61 text

OpenFGAͷظ଴ ● ؔ܎ͱσʔλͷ෼཭͕ਐΉ͜ͱͰ֤ϚΠΫϩαʔϏεͷ࣮ ૷͸ΑΓσʔλʹରͯ͠ूதͰ͖Δ ● DSLͰݖݶϞσϧΛҰݩ؅ཧͰ͖ΔͷͰɺݖݶͷ໰୊ʹΑ ΔηΩϡϦςΟϦεΫܰݮ 61

Slide 62

Slide 62 text

ݱ৔ͷ՝୊Λղܾ͢Δ্Ͱ 
 ඞཁੑΛײ͡Δ৔߹ 
 ੵۃతʹνϟϨϯδ͍ͯ͘͠ελϯε 62

Slide 63

Slide 63 text

Ϣʔβʔͷ՝୊ղܾʹΠϯύΫτ͕͋Δͱ͜Ζʹ ϦιʔεΛ͔͚Δ͜ͱ͕Ͱ͖ΔΑ͏ʹ 
 ߏங͢Δ͜ͱ͕େࣄͩͱࢥ͍ͬͯ·͢ 63

Slide 64

Slide 64 text

͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ 64