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

Scala と Microservices でつくる 証券会社とスタートアップ / FOLIO...

Scala と Microservices でつくる 証券会社とスタートアップ / FOLIO in JJUG CCC 2018 Fall

Takuya "Mura-Mi" Murakami

December 13, 2018
Tweet

More Decks by Takuya "Mura-Mi" Murakami

Other Decks in Programming

Transcript

  1.  +BWB+7.ؒ؝ءأذيך㸜䗰䠬 ˖ ($ 橆㞮⣛㶷ך㼰זׁ ٓ؎ـٓٔך⯍㹋 FUD ˖ ꆃ輐禸䞔㜠كٝت٦װꆃ輐暴剣ךفٗز؝ٕח㼎䘔׃׋4%,װٓ ؎ـٓٔך⯍㹋

     +BWB 4DBMB $MPKVSF ֮׋׶דך䪮遭鼅䫛 ˖ 䪮遭鼅㹀׾׃׋䔲儗כ؟٦غ٦؟؎س,PUMJOךظؐعؐ׮㼰זַ׏ ׋ 4DBMBָ鼅ל׸׋✲䞔
  2.  鸐䌢ךDMBTT㹀纏ח⸇ִ䎗אַך堣腉ָ鷄⸇ׁ׸׋ؙ ٓأկ⟃♴ך״ֲז暴䗙ָ֮׷կ ˖ UP4USJOH IBTI$PEF FRVBMTכ荈⹛ד㹋鄲ׁ׸׷ ˖ ؿ؍٦ٕسכ♶㢌 זךדծDBTFDMBTT荈⡤׮㛇劤涸ח♶㢌

     ˖ ػة٦ٝوحثؚٝ ➙㔐כ铡僇׃תׇ׿ דⵃ欽דֹ׷ ˖ ,PUMJOךEBUBDMBTT +BWBך-PNCPL،ظذ٦ءّ ٝⰋ鿇鯹ׇ♶㢌ؙٓأָ؎ً٦آ涸ח鵚ְַկ 4DBMB㛇燉濼陎DBTFDMBTT
  3. ˖ 鏾ⵙ噟⹡ءأذيך䬐ֲ眔㔲כהחַֻ䌴䎢ְկ  Ⰻג׾濼׷ֿהךꨇ僒䏝כ噰׭ג넝ְ  ؒٔ،׀הח噟⹡鏣鎘噟歲濼陎䚍腉銲⟝זוך䚍呓ָ麩ֲ ˖ 㢩鿇ءأذي٥؟٦ؽأח׮㣐ֹֻ⣛㶷ׅ׷  䋐屣ꂁ⥋ծꋒ遤䮶鴥ח״׷Ⰵꆃծ《䒷䨽䱸竲˘

     ז׷ץֻ毙穠さח׃׋ְկ ˖ ꥺ㹱ך䕦갟眔㔲ך僇然⻉הꣲ㹀  אךꥺ㹱דⰋגךֶ㹏圫ח鶳䞨׾ֶַֽ׃זְ  ♧㹀⟃♳ךꥺ㹱ָ饯ֹ׸לծ䕦갟곁㹏➂侧׾幐ִג遤佟堣ꟼח㜠 デ׾ׅ׷䗳銲ָ֮׷ ꆃ輐堣ꟼךءأذيח実׭׵׸׷䚍呓
  4. 䋐屣鸞㜠 䲿⣘⟰噟 8FC؟٦ؽأ չؿؓٔؔպ ٌغ؎ٕ،فٔ չؿؓٔؔպ ޱ࠲։ઃ ސ٬৘ใ ϚΠϖʔδ޲͚"1* ςʔϚ৘ใ؅ཧ

    ஫จड஫ ஫จ؅ཧࣥߦ ˞͔ͳΓ؆ུԽ͍ͯ͠·͢ ࢒ߴ؅ཧ ࢒ߴཤྺ؅ཧ Ⰵ⳿ꆃ؟٦ؽأ ⹞㹀禸ءأذي Ձ֨഑৴ ചങ৹ࠪ 䫎项䨌殛 ؕأةو٦؟ه٦ز ؝ٝفٓ؎،ٝأ 《䒷䨽ـٗ٦ؕ٦ ೖग़ۚ צఆ؅ཧ ꆃ輐堣ꟼ׾و؎ؙٗ؟٦ؽأה䯝ִ׷ 〡䏟Ꟛ鏣 㻢叨䬐䔲
  5. exception ResourceNotFound { 1: string message } typedef i64 UserId

    struct User { /** * ϢʔβID */ 1: required UserId id /** * Ϣʔβ໊ */ 2: required string name /** * ϢʔβͷϝʔϧΞυϨε */ 3: optional string email } service AccountService { /** * Ϣʔβݕࡧ */ User findUser ( 1: required UserId userId ) throws (1: ResourceNotFound resourceNotFound) } ˞࣮ࡍʹαʔϏεʹ࢖ΘΕ͍ͯΔίʔυͱ͸ҟͳΓ·͢
  6. $ thrift-cli # list available microservices thrift-cli$ ls - account

    - portfolio - financial-data - (and so on…) # choose microservice to use thrift-cli$ portfolio> use account # list available methods thrift-cli$ account> methods - findUser - findUserByExternalAuthenticationId - findExternalAuthentications - (and so on…) # run method thrift-cli$ account> run findUser 1