Data-centered style architectures involve a shared
data source approach to information passing.
以資料為中心的風格架構涉及到資訊傳遞的共享資料源方法。
典例: 系統資料庫 剪切闆
倉庫體系結構風格
倉庫是存儲和維護資料的中心場所。
元件: 中心資料結構,表示目前資料的狀态
連接配接件:倉庫與獨立構件之間的互動
應用場合:資料庫、倉庫形式的編譯器結構、倉庫形式的編譯器結構
軟體體系結構期末複習總結
黑闆體系結構風格
軟體體系結構期末複習總結
軟體體系結構期末複習總結
事件系統體系結構風格
軟體體系結構期末複習總結
主要特點
✓ 事件的觸發者并不知道哪些構件會被這些事件影響,互相保持獨立。
✓ 不能假定構件的處理順序,甚至不知道哪些過程會被調用。
✓ 各個構件之間彼此之間無連接配接關系,各自獨立存在,通過對事件的釋出和注冊實作關聯。
軟體體系結構期末複習總結
A component(Event Source) can annonce (or broadcast) one or more events. 一個元件可以廣播一些事件。
Other components(Event Handlers) in the system can register an interest in an event by associating a procedure with it. 系統中的其它構件可以注冊自己感興趣的事件,并将自己的某個過程與相應的事件進行關聯。
When the event is announced the system (Event Manager) itself invokes all of the procedures that have been registered for the event. 當一個事件被釋出,系統自動調用在該事件中注冊的所有過程。
應用示例
調試器中的斷點處理
軟體體系結構期末複習總結
Event Source:debugger (調試器)
Event Handler:editor and variable monitor (編輯器與變量螢幕)
Event Manager:IDE (內建開發環境)
✓ 編輯器與變量螢幕向調試器注冊,接收“斷點事件”;
✓ 遇到斷點,調試器釋出事件,進而觸發“編輯器”與“變量監測器”
✓ 編輯器将源代碼滾動到斷點處;
✓ 變量監測器則更新目前變量值并顯示出來。
美團平台
軟體體系結構期末複習總結
事件系統派遣機制
軟體體系結構期末複習總結
無獨立排程子產品的事件系統
This module is usually called Observable/Observer (被觀察者/觀察者).
Each module allows other modules to declare interest in events that they are sending. (每一個子產品都允許其他子產品向自己所能發送的某些消息表明興趣)
Whenever a module sends an event, it sends that event toexactly those modules that registered interest in that event.
risks, non-risks, sensitivity points, and tradeoffs
sensitivity points
A sensitivity point is a property of one or more components (and/or component relationships) that is critical for achieving a particular quality attribute response.
“The level of confidentiality in a virtual private network might be sensitive to the number of bits of encryption. ”
敏感點是一個或多個元件(和/或元件關系)的屬性,對于實作特定的品質屬性響應至關重要。
e.g. 虛拟專用網絡的保密級别可能對加密的位數很敏感。
tradeoff
A tradeoff point is a property that affects more than one attribute and is a sensitivity point for more than one attribute.
“Changing the level of encryption could have a significant impact on both security and performance.”
權衡點是影響多個屬性和的屬性,是多個屬性的敏感點。
e.g.“改變加密級别可能會對安全性和性能産生重大影響。
risks
A risk is a potentially problematic architectural decision.
“The level of confidentiality in a virtual private network might be sensitive to the number of bits of encryption. ”
風險是一個潛在的有問題的架構決策。
e.g.“虛拟專用網絡的機密程度可能對加密的比特數很敏感。”
non-risks
Non-risks are good architectural decisions that are deemed safe upon
analysis.
“Assuming message arrival rates of once per second, a processing
time of less than 30 ms, and the existence of one higher priority
process, a 1 second soft deadline seems reasonable.”