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

Go と Wantedly の関係 / How Wantedly uses Go

Shimpei Otsubo
October 10, 2020
710

Go と Wantedly の関係 / How Wantedly uses Go

Shimpei Otsubo

October 10, 2020
Tweet

Transcript

  1. ©2020 Wantedly, Inc.
    Go ͱ Wantedly ͷؔ܎
    Go ʹ·ͭΘΔΑ͋͘Δ࣭໰ͱճ౴
    Go Conference’20 in Autumn SENDAI
    Oct 10, 2020 - Shimpei Otsubo

    View full-size slide

  2. ©2020 Wantedly, Inc.
    Go ͸ Wantedly ͰϚδϣϦςΟͰ͔͢ʁ

    View full-size slide

  3. ©2020 Wantedly, Inc.
    Go ͸ Wantedly ͰϚδϣϦςΟͰ͔͢ʁ
    ࣮͸ͦ͏Ͱ΋ͳ͍
    Ruby, Python, Go ͕΄΅ಉ਺
    ͨͩ͠ߦ਺ͱͯ͠͸ଟ෼ΑΓগͳׂ͍߹
    ຊ൪Ͱఏڙ͞Ε͍ͯΔओཁαʔϏε
    ͜ͷଞ nginx ΍ es ͳͲͷγϯϓϧͳίϯϙʔωϯτ͕͋ͬͨΓͯ͜͠ͷഒఔ౓͋Δ
    Wantedly Go ٕज़എܠ ݕࡧ

    View full-size slide

  4. ©2020 Wantedly, Inc.
    ͢΂ͯΛ Go Ͱஔ͖׵͍͑ͯ͘ʁ

    View full-size slide

  5. ©2020 Wantedly, Inc.
    ͢΂ͯΛ Go Ͱஔ͖׵͍͑ͯ͘ʁ
    ͦΜͳ͜ͱ͸ͳ͍
    ʮͪΐͬͱػೳ΋௥Ճͯ͠ΈΑ͏ʯΛ go Ͱ΍Δͷ͸গ͠େม
    ෆ֬ఆཁૉ͕͋Δ࣮૷͸ Rails ͕࠷଎
    దࡐదॴ
    ࢓༷͕มΘΓʹ͘͘յͯ͠͸͍͚ͳ͍ͱ͜Ζ͸Go͕͍͍
    ύϑΥʔϚϯεΛٻΊͯ Go ͷϚΠΫϩαʔϏεʹ੾Γग़͢͜ͱ΋
    Wantedly Ͱ͢΂ͯΛ Go Ͱ΍Δੈք͸ࠓͷॴ૝ఆ͍ͯ͠ͳ͍
    ᐆດͳ੹຿ΛҰڍʹҾ͖ड͚Δͷ͸ Rails ָ͕
    ActiveRecord ͱ rails c ͷੜ࢈ੑ͸།Ұແೋ
    Wantedly Go ٕज़എܠ ݕࡧ

    View full-size slide

  6. ©2020 Wantedly, Inc.
    ͡Ό͋Ͳ͜Ͱ Go ࢖ͬͯΔͷʁ

    View full-size slide

  7. ©2020 Wantedly, Inc.
    ͡Ό͋Ͳ͜Ͱ Go ࢖ͬͯΔͷʁ
    ύϑΥʔϚϯε༏ઌ
    ΠϯϑϥϨΠϠ
    ج൫ܥ
    CLIπʔϧ
    api-gateway ݕࡧਪનαʔόʔ
    υϝΠϯͷந৅Խ͕׬ྃ͢Δͱج൫ʹঢ֨͢Δ͜ͱ͕͋Δ
    ௨஌؅ཧ ༑ୡ؅ཧ ઃఆ؅ཧ ϝʔϧૹ৴ ը૾߹੒
    Ҏલ͸ ruby Ͱ΋ॻ͍͍͕ͯͨࠓ͸ go 1୒
    Kubernetes ͱͷ૬ੑ͸ go ͕࠷ڧ

    View full-size slide

  8. ©2020 Wantedly, Inc.
    Ͳ͏΍͍ͬͯΖΜͳݴޠͰ։ൃͯ͠Δʁ

    View full-size slide

  9. ©2020 Wantedly, Inc.
    Ͳ͏΍͍ͬͯΖΜͳݴޠͰ։ൃͯ͠Δʁ
    લఏ
    গͳ͘਺͑ͯΤϯδχΞͷ2ഒͷ਺ͷϚΠΫϩαʔϏε͕͋Δ
    1ਓͰෳ਺ݴޠΛ·͙ͨ͜ͱ΋೔ৗత
    ଟ͘਺͑Δͱ4ഒ
    ج൫ͰͳΜͱ͔͢Δ
    servicex
    ֤ݴޠͰڞ௨ͰೖΕ͍ͨػೳ܈ϥΠϒϥϦ
    ೖΕͨΒࣾ಺ن໿ΛউखʹकΕΔ
    apis
    protobuf Λதԝूݖతʹ؅ཧ
    εΩʔϚۦಈʹͰ͖ΔͷͰݴޠ·ָ͕ͨ͗

    View full-size slide

  10. ©2020 Wantedly, Inc.
    ࠓ೔஌ͬͯ΄͍͜͠ͱ
    Wantedly ͸ Go ʹશৼΓ͍ͯ͠ΔձࣾͰ͸ͳ͍
    Polyglot ͳγεςϜશମΛεέʔϧͤ͞ΔΤϯδχΞ WANTED
    ੜ࢈ੑͷRails ύϑΥʔϚϯεͷ Go
    ػցֶशͷ Python Frontend ͷ Node
    ٕज़͸खஈ
    Techbook ແྉެ։ ݕࡧ
    GopherୡͱޠΓ·ͤΜ͔ʁ ݕࡧ
    ʮGo Λ࢖͍͍͔ͨΒʯ Ͱ͸ͳ͘ʮGo ͷ௕ॴͰγεςϜΛྑ͍ͨ͘͠ʯ
    ଞͷݴޠͱڧௐ͢Δج൫Λ੔උͭͭ͠ඞཁͳͱ͜ΖʹͲΜͲΜೖΕ͍ͯ͘

    View full-size slide