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

サーバーレスについて語るときに僕の語ること / What I Talk About When I Talk About Serverless and its Potential

Tori Hara
November 03, 2017

サーバーレスについて語るときに僕の語ること / What I Talk About When I Talk About Serverless and its Potential

サーバーレスについて最近思っていることをポエムしました. サーバーレス過激派です.

Presented at Serverlessconf Tokyo 2017.

Tori Hara

November 03, 2017
Tweet

More Decks by Tori Hara

Other Decks in Technology

Transcript

  1. SUPINF Inc. // twitter.com/toricls ❤ Serverless, Container ▶︎ - ▶︎

    AWS Certified SA / DevOps Engineer Professional Yasuhiro HARA @toricls
  2. SUPINF Inc. // twitter.com/toricls 最近のサーバーレス活動 pingbot github-codebuild-integration cobolambda - 外形監視

    & 通知ツール - - GitHub Push/PR を契機に AWS CodeBuild でいい感じに CI できるようにするツール - - COBOL が AWS Lambda 上で動く夢のツール -
  3. SUPINF Inc. // twitter.com/toricls rate(1 minute) invoke http/https invoke stream

    github.com/toricls/pingbot SPA Bot - 外形監視 & 通知ツール -
  4. SUPINF Inc. // twitter.com/toricls ▶︎ 2016年7月実装、9月公開 ▶︎ サーバーレス・アーキテクチャーの POC ▶︎

    S3 バケットへの SPA デプロイは Bash ▶︎ それ以外のリソースは全部 CloudFormation github.com/toricls/pingbot - 外形監視 & 通知ツール -
  5. SUPINF Inc. // twitter.com/toricls ▶︎ AWS CodeBuild は並列数じゃなくて実行時間課金 :) ▶︎

    CI 結果でプルリクのマージ可否を制御したい ▶︎ AWS SAM & CloudFormation でデプロイ ▶︎ GitHub Webhook も CloudFormation で管理・設定 github.com/toricls/github-codebuild-integration - GitHub Push/PR を契機に AWS CodeBuild でいい感じに CI できるようにするツール -
  6. SUPINF Inc. // twitter.com/toricls SaaS や Lambda を フル活用して サーバー管理から

    解放されましょう! B ͞Μ (Ծ໊) 昨今の「サーバーレス」に思うこと 間違っていないと思う
  7. SUPINF Inc. // twitter.com/toricls 昨今の「サーバーレス」に思うこと SaaS や Lambda を フル活用して

    サーバー管理から 解放されましょう! B ͞Μ (Ծ໊) 管理しなきゃいけないサーバーは確かにない
  8. SUPINF Inc. // twitter.com/toricls 昨今の「サーバーレス」に思うこと SaaS や Lambda を フル活用して

    サーバー管理から 解放されましょう! B ͞Μ (Ծ໊) サーバー管理から解放されるの、とても良い
  9. SUPINF Inc. // twitter.com/toricls 昨今の「サーバーレス」に思うこと SaaS や Lambda を フル活用して

    サーバー管理から 解放されましょう! B ͞Μ (Ծ໊) セキュリティ・パッチとか当てなくていいの、 最高よね
  10. SUPINF Inc. // twitter.com/toricls e.g. いつもの Express アプリケーションを API Gateway

    と Lambda に載せて Yeah もしも「サーバー管理からの解放」がサーバーレスの主題なら
  11. SUPINF Inc. // twitter.com/toricls e.g. Express アプリを API Gateway +

    Lambda + RDS する Lambda API Gateway RDS ❄ ίʔϧυɾελʔτ͕͊͊͊͊
  12. SUPINF Inc. // twitter.com/toricls e.g. Express アプリを API Gateway +

    Lambda + RDS する Lambda API Gateway RDS rate(1 minute)
  13. SUPINF Inc. // twitter.com/toricls e.g. Express アプリを API Gateway +

    Lambda + RDS する API Gateway RDS ίωΫγϣϯ਺͕͊͊͊͊͊
  14. SUPINF Inc. // twitter.com/toricls e.g. Express アプリを API Gateway +

    Lambda + RDS する 謎のコネクション・プーリング ミドルウェア
  15. SUPINF Inc. // twitter.com/toricls e.g. Express アプリを API Gateway +

    Lambda + RDS する 積み重なるワークアラウンド 犠牲になる機能性
  16. SUPINF Inc. // twitter.com/toricls May 26 2016, Serverlessconf NYC -

    https://twitter.com/serverlessconf/status/735839492431548418
  17. SUPINF Inc. // twitter.com/toricls ▶︎ Function are the unit of

    deployment and scaling. ▶︎ No machines, VMs, or containers visible in the programming model. ▶︎ Permanent storage lives elsewhere. ▶︎ Scales per request; Users cannot over- or under-provision capacity. ▶︎ Never pay for idle (no cold servers/containers or their costs). ▶︎ Implicitly fault-tolerant because functions can run anywhere. ▶︎ BYOC - Bring Your Own Code. ▶︎ Metrics and logging are a universal right. Apr 19 2016, AWS Chicago Summit - https://www.slideshare.net/AmazonWebServices/getting-started-with-aws-lambda-and-the-serverless-cloud/29 The Serverless Manifesto
  18. SUPINF Inc. // twitter.com/toricls Event Driven ではないシステムの例 受注管理サービス 配送予約サービス 在庫管理サービス

    注文 Data Data 売上集計サービス Data こっちのコードに手を 入れなきゃいけない 感じになる New!
  19. SUPINF Inc. // twitter.com/toricls 受注管理サービス 配送予約サービス 在庫管理サービス 注文 subscribe subscribe

    publish event 売上集計サービス subscribe Event Driven なシステムの例 New!
  20. SUPINF Inc. // twitter.com/toricls 受注管理サービス 配送予約サービス 在庫管理サービス 注文 subscribe subscribe

    publish event 売上集計サービス subscribe Event Driven なシステムの例 既存のコードに 手を入れなくても サービスを増やせる (理論上は) New!
  21. SUPINF Inc. // twitter.com/toricls 受注管理サービス publish event 配送予約サービス 在庫管理サービス subscribe

    subscribe 売上集計サービス subscribe Event Sourcing という考え方 DB 注文イベント
  22. SUPINF Inc. // twitter.com/toricls 受注管理サービス publish event 配送予約サービス 在庫管理サービス subscribe

    subscribe 売上集計サービス subscribe Event Sourcing という考え方 DB 注文イベント Event Sourcing Event Store
  23. SUPINF Inc. // twitter.com/toricls 受注管理サービス publish event 配送予約サービス 在庫管理サービス subscribe

    subscribe 売上集計サービス subscribe Event Sourcing という考え方 DB 注文イベント Event Sourcing Event Store 全イベントの再生によるデータ復元
  24. SUPINF Inc. // twitter.com/toricls Event Driven なシステムの実現のためにもっと思考が必要なところの例 ▶︎ 「イベント・ディスカバリ」どうする? (like

    サービス・ディスカバリ) ▶︎ 在庫管理システムにイベントが流れた時点で在庫がなかったら? ▶︎ 在庫不足イベントが発火してそれに Subscribe してる受注管理サービス が注文キャンセルしてそのイベントを Publish してキャンセルイベントに Subscribe している XX システムが jふぃ̌̎jふぃあjwrじょ̎̏ckまm
  25. SUPINF Inc. // twitter.com/toricls 受注管理サービス publish event 配送予約サービス 在庫管理サービス subscribe

    subscribe 売上集計サービス subscribe Event Driven なシステムの実現のためにもっと思考が必要なところの例 DB 注文イベント Event Sourcing Event Store こいつらは何者なのか
  26. SUPINF Inc. // twitter.com/toricls それぞれが模索していく中で面白いものが少しずつ出始めている ▶︎ Durable Functions ▶︎ Azure

    Cloud Functions のエクステンションという位置付け ▶︎ 関数内のステートの復元をイベントストアからのリプレイという手段で実現している ▶︎ https://azure.github.io/azure-functions-durable-extension/ ▶︎ Event Gateway ▶︎ Serverless 社による「イベント・ドリブン」への解をプロダクトにする試み ▶︎ Function の呼び出し契機をユニバーサルなイベントとして表現しようとしている ▶︎ https://github.com/serverless/event-gateway