![Page 1: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/1.jpg)
SOFTWARE DESIGN AND ARCHITECTURE
LECTURE 13
![Page 2: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/2.jpg)
Review
• Shared Data Software Architectures– Black board Style architecture
![Page 3: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/3.jpg)
Outline
• Implicit Asynchronous Communication Software Architecture
![Page 4: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/4.jpg)
IMPLICIT ASYNCHRONOUS COMMUNICATION SOFTWARE ARCHITECTURE
![Page 5: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/5.jpg)
Implicit Asynchronous Communication Software Architecture
• The main purpose of this type of communication architecture is to provide a decoupling between the event/message, the publishers/producers, and the subscribers/customers.
• These are very popular architectures in distributed applications.
![Page 6: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/6.jpg)
Implicit Invocation Style
• Instead of invoking a procedure directly – A component can announce (or broadcast) one or
more events.– Other components in the system can register an
interest in an event by associating a procedure with the event.
– When an event is announced, the broadcasting system (connector) itself invokes all of the procedures that have been registered for the event.
![Page 7: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/7.jpg)
Event-based, Implicit Invocation Style
• Suitable for applications that involve loosely-coupled collection of components, each of which carries out some operation and may in the process enable other operations.
• Particularly useful for applications that must be reconfigured “on the fly”:– Changing a service provider.– Enabling or disabling capabilities.
![Page 8: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/8.jpg)
• Components– Modules whose interfaces provide a collection of
procedures/methods and a set of events that it may announce
• Connectors– Bindings between event announcements and
procedure/method calls
![Page 9: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/9.jpg)
Based on Observer pattern
• Basically, components communicate using a generalized Observer Design Pattern style of communication.
![Page 10: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/10.jpg)
Implicit Invocation Invariants
• Announcers of events do not know which components will be affected by those events.
• Components cannot make assumptions about the order of processing.
• Components cannot make assumptions about what processing will occur as a result of their events.
![Page 11: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/11.jpg)
Specializations
• Often connectors in an implicit invocation system include the traditional procedure call in addition to the bindings between event announcements and procedure calls.
![Page 12: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/12.jpg)
Integrated Development Environments (IDEs)
• Think of the debugging process (use of breakpoints)– How editors behaves on a breakpoint?– How variables monitors behave on a breakpoint?– How these components know when these are
required?
![Page 13: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/13.jpg)
Examples
• Used in programming environments to integrate tools:– Debugger stops at a breakpoint and makes that
announcement.– Editor responds to the announcement by scrolling
to the appropriate source line of the program and highlighting that line.
![Page 14: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/14.jpg)
Examples
• Used to enforce integrity constraints in database management systems (called triggers).
• Used in user interfaces to separate the presentation of data from the applications that manage that data.
![Page 15: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/15.jpg)
NON-BUFFERED EVENT-BASED IMPLICIT INVOCATIONS
![Page 16: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/16.jpg)
Non-buffered Event-Based Implicit Invocations
• The nonbuffered event-based implicit invocation architecture breaks the software system into two partitions: – Event sources and – Event listeners.
• The event registration process connects these two partitions. There is no buffer available between these two parties.
![Page 17: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/17.jpg)
Non-buffered Event-Based Implicit Invocations
• In the event-based implicit invocations (nonbuffered) each object keeps its own dependency list.
• Any state changes of the object will impact its dependents.
• the basic concept of event-based implicit invocation, which is the opposite of the direct explicit method invocation whereby the invoker must wait for the response from the called module; in this case, the invoker does not proceed until the called party responds.
![Page 18: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/18.jpg)
Applicable domains of nonbuffered event-driven architecture:
• Interactive GUI component communication and integrated development environment (IDE) tools
• Applications that require loose coupling between components that need to notify or trigger other components to take actions upon asynchronous notifications
• When event handlings in the application are not predictable
![Page 19: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/19.jpg)
Benefits:• Framework availability: Many vendor APIs such as Java AWT
and Swing components are available.
• Reusability of components: It is easy to plug in new event handlers without affecting the rest of the system.
• System maintenance and evolution: Both event sources and targets are easy to update.
• Independency and flexible connectivity: Dynamic registration and deregistration can be done dynamically at runtime.
• Parallel execution of event handlings is possible.
![Page 20: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/20.jpg)
Limitations:
• It is difficult to test and debug the system since it is hard to predict and verify responses and the order of responses from the listeners. – The event trigger cannot determine when a response has
finished or the sequence of all responses.
• There is tighter coupling between event sources and their listeners than in message queue-based or message topic-based implicit invocation.
• Reliability and overhead of indirect invocations may be an issue.
![Page 21: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/21.jpg)
BUFFERED MESSAGE-BASED SOFTWARE ARCHITECTURE
![Page 22: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/22.jpg)
The buffered message-based software architecture
• It breaks the software system into three partitions: – message producers, – Message consumers, and – message service providers.
• They are connected asynchronously by either a message queue or a message topic.
![Page 23: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/23.jpg)
The buffered message-based software architecture
• Messaging is a mechanism or technology that handles asynchronous or synchronous message delivery effectively and reliably.
![Page 24: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/24.jpg)
The buffered message-based software architecture
• A messaging client can produce and send messages to other clients, and can also consume messages from other clients.
• Each client must register with a messaging destination in a connection session provided by a message service provider for creating, sending, receiving, reading, validating, and processing messages.
![Page 25: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/25.jpg)
Applicable domains of message-based architecture:
• Suitable for a software system where the communication between a producer and a receiver requires buffered message-based asynchronous implicit invocation for performance and distribution purposes.
• The provider wants components that function independently of information about other component interfaces so that components can be easily replaced.
![Page 26: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/26.jpg)
Applicable domains of message-based architecture:
• The provider wants the application to run whether or not all other components are running simultaneously.
• The application business model allows a component to send information and to continue to operate on its own without waiting for an immediate response.
![Page 27: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/27.jpg)
Benefits:
• Anonymity: provides high degree of anonymity between message producer and consumer.
• Concurrency: supports concurrency both among consumers and between producer and consumers.
• Scalability
![Page 28: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/28.jpg)
Limitations:
• Capacity limit of message queue:
• Increased complexity of the system design and implementation.
![Page 29: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/29.jpg)
![Page 30: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/30.jpg)
Advantages
• Provides strong support for reuse since any component can be introduced into a system simply by registering it for the events of that system.
• Eases system evolution since components may be replaced by other components without affecting the interfaces of other components in the system.
![Page 31: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/31.jpg)
Disadvantages
• When a component announces an event:– it has no idea how other components will respond
to it, – it cannot rely on the order in which the responses
are invoked– it cannot know when responses are finished
![Page 32: SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture](https://reader031.vdocuments.mx/reader031/viewer/2022032200/56649f4a5503460f94c6be63/html5/thumbnails/32.jpg)
Summary
• Implicit Asynchronous Communication Software Architecture