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

This is My Architectureの発表感想とサーバレスアーキテクチャ

shunp
February 12, 2019
230

This is My Architectureの発表感想とサーバレスアーキテクチャ

re:Invent2018の金融reCapとして発表したスライド資料です。
日本金融業界からは初となる「This is My Architecture」に出演しましたが、そこで発表した仮想通貨ウォレットシステムのサーバレスに関する内容と、ブロックチェーン/サーバレスの新サービスに関する考察をまとめています。

shunp

February 12, 2019
Tweet

Transcript

  1. ΩϟϐλϧϚʔέοτ ιϦϡʔγϣϯ ΤΫΠςΟ ιϦϡʔγϣϯ ࠴݊ ιϦϡʔγϣϯ FX ιϦϡʔγϣϯ ࢿ࢈ӡ༻ ιϦϡʔγϣϯ

    Ծ૝௨՟ ιϦϡʔγϣϯ ओʹۚ༥ػؔΛର৅ͱͨ͠แׅతͳιϦϡʔγϣϯͷఏڙ
  2. औҾγεςϜ ΢ΥϨοτγεςϜ ϒϩοΫνΣʔϯʹ઀ଓͨ͠Ծ૝௨՟Λอ؅͢ΔγεςϜ This is My Architectureʹબఆʂ Ծ૝௨՟ιϦϡʔγϣϯ DMM BitcoinͳͲ

    ෳ਺ͷԾ૝௨՟γεςϜΛ։ൃ νϟʔτ/ೖग़ݿը໘/໿ఆॲཧͳͲ ߴ଎ͳτϥϯβΫγϣϯॲཧ͕ٻΊΒΕΔ
  3. ɹ Blockchain EC2 Lambda API Gateway Lambda Dynamo DB Docker

    EBS Lambda EC2 Lambda Lambda Dynamo DB Docker Lambda SNS API Gateway SNS EBS CompanyA CompanyB Bitcoin Ethereum (same as above) RDS RDS Cloud HSM Cloud HSM
  4. ɹ Blockchain EC2 Lambda API Gateway Lambda Dynamo DB Docker

    EBS Lambda EC2 Lambda Lambda Dynamo DB Docker Lambda SNS API Gateway SNS EBS CompanyA CompanyB Bitcoin Ethereum (same as above) RDS RDS Cloud HSM Cloud HSM Withdraw Request Withdraw Logic Send to Blockchain Network
  5. ɹ Blockchain EC2 Lambda API Gateway Lambda Dynamo DB Docker

    EBS Lambda EC2 Lambda Lambda Dynamo DB Docker Lambda SNS API Gateway SNS EBS CompanyA CompanyB Bitcoin Ethereum (same as above) RDS RDS Cloud HSM Cloud HSM Notify BlockData Notify Each Company Service
  6. ɹ Blockchain EC2 Lambda API Gateway Lambda Dynamo DB Docker

    EBS Lambda EC2 Lambda Lambda Dynamo DB Docker Lambda SNS API Gateway SNS EBS CompanyA CompanyB Bitcoin Ethereum (same as above) RDS RDS Cloud HSM Cloud HSM Taking regular snapshot
  7. ɹ Blockchain EC2 Lambda API Gateway Lambda Dynamo DB Docker

    EBS Lambda EC2 Lambda Lambda Dynamo DB Docker Lambda SNS API Gateway SNS EBS CompanyA CompanyB Bitcoin Ethereum (same as above) RDS RDS Cloud HSM Cloud HSM Separate VPC Exposed through a PrivateLink
  8. ECS EC2 EthereumωοτϫʔΫಠࣗߏங EC2 Geth Geth Managed Blockchain Managed Blockchain(Ethereum)

    Docker Image Build Local ECR Push Dockerfile (Geth) Docker Hub ALB HTTP Request EBS ͜Ε͚ͩ..? Ethereum͸৘ใ͕গͳ͍ ࠓޙͷެ։৘ใʹظ଴
  9. Blockchain Node QLDB QLDB Node Node Node Node Data Data

    Data ෼ࢄͯ͠σʔλ؅ཧΛߦ͏ Good: ߋ৽΍࡟আ͕Ͱ͖ͳ͍ Bad : ॲཧ͕஗͍/೉қ౓ߴ͍ தԝूݖͰσʔλ؅ཧΛߦ͏ ɾߋ৽΍࡟আ͕Ͱ͖ͳ͍ ɾSQLϥΠΫʹΫΤϦൃߦՄೳ ɾαʔόϨε ސ٬͕ຊ౰ʹٻΊ͍ͯͨ΋ͷ͸ͪ͜Βʁ ࣮༻Խ͞ΕͨϢʔεέʔε͸·ͩগͳ͍
  10. ࠓճͷΞοϓσʔτޙ DynamoDB Table A Item1 Item2 ैདྷͷ੍໿ ɾItem಺͸ΞτϛοΫ ɾItemΛ·͙ͨͱΞτϛοΫʹͰ͖ͳ͍ DynamoDB

    Table A Item3 DynamoDB Table A Item1 Item2 Item3 ɾItemΛ·͍ͨͰ΋ΞτϛοΫՄ ɾͨͩ͠ɺ10ݸͷItemͱ࠷େ4MB·Ͱͱ͍͏੍໿ DynamoDB Table A ɹτϥϯβΫγϣϯॲཧ 0 25 50 75 100 4݄ 5݄ 6݄ 7݄ ༧૝ΩϟύγςΟ ݁ՌΩϟύγςΟ ਖ਼֬ʹΩϟύγςΟͷ༧૝͕Ͱ͖ͳ͍ˍΊΜͲ͍͘͞ ैྔ՝ۚํࣜΛࢦఆՄೳʹʂ
  11. Lambda Lambda Lambda Lambda Lambda DynamoDB DynamoDB ֤Lambdaʹڞ௨ॲཧΛॻ͘ඞཁ͕͋ͬͨ Ex) ྫ֎ϋϯυϥ,DBϥούʔ

    ϝϯςφϯε࣌ʹશͯͷLambdaΛमਖ਼͢Δඞཁ͕͋Δ ڞ௨ॲཧͷ෦඼Խ͕Մೳ Lambda Lambda Lambda Lambda ʲQiitaʳRustͰαʔόϨε΍Γ͍ͨਓ͕Ұ൪࠷ॳʹݟΔ৔ॴ https://qiita.com/shunp/items/8b11450155266d2fcfc1 ※ϨΠϠ࡞੒ͰCustom Runtime͸બ୒Ͱ͖ͳ͍ͷͰ஫ҙ Lambda Layers ࢖༻Մೳͳݴޠ Go/Java/Python/Node.js… Custome Runtime ࣮࣭ݴޠͷ੍໿͕ͳ͘ͳΔ
  12. CodePipeline Amplify Console ैདྷͷύΠϓϥΠϯ Amplify Console CodeCommit Vue.js CodeBuild CodeCommit

    CloudFront Route53 S3 GitHub Jenkins CircleCI Build Deploy Vue.js Vue.js GitHub CDN 1. CodeCommit Λར༻͢Δ৔߹ 2. GitHub Λར༻͢Δ৔߹ CodeCommitͱGitHubͰϑϩʔʹมԽͳ͠ HTTPS HTTPS ɾCodeCommit/GitHub/GitLab/BitBucketʹରԠ ɾCodeBuild΍S3ɺCloudFrontͷઃఆ͕ෆཁ ɾιʔείʔυͷมߋ͕Ϛʔδ͞ΕΔͱύΠϓϥΠϯ͕૸Δ ʲQiitaʳVue.jsʴAmplifyΛۦ࢖͢Ε͹ϞμϯͳWebΞϓϦΛ20෼Ͱެ։Ͱ͖Δ https://qiita.com/shunp/items/d491adfadd570f66f990 Route53
  13. “Simplex Tech Blog” ͸͡Ί·ͨ͠! https://blog.simplex.ne.jp 2/23(౔) JAWS DAYS 2019 10:10

    ~ αʔόϨεͰಈ͔͢τʔΫϯൃߦϓϥοτϑΥʔϜ https://jawsdays2019.jaws-ug.jp/session/1564/ Ҿ͖ଓ͖৘ใൃ৴ ଓ͚͍͖ͯ·͢ʂ