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

ソフトウェア開発における 「設計」と「パフォーマンス」の相互作用 / Interaction ...

moznion
November 08, 2018

ソフトウェア開発における 「設計」と「パフォーマンス」の相互作用 / Interaction Between Design and Performance on
Software Development

設計Night2018の資料です
https://connpass.com/event/104821/

moznion

November 08, 2018
Tweet

More Decks by moznion

Other Decks in Technology

Transcript

  1. - ΞϧΰϦζϜ - σʔλߏ଄ - (ϋʔυ΢ΣΞ) ύϑΥʔϚϯεͤ͞΍͍͢ઃܭ (Ұྫ) - ϑΝϯΞ΢τ

    - ΩϡʔΠϯά - Ωϟογϡ ɹ- όον ਨ௚ࢦ޲ ਫฏࢦ޲ ͦͷଞ
  2. - ΩϡʔΠϯά - δϣϒΩϡʔͰޙճ͠େ࡞ઓ (™@nekokak) - ཁ͸όοϑΝϨΠϠʔʹॲཧΛ٧ΊࠐΉ - ϫʔΧʔ (૬౰)

    ͕ॲཧΛ੥͚ෛ͏ - εϩοτϦϯά͕͠΍͍͢ ਫฏࢦ޲ͷઃܭ queue (buffer)
  3. - ࡶଟͳۤ͠ΈΛݺͼ͕ͪ - ϨʔείϯσΟγϣϯ - ϦτϥΠ - εςʔτͷෆ੔߹ - ͳͲͳͲ……

    - Ref: ෼ࢄΩϡʔͱ͍͏໊ͷۤ͠Έ - Software Transactional Memo
 http://kumagi.hatenablog.com/entry/queue_struggle ਫฏࢦ޲ͷઃܭ
  4. - FaaSʹΑΔύϥμΠϜͷมԽ - ԋࢉϦιʔεΛΦϯσϚϯυͰ҆͘࢖͑ΔΑ͏ʹͳͬͨ - FunctionʹॲཧΛҕৡͯ͠͠·͏ - Firebaseͱ͔Ͱׂͱਪ঑͞ΕΔख๏ - ʮͱΓ͋͑ͣδϣϒΩϡʔʹೖΕ͓͍ͯͯ͋ͱͰॲཧʯ

    - ΊͬͪΌ΍Γ΍͘͢ͳͬͨ - ୯Ұ੹೚ͷݪଇ (SRP) ͕ൺֱతຬͨ͞Ε΍͘͢ͳͬͨҹ৅ - (ίϯϙʔωϯτͷϝϯςίετ΋Լ͕Δ) ਫฏࢦ޲ͷઃܭ (൪֎?)
  5. - ͔͠͠ - ςΫχΧϧͳ౎߹͕ιϑτ΢ΣΞઃܭʹٴ΅͢Өڹ͸େ͖͍ - ౎߹ ∈ ϋʔυ΢ΣΞɾϛυϧ΢ΣΞ - ςΫχΧϧͳղܾख๏ͷ҆қͳಋೖʹΑͬͯ


    ΧΦεʹ޲͔͍ͬͯ͘Մೳੑ͸ߴ·Δ - υϝΠϯͷ࣋ͭϐϡΞ͕ࣦ͞ΘΕΔ - ઃܭ͕࿪ΊΒΕ͕ͪ ͦͷଞ
  6. - ઃܭ͕࿪ΊΒΕΔ - => ڍಈ͕Θ͔Γʹ͘͘ͳΔ (ίʔυͷಡΈ΍͚ͩ͢͞Ͱ͸ͳ͍) - => मਖ਼ίετ͕ߴ͘ͳΔ -

    => ϝϯςίετ͕ߴ͘ͳΔ - => ઃܭ͕࿪ΊΒΕ͍ͯΔ͜ͱʹؾͮ͘…… ઃܭ͕࿪ΊΒΕͯԿ͕ѱ͍ʁ
  7. - ઃܭ͕࿪ΊΒΕΔ - => ڍಈ͕Θ͔Γʹ͘͘ͳΔ (ίʔυͷಡΈ΍͚ͩ͢͞Ͱ͸ͳ͍) - => मਖ਼ίετ͕ߴ͘ͳΔ -

    => ϝϯςίετ͕ߴ͘ͳΔ - => ઃܭ͕࿪ΊΒΕ͍ͯΔ͜ͱʹؾͮ͘…… ઃܭ͕࿪ΊΒΕͯԿ͕ѱ͍ʁ
  8. - ίετͷ࣠ - ίϯϐϡʔςΟϯάͷ଎౓ʹΑͬͯϖΠ͢ΔྖҬ - ઃܭͷྑ͞ʹΑͬͯϖΠ͢ΔྖҬ - ௚ަ͢Δ৔߹΋͋Ε͹૬৐͢Δ৔߹΋૬൓͢Δ৔߹΋͋Δ - όϥϯε͕ॏཁ

    - ྑ͍ઃܭͷ৚݅ͷҰͭ: ߹ҙ͕औΕ͍ͯΔ - => ίετͱ΋߹ҙΛऔΔඞཁ͕͋Δ - ʮσϕϩούͷੜ࢈ੑʯʹݶఆͨ͠࿩Ͱ͸ͳ͍ ίετ
  9. @startuml actor User participant Comment participant WatchingUser participant Queue participant

    Worker1 participant WorkerN participant Notification participant PushNotificationGateway Worker1 -> Queue : subscribe WorkerN -> Queue : subscribe User -> Comment : postComment Comment -> WatchingUser : fetchWatchingUser Comment -> Comment : buildNotificationBody Comment -> Queue : enqueueNotificationPayload group publishing as async until queue is empty Queue -> Worker1 : publish Worker1 -> Notification : create Notification -> PushNotificationGateway : sendNotification Queue -> WorkerN : publish WorkerN -> Notification : create Notification -> PushNotificationGateway : sendNotification end @enduml
  10. @startuml actor User participant Comment participant WatchingUser participant Queue participant

    Worker1 participant WorkerN participant Notification participant PushNotificationGateway Worker1 -> Queue : subscribe WorkerN -> Queue : subscribe User -> Comment : postComment Comment -> WatchingUser : fetchWatchingUser Comment -> Comment : buildNotificationBody Comment -> Queue : enqueueNotificationPayload group publishing as async until queue is empty Queue -> Worker1 : publish Worker1 -> Notification : create Notification -> PushNotificationGateway : sendNotification Queue -> WorkerN : publish WorkerN -> Notification : create Notification -> PushNotificationGateway : sendNotification end @enduml /PUJpDBUJPOΛ࡞Δ෦෼͝ͱ ΩϡʔΠϯάͯ͠͠·͏ ϫʔΧʔ͕͍͍ײ͡ʹॲཧ
  11. Q?