1.02k likes | 1.26k Views
بسم الله الرحمن الرحيم ا لحمد لله ، والصلاة والسلام على رسول الله. Software Architecture Styles. Hany H. Ammar , Professor, LANE Department of Computer Science and Electrical Engineering West Virginia University, Morgantown, West Virginia, USA, and
E N D
بسم الله الرحمن الرحيم الحمد لله ، والصلاة والسلام على رسول الله Software Architecture Styles Hany H. Ammar, Professor, LANE Department of Computer Science and Electrical EngineeringWest Virginia University, Morgantown, West Virginia, USA, and Visiting Professor, Faculty of Computers and Information, Cairo University, Cairo, Egypt Modeling and Documenting Software Architectures
OUTLINE • Introduction • Software Architecture Styles • Independent Components • Virtual Machines • Data Flow • Data-Centered • Call-and return • SW Systems Mix of Architecture Styles • Other Important Styles Modeling and Documenting Software Architectures
Introduction Recall the definition of Styles • An architectural style is a coordinated set of architectural constraints that restricts the roles/features of architectural elements and the allowed relationships among those elements within any architecture that conforms to that style.
Introduction • What does it give us? • An architectural style describes a certain codification of elements and their arrangements. • Conversely, an architectural style constrains both the elements and their interrelationships. • It specifies components and connectors types
Families of Architecture Styles • There is a number of families of styles that has been defined and used in many software systems Notable examples are: • Independent Components: Event-based Architectures • Virtual Machines • Data Flow: Pipes and Filters • Data-Centered Systems • Call-and Return Architectures Modeling and Documenting Software Architectures
OUTLINE • Introduction • Software Architecture Styles • Independent Components • Virtual Machines • Data Flow • Data-Centered • Call-and return Modeling and Documenting Software Architectures
Architectural Styles Independent Components • Independent Components. Architecture is viewed a set of independent processes or objects or components that communicate through messages. Two subfamilies: - Event based systems (implicit and direct invocation style), and - Communicating processes family (client-server style). Modeling and Documenting Software Architectures
Architectural styles:Event-based Architecture Some processes post events, others express an interest in events Modeling and Documenting Software Architectures
Event-based Architecture
Event-based ArchitectureImplicit Invocation: The Observer Pattern
Another Example: Lunar Lander GamePlayers Subscribers register to the Game Server that Publishes information on new Lunar Terrain data, new spacecraft, and the locations of currently registered space crafts Component-connector notation
Summary of Event-Based Style Independent Components asynchronously emit and receive events communicated over event buses Components are independent concurrent even generators and consumers Data elements are events sent as first class entities over the event bus
OUTLINE • Introduction • Software Architecture Styles • Independent Components • Virtual Machines • Data Flow • Data-Centered • Call-and return Modeling and Documenting Software Architectures
2. Virtual Machines. Originated from the concept that programs are treated as data by a virtual machine, which is an abstract machine implemented entirely in software, that runs on top of the actual hardware machine. Ex: rule-based style. Architectural Styles Virtual Machines Modeling and Documenting Software Architectures
Virtual Machines: The primary benefits are the separation between instruction and implementation, (Used when inputs are defined by a script and data) Example: Java Virtual Machine. Java code translated to platform independent bytecodes. JVM is platform specific and interprets (or compiles -JIT) the bytecodes. Modeling and Documenting Software Architectures
OUTLINE • Introduction • Software Architecture Styles • Independent Components • Virtual Machines • Data Flow • Data-Centered • Call-and return Modeling and Documenting Software Architectures
3. Data Flow. Include Batch Sequential Systems (BSS) and Pipes and Filters (PF). - BSS: different components take turns at processing a batch of data, each saving the result of their processing in a shared repository that the next component can access. Ex. Dynamic control of physical processes based on a feedback loop. - PF: A stream of data processed by a complex structure of process (filters). Ex, UNIX. Architectural StylesData Flow Modeling and Documenting Software Architectures
Architectural StylesData Flow: Control Loop and Pipes and Filters Control Loop Modeling and Documenting Software Architectures
PF Exampleconcurrency between components (Filters) is allowed
PF example in Embedded Systemsconcurrency between components (Filters) is allowed A Robotics Example
PF Another Architecture Example:Watch for the Two Views Modeling and Documenting Software Architectures
OUTLINE • Introduction • Software Architecture Styles • Independent Components • Virtual Machines • Data Flow • Data-Centered • Call-and return Modeling and Documenting Software Architectures
4. Data-Centered Systems. Consist of having different components communicate through shared data repositories. When data repository is an active repository that notifies registered components of changes in it then-blackboard style. Data-Centered Architectural Styles Modeling and Documenting Software Architectures
Data-Centered Architectural StylesRepository Architecture Style
Data-Centered Architectural StylesRepository Architecture Example: CASE Tools Example
Data-Centered Architectural StylesRepository Architecture Example: Compiler Architecture
Data-Centered Architectural StylesBlackboard Architecture Style:Components perusing shared data, and communicating through it. Used in Database intensive systems Modeling and Documenting Software Architectures
Data-Centered Architectural StylesBlackboard Architecture Style Example Compare with the PFs Style
Data-Centered Architectural StylesBlackboard Architecture Style: Intelligent Agent Systems Example
Data-Centered Architectural StylesBlackboard Architecture Style: Travel Counseling System Example
Data-Centered Architectural StylesBlackboard Architecture Style: Intelligent Agent Systems Example
Blackboard Architecture Style: Intelligent Agent Systems Example
Data-Centered Architectural StylesBlackboard and Publish/Subscribe Styles: Intelligent Agent Systems Example
Rule-Based or Expert System Architecture Style: Three components, a user interface, an inference engine, and a knowledgebase