nakajima jun
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    セキュア・バイ・デザイン 第13章 マイクロサービスでの指針 === ###### tags: `セキュア・バイ・デザイン読書会` # Discord開始位置 - # 自己紹介 - なかじま(J.Nakajima) - ファシリ役 - タイムキーパー役 - こばやし(t2_Kobayashi) - 読み上げ役 # 参加の仕方 - マイクはいつでもONにして、話に参加して結構です。 - テキストチャットでも、コメントやリアクションでどんどん参加してください!ラジオ担当が拾っていきます。 - 聞いているだけの方もOKです! # ディスカッションをより豊かにするためのグランドルール - 参加者は毎回任意 - 今回は不参加、次回は参加をするといった気軽な感じ - 途中参加も断然OK! まずは聞くだけでも大丈夫です! - フィードバックを恐れない - マサカリは怖いと思いますが、アウトプットからのフィードバックを受け、学びを深めていきましょう - アウトプット7割:インプット3割の気持ちで臨みましょう! - 経験の有る無しは気にしない - 自分はDDD非経験者だから……と気後れする必要はないです - 堂々と意見や疑問を語りましょう - ページ数と同時に、節のタイトルやキーワードを言って頂けるとスムーズです - 電子書籍で読んでいるとページ数ではわからないため - 話していない人が、率先してメモしましょう - このHackMDはみんなのものです。どんどん書いていきましょう:+1: :+1: - 気になる質問や同感するものには :+1: を末尾につけてください。 # タイムテーブル | 時間 | 所要時間 | 内容 |備考 | | -------- | -------- | -------- | -------- | | 19:50- | - | 集合開始 | | | 20:00-20:15 | 15分 | 当日の流れとグランドルールの共有 | | | 20:15-20:25 | 10分 | 感想記入&HackMDに書かれた皆さんの感想・気づき・疑問をもっと掘り下げたいものを、 :+1: 付けていく | | | 20:25-21:55 | 90分 | 本の節ごとにディスカッション(ここでも適宜、HackMDに気づきとか書いていってもらっていいです) | | |21:55-22:00 | 5分 | 次回開催日と読む範囲決めてクローズ | | ## 下に感想などを書いていって下さい。どんな些細なことでもOKです。 --- # 第13章 序章 ## 目安の時間 - xx分 ## 感想・気づき ## 疑問 --- # 13.1 マイクロサービスとは何か? ## 目安の時間 - 22分 ## 感想・気づき - > p.478 しかしながら、もし、サービスが提供する機能に変更が加えられたのであれば、その機能を呼び出している別のサービスもその新しくなった機能を堪能するために、その機能を呼び出していた部分を変更したとしても何も不思議なことはありません。一方、ここで避けたいのは、その変更の影響が1つのサービスから別のサービスへ、そして、そのサービスからさらに別のサービスへと広がっていくことです - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020665250367946752) - サービスAに新しい変更が入ったときに、その新しい機能を使いたくてサービスBを変更するのはOK。 - サービスAに変更が入ることで、勝手にサービスBの挙動が変わってしまうような依存関係になっていることがNGだという理解:+1: - > p.478 依存しているサービスが停止した際にどのように振る舞うのかを最初から考えて実装することです - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020663560361213963) - BFFから色んなサービスを呼び出してデータを纏めて返す実装をすることがあるが、そのときに一部のサービスが停止している時に一部データが欠損していてもフロントに返すことはやっていた。ただどのデータがどういう理由(サービスが止まったのかBad Requestだったのか、他の原因なのか)で取れなかったのかというロギングとかはしていなかったので、設計段階でもっと話せると良かったなと思っている:+1::+1: - p.477 分散モノリス - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020660052459257936) - サービス間の依存関係が強いとマイクロサービスのメリットを得られない。:+1::+1::+1:   ## 疑問 --- # 13.2 境界づけられたコンテキスト(bounded context)を表すサービス ## 目安の時間 - 22分 ## 感想・気づき - > P.479 本書が推奨する設計方法は、各サービスを境界づけられたコンテキストとして考えることです。:+1::+1: - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020666248889106472) - むしろ、「1つのマイクロサービスは境界づけられたコンテキストをまたいではいけない」と言うのは前提な気がしますが。 ## 疑問 --- # 13.3 異なるサービスを行き来する機密性の高いデータ ## 目安の時間 - 22分 ## 感想・気づき - p.488 データは機密性の高いモノと低いモノと分かれる:+1::+1: - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020668530401751112) - ただし、コンテキストによって、低いモノの機密性が高くなることがある - また、別のデータと組み合わさることで、機密性が高くなることがある ## 疑問 --- # 13.4 マイクロサービスにおけるログ ## 目安の時間 - 22分 ## 感想・気づき - ロギングサービス(Cloud logging)を使っているけど、何かエラーが出たってなったときに実際に可動しているコンテナやPodのログ見てしまうな…と思った - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020678221466976258) - うまくロギングサービスが扱えていない:+1::+1: - > p.497 「INFO」レベルであっても、機密性の高い情報が含まれることとなり、その結果、ログに対してアクセス制限を設けなければならなくなってしまいます。そうすると、機密性を担保するために不必要な複雑さを持ち込むことになってしまいます。 - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020673871491375124) - たしかに何も考えていないと、銀行のやり取り情報についてINFOレベルで書いてしまいそう。 - 普段エンジニアが使うログレベルと機密情報には関連が無いってことが本書の例からわかる:+1: - 開発側で使うログレベルっていうのは、システム的に今すぐ対処した方がいいもの、デバッグ的に情報に残したほうがいいもの、みたいな形で分類している気がする:+1: - 本質的に、ログの重要度とデータの機密度は直交したものなので、本書に書かれているように注意が必要 - 本書を見れば見るほどマイクロサービスって考えることが多すぎて辛そう・・というイメージしか出てこない - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020670837436710942) - モジュラモノリスに回帰傾向が出ている(気がする)のは必然なのかな:+1::+1::+1::+1: - モジュラモノリスの利点がわかっていないが、気をつけないと簡単にモジュール間の結合してしまいそう - ArchUnitとかレイヤ依存のテストをしておかないと不安になりそうだなと思った:+1::+1: - p.497 > そこで、本書が推奨する解決方法が、ログを見るための機能をシステムに独自に用意するというものです - ログの正規化を行なうような中間のサービスは要らないよねって言っていた上でこれだったので、最初「ん?」ってなった。 - 後のページを読んでいくとわかったが、ドメインに特化したlog-apiを作って、機密情報かどうかを判断しつつ、外部のロギングサービスへアクセスする責務を担うっていう考え方っぽい:+1: - P.498~ ログを出すための層をロギングフレームワークとの間に挟むという発想はなかった。これは上手く使うと便利そう:+1: - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020675349106917497) - log-apiを実装するのはとても良いと思っているが、最初のうちはコスト高そうって思ってやらなそうだなとも思った:+1: - [Discord](https://discord.com/channels/432531367427964929/911610565103845387/1020676863712034947) - ある意味セキュリティを軽視しているからとも言えるが - ログは運用性にも直結するのでそういう点でも重要なのだけど、軽視されがち >< ## 疑問 ---

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully