Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Software Architecture Styles

3,495 views

Published on

Advanced Software Engineering course (http://lore.com/Advanced-Software-Engineering-Univaq/)

This lecture is about software architecture styles

Published in: Education
  • Sex in your area is here: ♥♥♥ http://bit.ly/39mQKz3 ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❤❤❤ http://bit.ly/39mQKz3 ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Software Architecture Styles

  1. 1. SA Styles, Patterns, and Tactics Henry Muccini DISIM, University of L’Aquila henry.muccini@univaq.it, @muccinihenry DISIM Dep.nt of Information Engineering, Computer Science and Mathematics University of L’Aquila, Italy
  2. 2. The material in these slides may be freely reproduced and distributed, partially or totally, as far as an explicit reference or acknowledge to the material author is preserved. SEA Group Henry Muccini
  3. 3. SEA Group A brief summary
  4. 4. SA STYLES SEA Group
  5. 5. Prescriptive vs descriptive use of an architectural language SEA Group
  6. 6. SEA Group “A set of design rules that identify the kinds of components and connectors that may be used to compose a system or subsystem, together with local or global constraints on the way the composition is done” (Shaw & Clements, 1996) A set of constraints you put on your development to elicit desirable properties from your software architecture. Topological Behavioral Communication-oriented etc. etc. IMP
  7. 7. Architectural styles typically determine four kinds of properties [AAG93]: IMP SEA Group
  8. 8. SEA Group The Classical Style The Californian Style
  9. 9. Many similarities between patterns and styles But they have come from different communities Differences SEA Group Architectural Styles Design Patterns Few Many Large-scale system organization Localized, small-scale design solutions
  10. 10. 1. The top of a component may be connected to the SEA Group bottom of a single connector. 2. The bottom of a component may be connected to the top of a single connector. 3. There is no bound on the number of components or connectors that may be attached to a single connector. 4. When two connectors are attached to each other, it must be from the bottom of one to the top of the other. 5. Components can communicate only through connectors
  11. 11. The communication between components and connectors is achieved solely exchanging messages The communication is based on notifications and requests Both component top domain and bottom domain can notify or request messages SEA Group Comp2 Comp1 Top Bottom Top Requests Notifications Comp2 receives a request Comp2 sends a notification Comp1 sends a request Bottom Comp1 receives a request Comp1 receives a notification Comp1 sends a notification
  12. 12. SEA Group ElevatorADT1 ElevatorPanel1 ElevatorSynchronizer ElevatorPanel2 Scheduler ElevatorADT2 BuildingPanel ElevatorADT1 ElevatorPanel1 ElevatorSynchronizer ElevatorPanel2 Scheduler ElevatorADT2 BuildingPanel C2 connector C2 component comm. channel request notification
  13. 13. MORE ABOUT THE C2 STYLE SEA Group
  14. 14. 1. The top of a component may be connected to the bottom SEA Group of a single connector. Comp1 NOT Permitted Connector Bottom Comp1 Connector Top
  15. 15. 2. The bottom of a component may be connected to the top SEA Group of a single connector. Comp1 NOT Permitted Comp1 Connector Bottom Connector Top
  16. 16. 3. There is no bound on the number of components or SEA Group connectors that may be attached to a single connector. Comp1 Comp2 Comp3 Permitted
  17. 17. 4. When two connectors are attached to each other, it must SEA Group be from the bottom of one to the top of the other. Connector Bottom Connector Top Connector Bottom Connector Top Connector Bottom Connector Top Permitted Connector Bottom Connector Top Connector Bottom Connector Top NOT Permitted
  18. 18. 5. Components can communicate only through SEA Group connectors Comp1 Comp2 NOT Permitted Permitted: Following rule 4
  19. 19. SEA Group ADL TOOLS DATE SUPPORT FOR ARCHITECTURAL STYLES AADL Osate 2001 Descrizione di proprietà ed interfacce relative a componenti + configurazioni di intercambio XML/XMI ACME Acme Studio+Armani 1995 Interscambio architetturale prevalentemente a livello strutturale ArchiTrio Trident 1990 Unisce lo stile delle notazioni standard UML 2.0 ai formalismi logico-temporali di TRIO ArchJava AcmeArchJava 2002 Supporta uno stile di programmazione flessibile orientato agli oggetti CommUnity CommUnity WorkBench 2002 Linguaggio che si rispecchia negli stili UNITY ed IP DARWIN LTSA-WS + SAA 1991 Architetture di sistemi distribuiti il cui dinamismo è guidato da un supporto severo e formale EAST-ADL AutoFocus2 2001/2004 La descrizione degli elementi del linguaggio è suddivisa in sei parti (domini) Ménage/xAD L ArchStudio+Ménage 2000 Introduce la distinzione tra prescription e description della SA PRISMA PrismaCase 2002 Definizione di elementi architetturali a due diversi livelli di astrazione xArch/xAcm e Acme Studio 2001 Versione recente del linguaggio Acme che ne mantiene le caratteristiche di base, specificate però in XML xArch/xADL ArchStudio+Apigen 2000 Introduce la distinzione tra prescription e description della SA
  20. 20. SOME OF THE MOST KNOWN STYLES SEA Group
  21. 21. SEA Group C2 Style Pipes and filters Layered systems Blackboard style Implicit Invocation Idealized FT Component Model Peer to peer Hypertext style (!) MVC RUP
  22. 22. For each style, we will identify: SEA Group
  23. 23. Layered Style SEA Group Java Virtual Machine Java Java Operating Processor System Virtual Machine Application (Virtual Machine Style)
  24. 24. The Layered System Style A layered system is organized hierarchically, each layer providing service to the layer above and below Components Connectors SEA Group Procedure calls or system calls Stylistic invariants
  25. 25. Application Presentation SEA Group Session Transport Network Data Link Physical Application Presentation Session Transport Network Data Link Physical Network Data Link Physical Network Data Link Physical
  26. 26. SEA Group
  27. 27. Advantages Disadvantages SEA Group
  28. 28. SEA Group 1..1 1..1 XCONN1 1..1 1..1 1..1 1..1 1..2 1..1 XCONN … GLOBAL SHELF PERIPHE RAL XCONN2 XCONN3 1..1 1..1 XCONN XCONN1 1..1 1..1 1..1 1..1 1..2 1..1 … XCONN2 XCONN3
  29. 29. SEA Group Blackboad style 1..* Blackboard KS 1..* Controller
  30. 30. The Blackboard Style This style is characterized by a central data structure and a collection of components operating on the central data store The Blackboard is characterized by three main types of components (Corkill, 1991): Connector Property SEA Group
  31. 31. Advantages Disadvantages SEA Group
  32. 32. SEA Group
  33. 33. Distributed Peer-to-Peer Systems Components Connectors Configurations Computational model SEA Group
  34. 34. SEA Group HTTP Browser Clients (asynchronous RPC) www.sitoweb.it www.website.com Netscape Navigator Microsoft IE Web Servers www.laudaweb.it • Load balancing • Cooperative caching • Use of geographic distribution of the server machines.
  35. 35. Client/Server Systems Client/Server systems are the most common specialization (restriction) of SEA Group the peer-to-peer style One component is a server offering a service The other components are clients using the service Server implementation is transparent but can be centralized or distributed, single-threaded or multi-threaded
  36. 36. SEA Group 3-Tier Client/Server Systems (example)
  37. 37. 3-Tier Client/Server Systems 3-Tier Client/Server systems are a common class of distributed business SEA Group systems First tier: Client (user interface) tier Second (middle, “business logic”) tier: Servers acting as “business objects”, encapsulating abstract, integrated models of multiple, disparate data sources Third (back-end, database) tier: Legacy business applications providing data services
  38. 38. SEA Group WHAT IS P2P? There are 3 types of P2P System: 1st: Napster
  39. 39. SEA Group WHAT IS P2P? 2nd: Gnutella
  40. 40. SEA Group
  41. 41. SEA Group WHAT IS P2P? 3rd: SKYPE
  42. 42. Advantages Disadvantages SEA Group Distributed state Potential for deadlock, starvation, race conditions, service outages Data marshalling and unmarshalling Proxies and stubs for RPC Legacy wrappers
  43. 43. SEA Group image from Google Images
  44. 44. SEA Group Program unit (object, process, block, module, method, class, component, etc.) Interface Exception Failure Exception Local Exception Reply Normal Processing Error Processing Return to normal Service Request Service Request Reply Interface Exception Failure Exception
  45. 45. •The normal part implements the component’s normal services •The exceptional part implements the responses of the component to exceptional situations, by means of exception-handling SEA Group techniques. •When the normal behavior of a component raises an exception (local exception) its exception handling part is automatically invoked. If the exception is successfully handled the component resumes its normal behavior, otherwise an external exception is signalled. •External exceptions are signalled to the enclosing context when the component realizes that is not able to provide the service.
  46. 46. Example SEA Group
  47. 47. MVC: SEA Group Input --> Processing --> Output Controller --> Model --> View
  48. 48. Model View Controller SEA Group
  49. 49. SEA Group Fig 13.7, SA in Practice book 1..* 1 1..*
  50. 50. There is some smoke on the first apartment in the 4th floor, on Avenue de Fortune 26. A smoke sensor detects the smoke, potential source of a fire, and informs a local server. The local server posts the information on-line, and this information is accessible from the fire station. The fire station has a view on all the alarms and warnings happening at the all time. The system monitors the status of alarms and informs the fire fighters about the entity of the fire, the time it started, the area covered by it, and other sensitive information. Based on such information, the system decides where to send the fire trucks (in case only a limited set of fires can be managed in parallel). The fire fighters jump into the fire truck, turn in their onboard computing system, and get information about the fastest way to get to destination. During the trip, they get all possible updates about the state of the fire. Based on this information, they may decide that a second truck is needed, or one is closer to Avenue de Fortune, or that their service is not needed anymore. When the fire fighters arrive to Avenue de Fortune 26, the entire 4th floor is on fire. By using other sensors, they may know how many people is trapped inside the building: this information is displayed on their devices. Fortunately, nobody is inside the building at this time. Before starting extinguishing the fire, the system discovers that there are some gas cylinders on the 6th floor. They first start securing those devices, and in parallel extinguishing the fire on the 4th floor. SEA Group
  51. 51. SEA Group
  52. 52. Patterns are constructed from different tactics A tactic promotes a specific quality attribute Tactics can be used to enhance existing patterns SEA Group
  53. 53. What you shall have learned You shall: SEA Group Layered systems Blackboard style Peer to peer …
  54. 54. Software Architecture in Practice, chapter 13 [SC97] A Field Guide to Boxology: Preliminary Classification of Architectural Styles for Software Systems, M. Shaw and P. Clements, In Proc. COMPSAC97, 21st Int'l Computer Software and Applications Conference, August 1997, pp. 6- 13. SEA Group

×