じわじわとPerlからGoに移行しようとしている俺達のマイクロサービシーズの紹介 / The migrating to microservices in Go from Monolith in Perl
by
mackee
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
͡Θ͡ΘͱPerl͔ΒGoʹ Ҡߦ͠Α͏ͱ͍ͯ͠Δ ԶͨͪͷϚΠΫϩαʔϏγʔζ YAPC::Japan::Online 2022 2022-03-05 Track B 13:40ʙ14:20 @macopy a.k.a @mackee_w
Slide 2
Slide 2 text
͜ͷηογϣϯͷུ֓
Slide 3
Slide 3 text
1FSMೖֶࣜ͘ΜIUUQTQFSMFOUSBODFDPOOQBTTDPN 3FOÉF'SFODIIUUQTSFOFFGSFODICMPHTQPUDPN
Slide 4
Slide 4 text
(·ͩ)શ෦ஔ͖͍͑ͯͳ͍
Slide 5
Slide 5 text
No content
Slide 6
Slide 6 text
Tonamelͷنײ -PCJ5PVSOBNFOU ޙͷ5POBNFM ։ൃ։࢝ 5POBNFMʹ໊લ͕มߋ 1FSMͷߦߦ ͭͳ͗͜ΈͰएׯ૿Ճ 1FSMͷߦߦ (PϚΠΫϩαʔϏεº (Pͷߦߦ ͏ͪίʔυੜߦ
Slide 7
Slide 7 text
͜Ε·Ͱ2΄Ͳ͔͚ͯ ͡Θ͡ΘҠߦͭͭ͋͠Δ
Slide 8
Slide 8 text
ͦͷؒʹػೳ͕૿͑
Slide 9
Slide 9 text
େձ૿͍͑ͯ͘
Slide 10
Slide 10 text
͜ͷηογϣϯͰ ٞͷҰൠԽΛ͋͑ͯͤͣ TonamelͰͷࣄྫΛ͠·͢
Slide 11
Slide 11 text
ୈ1ষ: ͳͥϚΠΫϩαʔϏεʹ͢Δͷ͔ʁ ୈ2ষ: ॳΊͯͷαʔϏεׂ ୈ3ষ: ϚΠΫϩαʔϏεͨͪͷ࿈ܞํ๏
Slide 12
Slide 12 text
@macopy • ໘ന๏ਓΧϠοΫ eεϙʔπࣄۀ෦ TonamelαʔόαΠυςοΫϦʔυ • Perlେ͖ Go͖ • GGST༻Ωϟϥ: ϥϜϨβϧ • ISUCON11 ༏উ ←NEW!
Slide 13
Slide 13 text
ୈ1ষ ͳͥϚΠΫϩαʔϏεʹ͢Δͷ͔ʁ
Slide 14
Slide 14 text
Ҡߦલͷߏ(ʙ2020-07) ͜ͷޙʹϚΠΫϩαʔϏεԽʹ߹ΘͤͯECSԽ
Slide 15
Slide 15 text
՝: PerlͰڊେGraphQLΛ ͘͞ͷՙ͕ॏ͍ • TonamelͰओͳAPIܗࣜͱͯ͠GraphQLΛ ࠾༻͍ͯ͠Δ • ڊେͳϨεϙϯεΛฦ͢ͱ͖ɺGraphQL.pm 0.47(2021-02ϦϦʔε)ҎલͰܕνΣοΫ ͕ϨεϙϯελΠϜͷ΄ͱΜͲΛΊ͍ͯͨ • GraphQLΛ͍ଓ͚Δʹɺ͜ͷ͋ͨΓʹԿ Β͔ͷվળҊ͕ඞཁͩͬͨ
Slide 16
Slide 16 text
ݱࡏͷGraphQL.pm(>=0.47)σϑΥϧτͰ ࣮ߦ࣌ܕνΣοΫ͕Φϑʹͳ͍ͬͯΔ ࣌ʹͳ͍ͬͯͨGraphQL QueryͷϕϯνϚʔΫΛͬͯΈͨ(256ਓγϯάϧΤϦϛωʔγϣϯͷΫΤϦ) $ carton exec perl -Ilib tmp/graphql_benchmark.pl bench 47bIg Benchmark: timing 10 iterations of default... default: 4 wallclock secs ( 3.22 usr + 0.08 sys = 3.30 CPU) @ 3.03/s (n=10) Rate default default 3.03/s — `local $ENV{PERL_STRICT} = 1;` ΛίʔυʹೖΕͯܕνΣοΫΛ༗ޮʹͯ͠ΈΔ(࣌͜ͷঢ়ଶͩͬͨ) $ carton exec perl -Ilib tmp/graphql_benchmark.pl bench 47bIg Benchmark: timing 10 iterations of default… default: 7 wallclock secs ( 6.57 usr + 0.07 sys = 6.64 CPU) @ 1.51/s (n=10) Rate default default 1.51/s --
Slide 17
Slide 17 text
͍͔ͭ͘ͷબࢶ • GraphQLΛ࠾༻͢Δ߹ • Perl ͷ··Ͱ GraphQL ΛߴԽ͢Δ • GraphQLΛίετΊʹฦͤΔϥΠϒϥϦ͕͋ΔݴޠʹΓ͑Δ • ͦΕҎ֎Λ࠾༻͢Δ߹ • PerlͰѻ͑ΔൣғͷAPIతͳͷʹ͢Δ • XslateͰMPAʹΔ
Slide 18
Slide 18 text
GraphQLҎ֎ͷ՝: εέʔϦϯάੑ • ͕͋ΔτϥϑΟοΫͷରԠ • όοΫΤϯυDB͕Aurora MySQLͳͷͰɺखಈͰεέʔϧΞοϓ/Πϯ ͯ͠ෛՙʹରԠ͍ͯͨ͠ • => ӡ༻ͷख͕ؒ͠ΜͲ͍ͷͰɺࣗಈͰਫฏεέʔϧ͢Δσʔλε τΞʹҠߦ͍ͨ͠Ϟνϕʔγϣϯ • ྫ͑DynamoDBͱͳΔ͕ɺPerlͰDynamoDBΛѻ͏ϊϋ͕ͳ͍
Slide 19
Slide 19 text
ΠϕϯτʹΘΕΔαʔϏεͳͷͰ τϥϑΟοΫͷ͕େ͖͍
Slide 20
Slide 20 text
GraphQLҎ֎ͷ՝: ੩తܕ͕ͳ͍ݴޠ͕ਏ͍ • τʔφϝϯτදͷߏஙൺֱతෳࡶͳϓϩάϥϛϯάΛཁٻ͞ΕΔํ • εΠευϩʔͷOMW%, μϒϧΤϦϛͷഊऀαΠυͷஔͳͲ • ෳࡶͳϩδοΫΛΉͷʹܕ͕͋Δͱ”҆৺”͢Δ • ͪΖΜςετඞཁ
Slide 21
Slide 21 text
ͱ͍͏Θ͚ͰGo͕͍͍ͨ • GraphQL => gqlgenͱ͍͏εΩʔϚϑΝʔετͰ੩తܕνΣοΫΛ ߦ͏ϥΠϒϥϦ • ਫฏεέʔϦϯάՄೳͳDBΛ͍͍ͨ => GoެࣜAWS SDK͕͋ ΓɺDynamoDBΛѻ͏ͨΊͷϥούʔϥΠϒϥϦ͋Δ • ੩తܕ͕ͪΐ͏Ͳ͍͍ײ͡ʹଘࡏ͢Δ • ͳʹΑΓνʔϜϝϯόʔ͕աڈʹͬͨ͜ͱ͕͋ΔݴޠͰ͋Δ
Slide 22
Slide 22 text
Ͳ͏GoΛΈࠐΉ͔ʁ • શ෦Goʹ͢Δͱʁ • ࠓ·Ͱೖ͍ͬͯΔDBʹೖ͍ͬͯΔσʔλΛͲ͏͢Δͷ͔ • શ෦GoͰ࣮͠ऴΘΔ·Ͱ৽ن։ൃΛࢭΊΔͷ͔ • => ݁ߏ͍͠ • Ұ෦͚ͩGoʹ͍ͨ͠ • ͕ͩDBΛڞ༗ͨ͘͠ͳ͍ DynamoDBʹ͍ͨ͠
Slide 23
Slide 23 text
ϚΠΫϩαʔϏεׂ͢Δ
Slide 24
Slide 24 text
ҰൠతͳϚΠΫϩαʔϏεͷޮೳ • ݸʑͷΞϓϦέʔγϣϯͷΛখ͘͞อͯΔ • ΞδϦςΟ͕ߴ͘ͳΔ • ΞϓϦέʔγϣϯ͝ͱʹదͳΞʔΩςΫνϟΛબΔ • ؔ৺͝ͱʹνʔϜΛׂ͢Δ͜ͱ͕༰қʹͳΔ • etc…
Slide 25
Slide 25 text
ϚΠΫϩαʔϏεΛΓ͔ͨͬͨͱ͍͏ΑΓ ͦΕҎ֎ͷྑ͍બࢶ͕ͳ͔ͬͨͷͰͬͨ • ϚΠΫϩαʔϏεΛબ͢Δͷʹ્͢Δཁૉ • νʔϜׂ͢Δ΄Ͳن͕େ͖͘ͳ͍ • ͚Ͳɺݱঢ়ͷΞʔΩςΫνϟͰղܾͰ͖ͳ͍՝͕͋Δ • ࠷ऴతʹϞδϡϥϞϊϦεʹ߹ମ͢ΔՄೳੑ͋Δͱࢥ͍ͬͯΔ
Slide 26
Slide 26 text
ͦͦϞδϡϥϞϊϦεͩͬͨͷͰ ׂ͔ͬͨ͢͠ • ઌਓ͕TonamelΛϞδϡϥϞ ϊϦεͰ࡞ͬͯ͘Ε͍ͯͨ • ׂ͢ΔͨΊͷػೳͷڥք͕ ͢Ͱʹଘࡏ͍ͯͨ͠
Slide 27
Slide 27 text
ͰͲ͏͍͔ͬͯ͘
Slide 28
Slide 28 text
ୈ2ষ ॳΊͯͷαʔϏεׂ
Slide 29
Slide 29 text
ॳखɺԿΛΓग़͔͢
Slide 30
Slide 30 text
͡ΊʹΓग़͢ͱྑ͍ͱ͞ΕΔαʔϏεͷ݅ • ͋ΔఔαʔϏε͕ʮڥք͚ͮΒΕͨίϯςΩετʯʹͦͬͯղ͞ Ε͍ͯΔલఏͰҎԼ • ଞͷίϯςΩετ͔Βͷґଘ͕গͳ͍ => ղ͍͢͠ • ϩʔϧόοΫ͕͍͢͠ => ࡉ͔͘ϦϦʔεͰ͖Δ • ղʹΑΔརӹ͕େ͖͍
Slide 31
Slide 31 text
༏ઌॱҐ͚ݶ ʮϞϊϦε͔ΒϚΠΫϩαʔϏεʯΛࢀߟʹ
Slide 32
Slide 32 text
ͳͥτʔφϝϯτද͔ • GraphQLͷϨεϙϯελΠϜΛվળ͔ͨͬͨ͠ͷτʔφϝϯτද • => ղʹΑΔརӹ͕͋Δ • τʔφϝϯτදʹ͍ͭͯ৽ػೳ(μϒϧΤϦϛωʔγϣϯ)ͷ࣮͕༧ఆ͞Ε͍ͯͨ • => ৽ػೳΛΔҰͱͯ͠ϚΠΫϩαʔϏεͷղ͕ߦ͑Δ • τʔφϝϯτද΄͔ͷαʔϏεʹґଘ͢ΔαʔϏεͳͷͰɺґଘ͞ΕΔଆͰ ͳ͍ • => ղͷ͢͠͞
Slide 33
Slide 33 text
্ͬͨͰ͜ͷஅͷৼΓฦΓ • ৽ػೳͷҰͱͯ͠ղΛߦ͏ͷ͋·ΓಘࡦͰͳ͍ • ϩʔϧόοΫ͕ͮ͠Β͘ͳΔ • ։ൃνʔϜ֎͔Βͷਐḿͷݟ͕ͨѱ͍ • ໌ࣔతʹػೳͷϚΠΫϩαʔϏεͷ࠶࣮Λ͍ͬͯΔͱ͍͏ ͷΛݴͬͨ΄͏͕ྑ͍ • ϦϦʔε͕ϏοάόϯʹͳΓ͕ͪ(͋Δఔ؇ࡦ͋Δ)
Slide 34
Slide 34 text
طଘͷϦΫΤετͱ ৽τʔφϝϯτදϦΫΤετͷ ͚ํ
Slide 35
Slide 35 text
GraphQLΤϯυϙΠϯτΛ͚Δ
Slide 36
Slide 36 text
ϢʔβʔใϔομʹJWTͰຒΊࠐΉ • ϞϊϦεͰड͚ͨϦΫΤετͷCookie͔ΒϦΫΤετϢʔβʔͷ ηογϣϯใΛऔΓग़͢ • ͜͜·Ͱैདྷ·Ͱ͋Δಈ࡞ • `X-Awesome-Authentication: ` ͷΑ͏ͳHTTPϔομʹJWTϊ ܗͰೖΕΔ • ϓϩΩγͰBodyΛ͍ͬͨ͡ΓಡΜͩΓͨ͘͠ͳ͍
Slide 37
Slide 37 text
͞ΒʹύεΛ͚ͯ Ϣʔβ×େձͷݖݶใ༩
Slide 38
Slide 38 text
GraphQLͷύεΛେձ͝ͱʹ͚Δ ྫ: େձID=XXXXX ͷ߹ POST /new_awesome/graphql/XXXXX ͜ΕͰBodyΛಡ·ͳͯ͘ τʔφϝϯτදαʔϏε͕ΞΫηεϢʔβͷݖݶΛΕΔ
Slide 39
Slide 39 text
ͿͬͪΌ͚Δͱ͜Ε͓͢͢ΊͰͳ͍ • GraphQLΤϯυϙΠϯτ͕Ұݸʹ·ͱ·Δͷ͕͍͍ͱ͜ΖͷҰͭ • ΫϥΠΞϯταΠυෳݸʹ͔ΕΔͷରԠ͍ͯ͠ͳ͍͜ͱ͕ ଟ͍ • ͬͱ΄͔ʹΓํ͕͋ͬͨɺޙड़͢Δେ౷Ұʹ࣋ͪӽ͍ͯ͠Δ • ผղ: ύʔεޙʹผͷAPIʹେձใ+ݖݶใ͍߹Θͤ + େձ αʔϏεΛઌʹ࡞Δ
Slide 40
Slide 40 text
ͰͲͷΑ͏ʹ ຊ൪ʹೖΕΔ͔
Slide 41
Slide 41 text
͓खܰʹαΠυΧʔʹͨ͠
Slide 42
Slide 42 text
αΠυΧʔʹ͢ΔϝϦοτɾσϝϦοτ • ϝϦοτ • Πϯϑϥ͕ෳࡶʹͳΒͳ͍, Ճ͢Δख͍ؒ҆ • εέʔϧΞτϞϊϦεͱҰॹʹ͢Δ => ෛՙ͕ಡΊͳ͍ͱ͖ʹศར • σϝϦοτ • ECS Taskͷ10ίϯςφ੍ݶΛ͑Δ͜ͱग़དྷͳ͍ • αʔϏεͷधཁʹ߹ΘͤͯݸผʹεέʔϧΞτ͕ग़དྷͳ͍
Slide 43
Slide 43 text
ͯ͞ϦϦʔε… ͕ͩ💥Ϗοάόϯ💥Λආ͚͍ͨ
Slide 44
Slide 44 text
ϕετϓϥΫςΟε: 💥Ϗοάόϯ💥Λආ͚Δ • ͜ͷ߹ͷϏοάόϯͱ • ͍͖ͳΓ৽࣮ͨ͠ϚΠΫϩαʔϏεʹαʔϏεશମΛΓସ͑Δ • ϏοάόϯͷσϝϦοτ • Γ͕͠ࠔʹͳΔ • ϦϦʔε୯Ґ͕େ͖͘ͳΔ => ݁ՌతʹσϦόϦʔ͕͘ͳΔ
Slide 45
Slide 45 text
τʔφϝϯτදαʔϏεͰߦͬͨ͜ͱ • Ұ෦ͷϢʔβʹݶఆػೳͱͯ͑͠ΔΑ ͏ʹఏڙ • ϑΟʔυόοΫΛΒ͍͍͢Ϣʔ βʹݶఆͯ͠ఏڙͰ͖Δ • େ͖ͳେձΛආ͚ͯఏڙ͢Δ • چτʔφϝϯτදػೳฒߦͯ͠ఏڙ ͠ଓ͚Δ • ͕͋Εݹ͍ํΛͬͯΒ͏
Slide 46
Slide 46 text
β൛தʹߦͬͨ͜ͱ • ຊ൪ͰΤϥʔϩά͕ग़ͨΒ͙͢ʹ͢ • σʔλͿͬյΕܥ͍ʹগͳ͔ͬͨ(͋Δʹ͕͋ͬͨ) • ن͕େ͖ΊͷେձͰΘΕͯͨΒࢹ͍ͯ͠ΔϝτϦοΫΛݟΔ • DynamoDBΛॳΊ͍ͯͬͯͨͷͰෛՙ͕Θ͔Βͳ͔ͬͨͷ ͋Δ • ༷ʑͯ͠େৎͦ͏ͳͷͰਖ਼ࣜϦϦʔε
Slide 47
Slide 47 text
͍Ζ͍Ζ͕͋ͬͨͨ͠ʂ
Slide 48
Slide 48 text
Ͱ͜Ε͚ͩͩͱͨͩͷ PolyglotߏͩΑͶ
Slide 49
Slide 49 text
ୈ3ষ ϚΠΫϩαʔϏε ͨͪͷ࿈ܞํ๏
Slide 50
Slide 50 text
τʔφϝϯτදαʔϏεҎ߱ͷ։ൃํ • GoΛؚΊͨpolyglotͰΕΔ͜ͱ͕Θ͔ͬͨͷͰҎԼͷํʹ͢Δ • ৽ػೳͯ͢ϚΠΫϩαʔϏεଆʹ࣮͢Δ • طଘػೳͷվमPerlϞϊϦεͷ࣮͕ۃʹૣ͍߹ͦͪΒ ʹ࣮͢Δɻͦ͏Ͱͳ͍߹ϚΠΫϩαʔϏεଆ
Slide 51
Slide 51 text
࣍ԿΛΓग़͢ͷ͔
Slide 52
Slide 52 text
༏ઌॱҐ͚ݶ
Slide 53
Slide 53 text
༏ઌॱҐ͚ݶ(Update൛)
Slide 54
Slide 54 text
εϙϯαʔػೳΛ࡞Δ͜ͱʹͳͬͨ
Slide 55
Slide 55 text
εϙϯαʔػೳͱ • େձϖʔδʹࠂΛࡌͤΒΕΔػೳ • ࠂओ࠵ஂମ͕ืूͯ͠ɺࠂ ओ͕ओ࠵ஂମʹ͓ۚΛ͏͜ͱͰࡌ ͤͯΒ͑Δ
Slide 56
Slide 56 text
ઃܭํ • εϙϯαʔαʔϏεͱܾࡁαʔϏεͷ2ͭʹׂ͢Δ • εϙϯαʔαʔϏεͷ => େձʹඥͮ͘εϙϯαʔͷཧ • ਃ༰ঝೝϑϩʔɺऔΓԼ͛ͳͲΛ͔ͭ͞ͲΔ • εϙϯαʔ͕ԿΛͬͯਃ͞ΕΔ͔͋·Γؾʹ͠ͳ͍ • ܾࡁαʔϏε => StripeΛ༻͍ͨ͋Δਓ͔Β͋Δਓͷࢧ͍ͷཧ • Կͷࢧ͍͔ܾࡁαʔϏε͋·Γؾʹ͠ͳ͍
Slide 57
Slide 57 text
εϙϯαʔػೳͷσʔλͷྲྀΕ
Slide 58
Slide 58 text
͜͏ݴ͏ਤΛ࠷ॳʹॻ͘ͷ ͓͢͢Ίʂ
Slide 59
Slide 59 text
Domain Event • ৽τʔφϝϯτදαʔϏε࣮Ҏલ͔Β͋ΔඇಉظδϣϒΛҕৡ͢ΔͨΊ ͷػߏͱͯ͠Domain Eventͱݴ͏֓೦Λ༻ҙͨ͠ • ࣮ৄࡉతʹHTTPͰLambdaΛୟ͘ͱSQSʹΤϯΩϡʔ͞Εͯɺϝο ηʔδΛผͷLambda͕ىಈͯ͠ɺ֤ϚΠΫϩαʔϏεͷhandlerʹϝο ηʔδΛ৴͢Δ • ϝοηʔδʮ○○͕ىͬͨ͜ʂʯͱ͍͏ײ͡Ͱpublish͞Ε͍ͯΔ • ʮ˓˓Λͯ͘͠Εʯͱ͍͏ײ͡Ͱͳ͍
Slide 60
Slide 60 text
େձ࡞࣌ͷϝοηʔδ৴ εϚʔτΤϯυϙΠϯτɾμϜύΠϓతͳࢥ
Slide 61
Slide 61 text
εϙϯαʔػೳͷͦͷଞ • σʔλετΞMySQL • τʔφϝϯτදαʔϏε΄ͲͷεέʔϧΞτੑೳ͍Βͳ͍ • ౿ΜͰͯࣾͰൺֱతѻ͑Δਓ͕ଟ͍MySQLΛ͏ • ΞʔΩςΫνϟActive Recordύλʔϯ • τʔφϝϯτදαʔϏεClean Architecture
Slide 62
Slide 62 text
͜ΕͳΜͱ͔ϦϦʔεʂ
Slide 63
Slide 63 text
·ͱΊͱࠓޙͷల
Slide 64
Slide 64 text
ϚΠΫϩαʔϏεखஈͰ͋ΓతͰͳ͍ • TonamelʹͱͬͯϚΠΫϩαʔϏεҎԼͷ՝Λղܾ͢Δखஈ • ݱࡏͷαʔϏεΛࢭΊͣʹஞ࣍৽ػೳΛՃ͢Δ • ϞϊϦεଆͷ࠾༻ٕज़Ͱग़དྷͳ͔ͬͨ͜ͱΛॊೈʹಋೖ͢Δ • ࣌ظ͕དྷΕશ෦·ͨϞδϡϥϞϊϦε߹ମ͢Δͷݕ౼ • νʔϜ͕ෳʹͳΔ͙Β͍େ͖͘ͳΔ͔Ͳ͏͔ • ࡞Δͷ͕ਖ਼͍͔͠Θ͔ΒΜॳظϞϊϦεͷ΄͏͕͍Ͱ͢ • ϞϊϦε͔ΒΓग़͢߹ɺਖ਼͘͠ಈ͘ͷ͕ͦ͜ʹ͋Δ͔Β࡞Δͷ͕ૣ͘ͳΔ
Slide 65
Slide 65 text
ࠓޙͷల • Apollo Federationͷಋೖ • PerlϞϊϦε, τʔφϝϯτද, εϙϯαʔ, ܾࡁͱͯ͢GraphQL ͕͔Ε͍ͯΔͷΛ౷߹͢ΔͨΊͷιϦϡʔγϣϯ • ϞϊϦεʹ͋Δͯ͢ͷػೳΛϚΠΫϩαʔϏεׂ • ݱࡏҠ২࡞ۀதͷͷ͋Γ
Slide 66
Slide 66 text
Any Questions?
Slide 67
Slide 67 text
ࢀߟʹͨ͠ͷ • ʮϞϊϦε͔ΒϚΠΫϩαʔϏεʯSam Newman ஶ, ౡా ߒೋ ༁ • ͜ͷࢿྉΛ࡞Δࡍʹࢀরɻ͖ͬͯͨ͜ͱͷཧ͚આ໌ʹ༻͍ ͨɻ͜ͷຊͰΞϯνύλʔϯͱ͞Ε͍ͯΔ͜ͱɺTonamelͰ(ؾ ͔ͮͣʹ)ߦ͍ͬͯΔɻ
Slide 68
Slide 68 text
ิҨ ಠཱσϓϩΠՄೳੑ
Slide 69
Slide 69 text
ϚΠΫϩαʔϏεͰ͜Εͬͱ͍ͨ΄͏͕͍͍ ͧͬͯͭ • ʮϞϊϦε͔ΒϚΠΫϩαʔϏεʯͱ͍͏ຊʹॻ͔Ε͍ͯΔ ຊॻ͔ΒಘΒΕΔͷ͕͚ͭͩͩͱͨ͠Βɺ ͦΕʮϚΠΫϩαʔϏεʹಠཱσϓϩΠՄೳੑ ͷ֓೦Λ࣮֬ʹऔΓೖΕΑ͏ʯͱ͍͏͜ͱͩɻ
Slide 70
Slide 70 text
ಠཱσϓϩΠՄೳੑ 🤔
Slide 71
Slide 71 text
ಠཱσϓϩΠՄೳੑͱ • ʮ͋ΔϚΠΫϩαʔϏεʹର͢ΔมߋΛɺଞͷαʔϏεʹӨڹΛ༩͑ Δ͜ͱͳ͘ຊ൪ڥͰϓϩΠͰ͖Δͱݴ͏ߟ͑ํͩɻʯ • by ʮϞϊϦε͔ΒϚΠΫϩαʔϏεʯ • αʔϏεAΛมߋͨ͠ͱ͖ʹɺҰॹʹαʔϏεBมߋ͠ͳ͍ͱ͍͚ ͳ͍ʂͱ͍͏ͷಠཱ͍ͯ͠ͳ͍ • => ϚΠΫϩαʔϏεͰͳ͘”ࢄϞϊϦε”ͱ͍͏͜ͱʹ
Slide 72
Slide 72 text
ಠཱσϓϩΠՄೳੑͷద༻ • TonamelͰͦ͜·ͰશͳಠཱੑΛ୲อͰ͖͍ͯͳ͍ • τʔφϝϯτදαʔϏεPerlϞϊϦεͷαΠυΧʔલఏͷ࡞Γ • εϙϯαʔαʔϏεͱܾࡁαʔϏε΄ͱΜͲͷ௨৴͕Eventܦ༝ • ඇಉظΠϕϯτରԠ͢Δϋϯυϥʔ͕࣮͞Εͯͳ͚Εແࢹ͢ Δ͚ͩͳͷͰಠཱσϓϩΠՄೳੑ͕͋Δ
Slide 73
Slide 73 text
ಠཱσϓϩΠՄೳੑΛୡ͢ΔͨΊͷઓུ • αʔϏεؒͷґଘؔΛDAG(༗ඇ८ճάϥϑ)Ͱఆٛ • αʔϏεؒAPIʹඇޓ͕ൃੜ͢Δ߹ • ґଘ͞ΕΔଆޙํޓੑΛߟྀ͢Δ • deprecatedͳkeyΛҠߦظؒαϙʔτ͢ΔͳͲ • ґଘ͢ΔଆޓੑΛߟྀͤͣ͏
Slide 74
Slide 74 text
αʔϏεؒґଘؔͷDAG
Slide 75
Slide 75 text
“جຊతʹ” ಉ࣌ʹߋ৽͕ඞཁͰ͋ͬͯ ґଘ͞ΕΔଆ͔ΒσϓϩΠ͢ΕOK σϓϩΠ͚Ε͍͍͚ΕͲݕূͳͲͷؔͰػೳ୯ҐͰσϓϩΠ͕ͪ͠
Slide 76
Slide 76 text
TonamelͷσϓϩΠϑϩʔ • લఏ: αʔόɾϑϩϯτΤϯυɾΠϯϑϥͯ͢ҰͭͷϨϙδτϦ (monorepo)Ͱཧ͍ͯ͠Δ • ϦϙδτϦ͕ࢄͯ͠ͳ͍ͷͰɺmasterϒϥϯνͰϩʔΧϧڥΛ ཱͯͨΒͦͷ··ຊ൪ՔಇͷαʔϏεͱΠίʔϧͷͷ͕ಘΒΕΔ • ͦΕͧΕͷαʔϏεಠཱͨ͠ECSαʔϏεσϓϩΠ͞ΕΔ • σϓϩΠπʔϧkayac/ecspresso
Slide 77
Slide 77 text
monorepoͳͷͰ શ෦ͷαʔϏεΛͲʔΜͱΔͧʂ
Slide 78
Slide 78 text
ຖճશ෦ͷαʔϏεΛ σϓϩΠ͍ͯ͠Δͱ͍ʂ
Slide 79
Slide 79 text
ࢄϞϊϦεσϓϩΠ͕͘ͳΔ • σϓϩΠ͢Δͱ͖ʹͯ͢ͷαʔϏεΛ͋Δॱ൪ʹԊͬͯσϓϩΠ͠ ͳ͍ͱ͍͚ͳ͍ͱͳΔͱɺσϓϩΠʹඇৗʹ͕͔͔࣌ؒΔ • ϩʔϦϯάσϓϩΠͷ߹ Blue/Greenͷ߹ૣ͍͔ • σϓϩΠ͕͘ͳΔͱϩʔϧόοΫ͘ͳΔ͜ͱ͕ଟ͍͠ɺԿΑΓ ػೳͷσϦόϦʔʹ͕͔͔࣌ؒΓɺϦϦʔεϏοάόϯ͡Όͳ͍ͱ ͍ͬͨͳ͍Έ͍ͨʹͳͬͯྑ͘ͳ͍
Slide 80
Slide 80 text
େମͰಠཱσϓϩΠՄೳͳͷͰ ߋ৽͞ΕͨαʔϏε͚ͩͰϓϩΠͯ͠ ͋ͱσϓϩΠεΩοϓ͢Ε͍͍ͷ Ͱʁ
Slide 81
Slide 81 text
σϓϩΠεΩοϓઓུ • ECSʹ͏ίϯςφΠϝʔδͷߋ৽ΛɺʮαʔϏε͕ґଘ͢Δ repositoryͷಛఆͷσΟϨΫτϦ͕ߋ৽͞Ε͍ͯͨΒʯʹ͢Δ • ٖࣅతʹpolyrepoతͳcommit hashΛಘͯλάʹ͏ • ຊ൪ڥͱσϓϩΠ༧ఆͷcommit hashؒͰECS Task Definitionͷࠩ ͕͋ΕσϓϩΠ͢Δ • ecspresso diff ΛͬͯdiffΛ֬ೝ
Slide 82
Slide 82 text
σϓϩΠͷ༷ࢠ