關於架構的幾件小事:System context

{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"要想解決一個問題,首先要能明確的定義什麼是問題,它從何而來,它的邊界又在哪裏。"}]}]},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"系統上下文是什麼"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"System context,中文系統上下文。系統上下文是整個架構設計的開始。一切的一切,從邊界開始梳理。這裏也是整個分層架構設計的起點。那麼系統上下文到底是啥呢?這裏系統上下文主要包含2點:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"numberedlist","attrs":{"start":1,"normalizeStart":1},"content":[{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":1,"number":1,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"color","attrs":{"color":"#000000","name":"black"}},{"type":"strong"}],"text":"系統邊界;"}]}]},{"type":"listitem","content":[{"type":"paragraph","attrs":{"indent":1,"number":2,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"color","attrs":{"color":"#000000","name":"black"}},{"type":"strong"}],"text":"外部接口;"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":1,"align":null,"origin":null},"content":[{"type":"text","text":"系統上下文圖,其實沒有什麼固定格式。一切能把這兩個問題講清楚的圖皆可。不過咱們實踐的過程中,還是有一些需要注意的地方。下面舉個栗子:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/59/590168c74f6326b6c94e33d1da353dab.jpeg","alt":"System context Forest Fire Detection System with SysML","title":null,"style":null,"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以上是我找到的一個文件系統的系統上下文(非常抱歉,我不可能將真實的項目拿出來給大家分享)。大家可以看到,在系統上下文中,不光需要將交互的系統描述出來,同樣使用系統的人也要表示出來。而且,就個人經驗,人和系統要分隔開,用不同的圖例表示。在看圖的時候,經常能發現將使用系統的人,或者和系統交互的人忽略掉了。嚴格的來說,這可能會產生一定的信息缺失。嚴格的來說,系統上下文應該說明系統和外部交互的人或系統的交互方式。不過這些在第一步時,並不是那麼重要,後面會有機會補齊。"}]},{"type":"horizontalrule"},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"系統上下文不是什麼"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"系統上下文並不是系統架構圖。它不應該包含系統有哪些組件或如何實現~!所謂分層思考,就是要限制問題的範圍,集中精力解決該層次最重要的問題。在這個層次中,系統上下文描述的是系統外部的連接的人和系統。這是一個邏輯上的概念,和實現無關~!一個IT架構設計,是從邏輯視圖逐漸過渡到物理實現視圖。那麼系統上下文階段,就是邏輯視圖階段。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"架構魔方"}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/87/875ad2bca2ef95e05a984f5e3ba12884.png","alt":null,"title":null,"style":null,"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"Next!"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其實講到這裏,一切還平淡無奇。希望能看到架構炫酷技術的同學們可能要失望了。是的,因爲系統上下文並不是一個archivement 要件,而是一個下一階段工作的索引,或者說開始。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這裏會涉及到系統架構工作的下一步:Architecture Overview。Architecture Overview 會描述系統內部的組成。但這裏咱們不展開 Architecture Overview 是什麼。關於Architecture Overview 的內容咱們後面會詳細的展開說。這裏只看一個問題:Architecture Overview中的所有輸入是不是"},{"type":"text","marks":[{"type":"strong"}],"text":"都是從 System context 來的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"以上圖爲例,當FFDS系統展開之後,會有若干個Component 或者sub system。這些Component 或者 Sub system 都需要和System context 的內容產生的一定的聯繫。如果存在某個component 孤島,或者System context 並未指向 Architecture Overview 中的任何component。那麼架構設計一定存在問題。要麼是這個component 識別出了問題,要麼就是System context 識別出了問題。亦或者兩者都出了問題。此時就要回過頭來,重新去審視系統上下文。該補的補,該改的改。對系統上下文的補充也同樣會影響到Architecture Overview,那就該重畫的重畫,該補足的補足。直到所有的系統和人都被識別出來。一切都是連接的、自證的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":1},"content":[{"type":"text","text":"總結"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"系統上下文是整個架構設計的開始。但其工作並不是畫個圖就沒事了。系統上下文的識別工作甚至可能會貫穿整個系統架構設計工作的始終。架構師應該始終細心的對待每一個在架構設計中出現的每一個元素。清晰描述它們之間的關係,它們如何相互作用,完成系統的需求。沒有遺漏,也沒有多餘,一切剛剛好(嗯,嚴格的說,要比剛剛好,多那麼一點點,但不是過度設計),便是好的架構設計。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"最後,給大家留一個疑問。系統上下文的輸入有是什麼呢?有興趣的同學可以在留言。下一節,咱們會聊到整個架構設計中最重要的一個環節:Architecture Overview。下節見 :)"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章