欢迎来到天天文库
浏览记录
ID:52442842
大小:161.24 KB
页数:6页
时间:2020-03-27
《设计模式、数据结构及架构.pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、架构、设计模式、数据结构李建奇V1.02011‐1‐10V1.12011‐3‐10‐‐ 抽象是最重要的架构技能一.首先要理解业务¢先作,数据流图,状态图¢数据驱动设计¢再理解业务的特点,请求的分布二.用有限的资源战胜价值(需求),关键是平衡和抉择ò架构要抽象掉细节。ò首先设定资源限制,其次才设计ò理解feature的重要程度。三.不要让细节,麻痹最重要的架构决定和“道”一样,架构图,好像谁都可以做。架构师,不是设计师,更不是程序员。四.架构师需实现核心原形系统五.要简化问题,但是不要太简单,balanceEssentialcomplexityrepresentsthedifficult
2、yinherentinanyproblem.六.技能òImportantskill:abilitytoestimateperformanceofasystemdesign–withoutactuallyhavingtobuildit!ò理解系统每个模块的实现,Understandeverycomponent’simplementation.ò知道的东西要多,这样,架构的时候,就有选择七.PhilosophyanddisciplineòBeawareofcontextòExtrememaintenanceòBepragmaticòPreferDescriptiontocodingòExt
3、remeabstract:Programtoaninterface(abstraction),notanimplementationòExtremeseparationofconcernsòExtremereadabilityòTestabilityòNosideeffectòDonotrepeatyourself八.DesignPrincipleDIP,dependencyinversionofcontrolOCP,opencloseLSP,liskovsubstituteISP,interfacesegregationSRP,singleresponsibilityLKP,Leas
4、eknowledgeprinciple九.DataStructure&algorithms算法是软件的核心。1logNNnLongNDividedandconquerorRb‐treeB+tree十.ArchitecturepatternStructurepatternHierarchal,上层的东西,要抽象掉下层的差异。PipesandfilterMicrokernelBrokerBlackBoardInterpreterConnectionpattern:DirectRPCAsynchronousRPCMessagequeueserverPublish–subscribeMessa
5、geBroker(informationbus)十一.ArchitecturetacticHowtoconquerqualityattributeScalabilitytactica)Stretchkeydimensions(10X–20X)toseewhatbreaksb)BottleneckmustbeIO(diskandnet)AvailabilitytacticModifiabilitytacticPerformancetactica)Speed‐updataconversionb)Occupyrecourseasshortaspossiblec)Batchoperationd
6、)MinimizeremotecallsandotherI/OTestabilitytacticUsabilitytactic1.Restartable2.Allowrollbackstopreviousversions.Necessaryincaseofanerrorinanupdate.3.Monitorandinstrumenteverything,andgiveenoughfaultinformationfordiagnosis.Savemoreinformationthane.g.just'Aqueryhasfailed'.Savequery,time,errormessag
7、eandifpossiblethestateoftheapplication.4.Makeeverythingconfigurable.Makediagnosisoptionsconfigurable,ratherthanaddingthemwhenasystemisfailing.Addingmonitoringtoafailingsystemisaskingforproblems.十二.DesignpatternConstructionBe
此文档下载收益归作者所有