Transcription
Software Design and Development Conference 2015Software Architecture PatternsMark RichardsHands-on Software ArchitectAuthor of Enterprise Messaging Video Series (O’Reilly)Author of Java Message Service 2nd Edition (O’Reilly)Co-author of Software Architecture Fundamentals Video Series (O'Reilly)
Software Architecture Fundamentals Video SeriesEnterprise Messaging Video Series
agendaintroductionlayered architecture patternevent-driven architecture patternmicrokernel architecture patternspace-based architecture pattern
Software ArchitecturePattern Analysis
lemodulemodulemodulemodulemodulemodule
nentan encapsulated unit of softwareconsisting of one or moremodules that has a specific roleand responsibility in the system
onentcomponentcomponentcomponent
how are components classified?how do components interact?does the architecture scale?how responsive is the architecture?is there a logical flow to the components?what are the deployment characteristics?how does the architecture respond to change?is the architecture extensible and if so how?how maintainable is the architecture?
architecture patterns help define the basiccharacteristics and behavior of theapplication
layered architecturepresentation layercomponentcomponentcomponentbusiness layercomponentcomponentcomponentpersistence layercomponentcomponentcomponentdatabase layer
layered architecturerequestpresentation layercomponentcomponentcomponentbusiness layercomponentcomponentcomponentpersistence layercomponentcomponentcomponentdatabase layer
layered architecturepresentation layercomponentcomponentcomponentbusiness layercomponentcomponentcomponentpersistence layercomponentcomponentcomponentdatabase layerseparation of concerns
layered architecturepresentation layercomponentcomponentcomponentbusiness layercomponentcomponentcomponentpersistence layercomponentcomponentcomponentdatabase layerlayers of isolation
layered architecturehybrids and variantspresentation layercomponentcomponentcomponentbusiness slayerlayercomponentcomponentcomponentdatabase layer
layered architecturehybrids and variantspresentation layercomponentcomponentcomponentbusiness layercomponentcomponentcomponentservices layercomponentcomponentcomponentpersistence layercomponentcomponentcomponentdatabase layer
layered architecturehybrids and variantscomponentcomponentbusiness layercomponentcomponentcomponentpersistence layercomponentcomponentcomponentdatabase layerlayercomponentcomponentcomponentpresentation layer
layered architecturehybrids and variantscomponentcomponentbusiness layercomponentcomponentcomponentpersistence layercomponentcomponentcomponentdatabase layerlayercomponentcomponentcomponentpresentation layer
layered architectureconsiderationsgood general purpose architecture and a goodstarting point for most systemswatch out for the architecture sinkholeanti-patterntends to lend itself towards monolithicapplications
layered architectureanalysisoverall developmentcomplexityloose coupling
event-driven architecturemediator topologybroker topology
event-driven architecturemediator modulemodule
event-driven architecturemediator modulemodule
event-driven architectureyoumoved!you move.process cess
event-driven architecturebroker emodulemodule
event-driven architecturebroker soreventchannelmodulemodulemodulemodule
event-driven architectureyoumoved!customer processyou move.changeaddresschangeaddressquote processrecalcquoteclaims processupdateclaimsupdateclaimsnotification processadjustment process
event-driven architectureconsiderationscontract creation, maintenance,and versioning can be difficultmust address remote processavailability or unresponsivenessreconnection logic on server restartor failure must be addressed
event-driven architectureanalysisoverall developmentcomplexityloose coupling
microkernel architecture(a.k.a. plug-in architecture ug-incomponent
microkernel architecturearchitectural componentscoresystemplug-inmoduleminimal functionality to run systemgeneral business rules and logicno custom processingstandalone independent modulespecific additional rules or logic
microkernel architecture
microkernel architecturesource validation toolcheck headerstandardsread source filescheck sqlcallscheckinterceptorscheck auditwritescheckcontractstandardscheck otherstuff.validation report
microkernel architectureclaims MAmodule
microkernel architectureregistryplug-incomponent 1plug-incomponent 2registry1: location , contract 2: location , contract 3: location , contract 4: location , contract core systemplug-incomponent 3plug-incomponent 4
microkernel architectureregistrystatic {pluginRegistry.put(NAMING, , "ValidatorSysoutPlugin");pluginRegistry.put(AUDIT, "ValidatorAuditPlugin");pluginRegistry.put(TODO, , "ValidatorCommentsPlugin");pluginRegistry.put(SVC CALLS, null);}
microkernel architectureregistryprivate String executeChecks(String moduleName) throws Exception {for (Map.Entry String, String entry : pluginRegistry.entrySet()) {if (entry.getValue() ! null) {Class ? c Class.forName(PLUGIN PKG entry.getValue());Constructor ? con c.getConstructor();ValidatorPlugin plugin (ValidatorPlugin)con.newInstance();data plugin.execute(data);}}}
microkernel architectureplug-in contractsplug-incomponent 1stdplug-incomponent 2stdstdplug-incomponent 3stdplug-incomponent 4core system
microkernel architectureplug-in contractspublic class ValidatorData {public String moduleName;//inputpublic List String moduleContents; //inputpublic String validationResults;//output}public interface ValidatorPlugin {public ValidatorData execute(ValidatorData data);}
microkernel architectureconsiderationscan be embedded or used as part ofanother patterngreat support for evolutionary designand incremental developmentgreat pattern for product-basedapplications
microkernel architectureanalysisoverall developmentcomplexityloose coupling
space-based architecturelet's talk about scalability for a moment.web serverweb serverapp serverweb serverapp serverweb serverapp serverweb serverapp serverweb serverapp serverweb server
space-based architectureprocessing unitprocessing unitprocessing unit.virtualized middlewaremessaginggriddata gridprocessinggriddbdeploymentmanager
space-based architecturearchitectural componentsprocessing unitprocessing unitprocessing unitvirtualized middlewaremessaginggriddata gridprocessinggriddbdeploymentmanager
space-based architectureprocessing unitprocessing unitmodulemodulemodulein memory datadata replication engine
space-based architecturemiddlewaremessaginggriddata gridprocessinggriddeploymentmanager
space-based architecturemiddlewaremessaginggriddata gridprocessinggriddeploymentmanagermanages input request and session
space-based architecturemiddlewaremessaginggriddata gridprocessinggriddeploymentmanagermanages data replication betweenprocessing units----------------------------------------
space-based architecturemiddlewaremessaginggriddata gridprocessinggriddeploymentmanagermanages distributedrequest processing
space-based architecturemiddlewaremessaginggriddata gridprocessinggriddeploymentmanagermanages dynamic processing unitdeployment
space-based architectureproduct implementationsjavaspacesgigaspacesibm object gridgemfirencacheoracle coherence
space-based architectureit's all about variable scalability.good for applications that havevariable load or inconsistent peaktimesnot a good fit for traditional large-scale relationaldatabase systemsrelatively complex and expensive pattern to implement
space-based architectureanalysisoverall developmentcomplexity
Software antHands- akerh p://www.wmrichards.comh p://www.linkedin.com/pub/mark- ‐richards/0/121/5b9
Software Design and Development Conference 2015 Mark Richards Hands-on Software Architect Author of Enterprise Messaging Video Series (O'Reilly) Author of Java Message Service 2nd Edition (O'Reilly) Co-author of Software Architecture Fundamentals Video Series (O'Reilly) Software Architecture Patterns