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

予約システムと
Zendesk のニアリアルタイム連携アーキテクチャ

Kei Kamikawa
February 13, 2023

予約システムと
Zendesk のニアリアルタイム連携アーキテクチャ

NOT A HOTEL #4 LT

Kei Kamikawa

February 13, 2023
Tweet

More Decks by Kei Kamikawa

Other Decks in Programming

Transcript

  1. ༧໿γεςϜͱ

    ;FOEFTLͷχΞϦΞϧλΠϜ
    ࿈ܞΞʔΩςΫνϟ
    /05")05&-5"-,

    View full-size slide

  2. 8)0".*
    +645461&326*$,

    View full-size slide

  3. !DPEFIFY !$PEF)FY
    w /05")05&-ͷίϯγΣϧδϡۀ຿
    ʹؔ࿈ͨ͠։ൃΛ΍͍ͬͯ·͢ʂ
    w ࠷ۙ͸;FOEFTLઃఆͱʹΒΊͬ͜

    View full-size slide

  4. ࣗ෼ͷνʔϜ͕΍ͬͯΔ͜ͱ

    View full-size slide

  5. ;FOEFTL
    w ;FOEFTL͸ΧελϚʔαϙʔτͷ4BB4Ͱ͢
    w ΧελϚʔαϙʔτνέοτΛ؅ཧͰ͖·͢
    w &ϝʔϧɺνϟοτɺίʔϧͳͲͷνϟωϧΛհ͠
    ͓ͯ٬༷ͱͷίϛϡχέʔγϣϯΛ؅ཧͰ͖·͢

    View full-size slide

  6. νέοτৄࡉ

    View full-size slide

  7. νέοτৄࡉ
    w ͓٬༷͔Βͷ͓໰͍߹Θͤ಺༰Λ֬ೝͰ͖·͢
    w ͓٬༷΁ͷฦ৴΋͔͜͜ΒͰ͖·͢ʢը໘ӈʣ
    w ͓٬༷ͷ৘ใΛ֬ೝͰ͖·͢

    ʢνέοτϑΟʔϧυɻը໘ࠨͷྻʣ

    View full-size slide

  8. νέοτҰཡʢϏϡʔʣ

    View full-size slide

  9. νέοτҰཡʢϏϡʔʣ
    w νέοτΛҰཡͰ͖·͢ɻ
    w νέοτϑΟʔϧυͷ৘ใΛجʹฒͼସ͑ɺϑΟϧ
    λϦϯά͕Ͱ͖·͢ɻ

    View full-size slide

  10. ͋Δ೔ڍ͕ͬͨ

    $4͔Βͷ͝ཁ๬

    View full-size slide

  11. ༧໿εςʔλεͰνέοτͷ
    ༏ઌ౓͚ͮΛ͍ͨ͠ʂ

    View full-size slide

  12. w ༧໿γεςϜͰදݱ͞ΕΔεςʔλεΛجʹɺ͓໰
    ͍߹Θͤͷ༏ઌ౓Λܾఆ͍ͨ͠
    w ଺ࡏதͷ͓٬༷Λ༏ઌͯ͠ରԠΛ͍ͨ͠
    w νέοτҰཡ΋Ͱ͖Δ͚ͩϦΞϧλΠϜͰฒͼସ
    ͍͑ͨ
    νέοτͷ༏ઌ౓͚ͮ

    View full-size slide

  13. ͜͏͍͏ײ͡ͰͰ͖·ͤΜ͔ͶʔʜCZ$4

    View full-size slide

  14. ͳΜͱ͔͠·͠ΐ͏ʂ

    View full-size slide

  15. χΞϦΞϧλΠϜ

    ࿈ܞγεςϜͷ։ൃ

    View full-size slide

  16. χΞϦΞϧλΠϜʜ

    View full-size slide

  17. $MPVE4QBOOFS$IBOHF4USFBNT

    View full-size slide

  18. w $MPVE4QBOOFSσʔλϕʔεͷૠೖɺมߋɺ࡟আ
    ͷ৘ใΛχΞϦΞϧλΠϜͰετϦʔϛϯάͰ͖Δ
    w มߋετϦʔϜ͸%BUB
    fl
    PX΍,BGLBΛհͯ͠
    #JH2VFSZ΍$MPVE1VC4VCͳͲͷσʔλγϯ
    Ϋ΁సૹͰ͖Δ
    w %BUB
    fl
    PXΛհͯ͠$MPVE1VC4VC΁సૹ͢Δ
    ͜ͱʹ͠·ͨ͠
    $MPVE4QBOOFS$IBOHF4USFBNT

    View full-size slide

  19. #PPLJOHTςʔϒϧͷ4UBUVTΧϥϜΛ؂ࢹ
    CREATE CHANGE STREAM
    BookingsTableStatusStream FOR
    Bookings(Status);

    View full-size slide

  20. %BUB
    fl
    PXͷઃఆ೉ͦ͠͏ʜ

    View full-size slide

  21. HJUIVCDPNNFSDBSJ%BUB
    fl
    PX5FNQMBUF

    View full-size slide

  22. w %BUB
    fl
    PXʹඞཁͳ+BWBͷίʔυΛॻ͔ͣʹઃఆ
    ϑΝΠϧͷΈΛهड़͢Δ͜ͱͰɺύΠϓϥΠϯͷߏ
    ங͕Մೳ
    w ઃఆ͸+40/ϑΝΠϧʹͳ͍ͬͯΔ
    w *O0VUΛࢦఆ͢Δඞཁ͕͋Δɻ*O͸4QBOOFS
    $IBOHF4USFBNTͰ0VUΛ1VC4VCʹͨ͠
    w *O4PVSDFT 0VU4JOLT
    %BUB
    fl
    PX5FNQMBUF

    View full-size slide

  23. %BUB
    fl
    PX5FNQMBUFͷઃఆ

    View full-size slide

  24. 1VC4VCͷϖΠϩʔυʢҰ෦ʣ
    {


    // ...,


    "mods": [


    {


    "keysJson": "{\"ID\":\"dcc5423e-09ab-4ff1-8e0d-c0fb299215e0\"}",


    "oldValuesJson": "{\"Status\":\"Tentative\"}",


    "newValuesJson": "{\"Status\":\"Booked\"}"


    }


    ],


    "modType": "UPDATE",


    "valueCaptureType": "OLD_AND_NEW_VALUES",


    // ...


    }


    View full-size slide

  25. ϖΠϩʔυΛجʹ;FOEFTL
    ͷνέοτΛߋ৽͢Δ

    View full-size slide

  26. 1VC4VCˠ'VODUJPOT

    View full-size slide

  27. w αʔόʔ΍ίϯςφʹΑΔ؅ཧͳ͠ͰΫϥ΢υ্Ͱ
    ίʔυΛ࣮ߦͰ͖Δ
    w $MPVE1VC4VCͷΠϕϯτΛτϦΨʔͱ࣮ͯ͠ߦ
    ͕Մೳ
    w ϦΫΤετͷத਎͸$MPVE1VC4VCͷϖΠϩʔ
    υʹͳΔ
    $MPVE'VODUJPOT

    View full-size slide

  28. w *%Λجʹ;FOEFTLνέοτΛݕࡧ
    w ݟ͔ͭͬͨνέοτʹ͋Δɺ༧໿εςʔλεͷν
    έοτϑΟʔϧυΛߋ৽͢Δ
    w ظ଴͢Δߋ৽ݩͷεςʔλε͕ҟͳΕ͹ແࢹ͢Δ
    w νέοτϑΟʔϧυʹ஋͕ଘࡏ͠ͳ͚Ε͹৽نͰ༧
    ໿εςʔλεΛ௥Ճ͢Δ
    ϩδοΫ

    View full-size slide

  29. ࠷ऴతͳΞʔΩςΫνϟ

    View full-size slide

  30. ͝ཁ๬͸ղܾͰ͖ͨΜͰ͔͢ʁ

    View full-size slide

  31. خ͍͠੠͕͍ͬͺ͍ʂ

    View full-size slide

  32. ҰॹʹࣗಈԽ͍ͯ͘͠

    ஥ؒΛืू͍ͯ͠·͢ʂ

    View full-size slide