GakujiTamaki@July Tech Festa運営スタッフ/ #bosyu芸人
    • 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
    • Make a copy
    • 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 Make a copy 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
    # Fundamentals of Software Architecture Chap.14 - イベントページ - [READING.13 #技術書を英語で読む会](https://reading.connpass.com/event/197476/) - 課題図書 - [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.14 - `inventory` (noun) - meaninig: a complete list of items such as property, goods in stock, or the contents of a building. - Syn: list, listing, catalogue, directory, record, register, checklist - Pros of Broker - ![](https://i.imgur.com/R4KsdLD.png =400x) - 出所:[Architectural Patterns For IoT — Event Driven Architectures by prashun javeri](https://link.medium.com/9bqmn54A9bb) - **`Highly decoupled event processors`** - High scalability - High responsiveness - High performance - High fault tolerance - Pros of Mediator - ![](https://i.imgur.com/hS8p6yU.png =400x) - 出所:[同上](https://link.medium.com/9bqmn54A9bb) - Workflow control - **`Error handling`** - Recoverability - Restart capabilities - Better data consistency - 感想: **`疎結合な設計としたい場合Brokerを、エラーハンドリングを優先したい場合Mediatorを`** - Q.AWSのSQS/Step FunctionsがBroker/Mediatorの機能を取り込んでいる?どう組み込むかは考えなくてよい? - そんなことはない。AWSのサービスを使っても考える必要はある。  - cf.![](https://i.imgur.com/WImxNbQ.png) - 出所:[AWS Black Belt Online Seminar](https://d1.awsstatic.com/webinars/jp/pdf/services/20200610_AWS_BlackBelt_Building_Event_driven_Architectures_on_AWS.pdf) ### written by @fujiwara - Chap.14 Event-Driven Architecture Style - イベントを非同期で受け取り、処理する疎結合のイベント処理コンポーネントで構成されたアーキテクチャ。 - request-based model: request orchestrator向けにシステムにあるアクションのまとまりを実行するようにリクエストを送る。 request orchestratorはユーザーインターフェースが典型的なパターン。APIレイヤーや、エンプラのサーバーバスでの実装パターンもある。 - request orchestrator→様々なrequest processorsに対して決定的かつ同期的にリクエストを向ける。 - Topology: - mediator - broker - request-reply messaging (sometimes referred to as pseudosynchronous communications) - correlation ID - temporary queue - [Scalable serverless event-driven architectures with SNS, SQS & Lambda](https://virtual.awsevents.com/esearch/search?keyword=%22scalable%20serverless%20event-driven%22) - 見てみましたがKinesisはノータッチ。FIFO/Exactly Onceの設定ポイント、エラーハンドリングはAWSの設定をする、という観点で参考になりました。 ### written by y-wat - Chap.14 イベントを非同期に受信し処理する、分断されたイベント処理コンポーネントによって構成される - Topology - mediator topology ワークフローを管理したい場合 - broker topology レスポンス性とイベント処理の動的管理を行いたい場合 そうか・・・?? - Broker Topology 中央のイベント中継サービスは無く、イベントは個別のイベントプロセッサに散っている 4つの主要なコンポーネント: initiating event, event broker, event processor, processing event initiating event: イベントフローの起点。event brokerに配信する。 event broker: たぶんチャンネルの集合 event processor: event brokerからeventを受け取り処理を行う processing event: event processorが処理した内容を次のチャンネルに配信する fire and forget: publish-and-subscribe 拡張性を考慮すると後続処理が無くても処理結果を配信すべき: そうか??何を配信すべきかは宛先のキューによって違うはずなので載せるメッセージ内容が変わるような気がする。キューを処理の後ろ側で紐付ける設計なのか? エベントを流すというよりオブジェクト自体を流すイメージなんだろうか(fig.14-4) 個別event processorは独立してスケール可能だがtopicにはback pressureが必要 negative: 全体的なワークフローが無い、エラー処理にシステムとして気づく方法がない、リカバリ性が提供されない ここは製品やサービスに依存すると思うけどなぁ - Mediator Topology event mediator: ワークフローを管理制御する event processors: イベントの処理済み通知をmediatorに戻す 結局mediatorってビジネスロジックや処理順序制御みたいな機能を持って無いように見えて、だったら要らないんじゃないかと思ってしまう。event processors間の疎結合度合いを上げたいみたいな話のほうが筋が通るような。 broker topologyでもエラー対処とかリカバリは出来るけどなぁ。なんで出来ない体裁で話を進めてるんだろうか。 negative: declaratively modelは複雑なフローでは表現が難しい、mediatorのスケール性能(いうほど辛いか??)、event processorsがbroker topologyほど分離できない(そうか??) sagaとかtccの話が出てこないのwhy これ一番気になったかな [TCCパターンとSagaパターン](https://qiita.com/nk2/items/d9e9a220190549107282) そういえばこの章ってトランザクションの話が出てこないな。 - Asynchronous Capabilities - Error Handling エラーデータの自動修復?やっていいのか?正常なデータのパターンは登録できるが、それと違ったデータを検知したところで違いが発生した理由や原因を追わないと直し方も判らないのでは?? - Preventing Data Loss processorAとchannnel間: persistent message queue(永続化レイヤを持ったキューってことですかね)で対処 channelとprocessorB間: client acknowledge modeで対処 processorB内でのデータ永続化: acid - Broadcast Capabilities 単一のpublisherに複数のsubscriber - Request-Reply 非同期処理の結果をpublish元が知る必要のある場合: 戻り用のqueueを用意して、blocking waitする(これ非同期でやる意味ある?? blocking waitさせるということは、このインスタンスは結果が戻るまで別処理を実行できないということ??) - Choosing Between Request-Based and Event-Based 下記 - Hybrid Event-Driven Architectures まあhybridになるでしょうね - Architecture Characteristics Ratings この星表は体感と合わない。 deployはもっと高くていい。 elasticityは5で良くないか。 overallコストは判断分かれる。トランザクション管理が入ると上がる気がする。 performanceは盛りすぎ。 reliabilityはもっと高くていい。 testablityももっと高くていい。疎結合にしてるのにテスト性が低いってどういうことだ。 number of quantaに裏のdb instance数を紐付けないほうがいい気がする。それ言い出すとほとんどのシステムは1。 ドメインの認定と分割をどうするかのほうが大事な気がしてきた。 なんか思ってるイベント駆動の解説と違った。 | Advantage over request based | Trade offs | comment | | -------- | -------- | -------- | | Better response to dynamic user content | Only supports eventual consistency | better responseは何のことだ。キューが外部リソースだとネットワーク時間で笑えないことになるぞ。結果整合性はトレードオフか? | | Better scalability and elasticity | Less control over processing flow | mediatorの場合はless controlでもないような。 | | Better agility and chage management | Less certainty over outcome of event flow | | | Better responsiveness and performance | | performance的にbetterかと言われると?? | | Better real time decision making | | これどこから出てきた | | Better reaction to situational awareness | | これもどこから出てきた | ### written by @takemon - Chap.14 オライリー契約しました。次回から勉強してきます。

    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