HackMD
  • New!
    New!  Markdown linter lands.
    Write with consistency! Enable markdown linter that hints better markdown styling you can take. Click the lightbulb on the editor status bar 💡
    Got it
      • Create new note
      • Create a note from template
    • New!  Markdown linter lands.
      New!  Markdown linter lands.
      Write with consistency! Enable markdown linter that hints better markdown styling you can take. Click the lightbulb on the editor status bar 💡
      Got it
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
      • ODF (Beta)
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Gist
    Import
    Dropbox Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML ODF (Beta)
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    Write
    Owners
    • Owners
    • Signed-in users
    • Everyone
    Owners Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Fundamentals of Software Architecture Chap.17-18 - イベントページ - [READING.15 #技術書を英語で読む会](https://reading.connpass.com/event/197478/) - 課題図書 - [Fundamentals of Software Architecture: An Engineering Approach](https://learning.oreilly.com/library/view/fundamentals-of-software/9781492043447/) - 貼っている画像の引用先 - [Updated Fundamentals of Software Architecture Images](http://fundamentalsofsoftwarearchitecture.com/images.html) - これまでのイベントで扱ったHackMDのリンク集 - [技術書を英語で読む会の雑談メモリンク集](https://hackmd.io/@gkzz/H1fdY9jOP) ### written by @gkzz - Chap.17 - Microserviceはいろんなアーキテクチャの考えの影響を受けている - > One concept in particular from **`DDD, bounded context`**, decidedly inspired microservices. The concept of bounded context represents **`a decoupling style`**. - cf. [どうやってBounded Contextを見つけるか](https://qiita.com/suin/items/49545ba8ca041a41b5d3) - > 組織といったコミュニケーション構造に従ってSub Domainを模索することはBounded Contextを設計するための近道 - to include all necessary parts to operate independently - e.g. databases - **`monolithic v.s. microservice`** - |monolithic |microservice | |-----------------|----------------------------------------------------------| | |bounded context(context内ではリソースは共有するけど外ではしない) | |coupling |decoupling | |reusable |non-reusable | | > **`some resource becomes constrained on the shared infrastructure`**?? | | |reusable |non-reusable | | |distributed | | |> Each service is meant to represent a domain or subdomain| - > with cloud resources and container technology, teams can reap the benefits of extreme decoupling, both at the domain and operational level. - cf. おなじみの ?[29. 技術選定の審美眼(2) w/ twada](https://fukabori.fm/episode/29) - > Dockerの登場と、コンテナ技術, 冪等性の難しさ, 巨大化したモノリスによる問題から、マイクロサービスへ - 集中と分散の螺旋 - 一見、コンピューティングリソースは集中と分散を振り子のように行き来しているように見える - 実は取り囲む技術背景によって、今の分散(4)と以前の分散(2)とでは差分がある - | 集中 | 分散 | |-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------| |1) |2) EJB, Service-oriented Architecture, RPCベース, 設定多い, XML職人 | |3) Rails, 規約を守れば設定なくてよい, コーディングゼロ, 生産性高い, 開発は質よりスピード優先 |4) REST, XMLからJSON, スケールアウト, YAML職人, クラウドコンピューティング | - `Entity trap` - [Fundamentals of Software Architecture Chap.6-8](https://hackmd.io/g-mADNkbSDybO6zlDtlJ1Q)より - > - エンティティの罠 - > アーキテクチャの分割をORM的なエンティティ分割と混同すること - synchronous or asynchronous communication - synchronous communication - **`protocol aware heterogeneous interoperability`** - asynchronous communication - messages - **`compensating transaction framework`** はユースケース、懸念事項を調べる - [マイクロサービスにおける決済トランザクション管理](https://engineering.mercari.com/blog/entry/2019-06-07-155849/#%E8%A3%9C%E5%84%9F%E3%83%88%E3%83%A9%E3%83%B3%E3%82%B6%E3%82%AF%E3%82%B7%E3%83%A7%E3%83%B3) - 疑問点 - マイクロサービスのひとつひとつのサービスはモノリシック? - ”モノリシック”というよりマイクロサービス(複数形)のコンポーネント - 他関連資料 - [【ZOZOTOWNマイクロサービス化】API Gatewayを自社開発したノウハウ大公開!](https://techblog.zozo.com/entry/zozotown-api-gateway-intro) > ストラングラーパターンは、レガシシステムを徐々に新しいシステムに置き換えて移行する方法です。今回ご紹介するAPI Gatewayがストラングラーファサードの役割を担っています。 - [Monolith to Microservices](https://learning.oreilly.com/library/view/monolith-to-microservices/9781492047834/) - [Fallacies of distributed computing](https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing) - > The network is reliable - [マイクロサービスアーキテクチャとそれを支える技術](https://knowledge.sakura.ad.jp/20167/) - [Fundamentals of Software Architecture Chap.12-13](https://hackmd.io/YG5hsfnWT7ao2Cok8OCVSQ?view) - [モノリシックからマイクロサービスへ。あるいは、サービスベースアーキテクチャを考える。](https://tech.askul.co.jp/entry/2019/04/09/132952) - [One Team At Uber Is Moving From Microservices To Macroservices](http://highscalability.com/blog/2020/4/8/one-team-at-uber-is-moving-from-microservices-to-macroservic.html) - Chap.18 - アーキテクチャをデザインする上での考慮点 - > Monolith versus distributed - > Where should data live? - > What communication styles between services—synchronous or asynchronous? - [Shopifyはいかにしてモジュラモノリスへ移行したか](https://www.infoq.com/jp/news/2019/10/shopify-modular-monolith/) - > Westeinde氏は、モノリシックアーキテクチャはプロジェクトの出発点として適当だという考えから、"新しいプロダクトや新たな企業はモノリスから始めることを、実際に推奨していました"、と述べている。 Shopifyはいかにしてモジュラモノリスへ移行したか https://www.infoq.com/jp/news/2019/10/shopify-modular-monolith/ ### written by y-wat - Chap.17 Microservices Architecture - History 言い出したのFowlerなのか。理解。境界づけられたコンテクストがサービス境界になる。DDDの実装パターンくらいに見たほうが良いかもしれん。 - Topology APIレイヤの裏に各サービスが独立して存在する。 - Distributed コンテナにしたからといってリソースが綺麗に分散配置されるかというと、そうでも無いような。その場合はクラスタ等の指定デプロイ先を分けてるはずで、あまりVM分離とも変わらんような。 単一プロセス内のメソッドコールで完結させるのか、複数プロセス間のプロシージャコールにするのかで分かれるような。 トランザクション境界をどうするかはシステム粒度の決定に重要である。 - Bounded Context ドメインが個々のサービスを構成する。サービスは自己完結的な実装になる。 - Granularity サービス境界はドメインないしワークフローを捉える。目的、トランザクション、コレオグラフィから適切な境界を発見する。 - Data Isolation 共有スキーマやデータベースを結節点とすることは避ける。ORM的にDBでのモデルとアプリのデータ構造を一致させることとも違う。データの分離は頭痛でもあり機会でも有る。 - API Layer mediatorやorchestrationとして利用してはならない。処理は境界づけられたコンテキストの中に閉じ込めること。 - Operational Reuse サイドカーの実装を自力でやったことがないのでイメージがつかない。kube以外でもサイドカーの発想はあるのか? kube半年以上さわってないので記憶が・・・ [Kubernetesで学ぶ分散システムデザインパターン](https://qiita.com/reireias/items/85bcd0acc7f6982041c4) サービスメッシュまで行かないとマイクロサービスは完成しない感 - Frontends そういえばこの本ってフロントの話出てこないよな。 わからん [翻訳記事マイクロフロントエンド](https://micro-frontends-japanese.org/) - Communication 同期化or非同期 protocol-aware: サービスは互いに相手との通信方法を知っている必要がある(のを隠蔽するのがservice meshと思ってたけど) heterogenous: 個々のサービスは別個の技術スタックで実装されうる interoperability: サービスを跨ぐトランザクションは避けられるべきだが、個別サービスは互いに呼び出す 非同期でのブローカーパターンとオーケストレータパターン - Choreography and Orchestration choreography: 中央不在のブローカーパターン。サービス間の協調が必要な場合はローカルなmediator serviceから制御する。choreographyではサービスの独立性は高まるが、エラー対処や協調管理は難しくなる。 - Transactions and Sagas サービスを跨ぐトランザクションは行わないのが最も良い。 sagaパターン: 処理が途中で失敗したら補償トランザクションを走らせる。 mediator使わないパターンが出てこないね 内容薄いな [TCCパターンとSagaパターンでマイクロサービスのトランザクションをまとめてみた](https://qiita.com/nk2/items/d9e9a220190549107282) - Architecture Characteristics Ratings マイクロサービスってDevOps, TDD, DDD, ロギング, 監視, 耐障害性設計が適切に実装できるチームじゃないとたぶん無理。小さなAPI鯖をばら撒いて収集がつかなくなる。 通信時間増がレスポンス時間等にどれくらい響いてるか実例無いかな - Chap.18 Choosing the Appropriate Architecture Style どのアーキテクチャを採用すべきかは状況依存なので、事前に決め方を提示することは出来ない - Shifting "Fashion" in Architecture アーキテクチャのスタイルが変わる要因: 過去の観察、エコシステムの変化、新しい可能性(capability)、変化の加速、ドメインの変化、技術の変化、外部要因 - Decision Criteria - 考慮事項 ドメイン、構造にインパクトを与えるアーキテクチャ的特徴、データアーキテクチャ、組織的要素、知識、ドメイン/アーキテクチャの一致度 モノリスか分散か データをどこで永続化させるか 同期か非同期か - Monolith Case Study: Silicon Sandwiches - モジュラモノリス - マイクロカーネル - Distributed Case Study: Going, Going, Gone ### written by @fujiwara - Chap.17 - Granularity: 名前の由来はservice-oriented architectureのgigantic servicesとの対比 - The term “microservice” is a label, not a description. - service planeとservice mesh。service meshってどれくらい本番環境に実装できているんだろう? - Chap.18 - データディスカバリーツールとしてこれまでに生み出してきた3世代のアーキテクチャに説明しているLinkedIn社の記事[DataHub: Popular metadata architectures explained](https://engineering.linkedin.com/blog/2020/datahub-popular-metadata-architectures-explained) ### written by @chaspy - Chap.17 - 17-1 の図の緑から水色の土管はなんだ - ![](https://i.imgur.com/cFIelKy.png =300x) - ちょうど"モノリスからマイクロサービスへ"を読んでるところなので似たような話が出てくるなあ - >Because microservices is a distributed architecture, experienced architects advise against the use of transactions across service boundaries, making determining the granularity of services the key to success in this architecture. - サイドカーは便利だよなあ、考えたひと天才だわ - 図17-6 実はマイクロフロントエンドのうまみわかってない - フロントエンドをバックエンドごとに Component 分割するんかな - >In microservices, architects and developers struggle with appropriate granularity, which affects both data isolation and communication. Finding the correct communication style helps teams keep services decoupled yet still coordinated in useful ways. - ここのコミュニケーションはサービス間のコミュニケーションか - >The First Law of Software Architecture suggests that neither of these solutions is perfect—each has trade-offs - mediater をもつかどうかにトレードオフがある - >Building transactions across service boundaries violates the core decoupling principle of the microservices architecture (and also creates the worst kind of dynamic connascence, connascence of value) - なかなか強い言葉を使っているな - つまりトランザクションの範囲が1つのサービス粒度になりうるってこったね - まぁ言われてみればそれはそう感 - 分散トランザクションはえぐいよなー - データ指向アプリケーションデザイン本であったな - >The high points of this architecture are scalability, elasticity, and evolutionary. - >Performance is another reason that microservices often use choreography rather than orchestration, as less coupling allows for faster communication and fewer bottlenecks. - 結局コレオグラフィーってなんだ - https://docs.microsoft.com/ja-jp/azure/architecture/patterns/choreography - 中央に mediater を持つのが orchestration パターン - そこの中央を非同期にするとか、中央の指揮者を持たないのが choreography パターンかな - イベントドリブンって思っとけばええんかな - Chap.18 - >Use synchronous by default, asynchronous when necessary. - なんでだろ、非同期だからこその難しさがあるからかな - Going Going Gone 全然わからん。。。 ### written by @someone - Chap.17 - Chap.18 ## 雑談メモ - [Microservices | martinfowler.com](https://martinfowler.com/articles/microservices.html)

    Import from clipboard

    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 lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.
    All
    • All
    • Team
    No template found.

    Create a template

    Delete template

    Do you really want to delete this template?

    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 via Google

    New to HackMD? Sign up

    Help

    Documents

    Tutorials
    YAML Metadata
    Slide Example
    Book Example

    Contacts

    Talk to us
    Report an issue
    Send us email

    Cheatsheet

    Example Syntax
    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~~
    19th 19^th^
    H2O H~2~O
    Inserted text ++Inserted text++
    Marked text ==Marked text==
    Link [link text](https:// "title")
    Image ![image alt](https:// "title")
    Code `Code`
    var i = 0;
    ```javascript
    var i = 0;
    ```
    :smile: :smile:
    Externals {%youtube youtube_id %}
    LaTeX $L^aT_eX$

    This is a alert area.

    :::info
    This is a alert area.
    :::

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    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. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        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

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch

        Danger Zone

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

        Syncing

        Push failed

        Push successfully