Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 8 Implicit Asynchronous Communication Software Architecture -…
Chapter 8
Implicit Asynchronous Communication Software Architecture
Two different modes
Buffered/publisher-subscriber
Subscribers are interested in some events or messages issued by a publisher
Non-buffered/producer-consumer
Consumers are interested in some events or messages issued by a producer
Observer pattern
is another name used for this type of architecture
Subscribers is an event listener and register themselves with the event source.
Once an event is fired off by an event source, all corresponding subscribers are notified, which then take corresponding action
Limitations
Difficult to test and debug the system
The event source cannot determine
Reliability and overhead of indirect invocations may be an issue.
There is more tight coupling between event sources and their listeners than in buffer-based implicit invocation.
Benefits
Framework availability: Many vendor APIs such as Java AWT and Swing components available.
Reusability of components: Easy to plug-in new event handlers without affecting the rest of the system.
System maintenance and evolution: Easy to update both of event sources and targets.
Independency and flexible connectivity: Dynamic registration and deregistration can be done dynamically at run-time.
Possibility of parallel execution of event handlings.
Point-to-Point Messaging
The message queue architecture is a point-to-point structure between producer and consumer.
A P2P messaging architecture is composed of message queues, senders, and receivers.
Each message is sent to a destination (a specific queue) which is maintained by the consumer; consumer clients extract messages from these queues.
Publish-Subscribe Messaging (P&S
The P&S messaging architecture is a hub-like architecture, where publisher clients send messages to a message topic that acts like a bulletin board.
Message topic publishers and subscribers are not aware of each other.
One difference between P&S from P2P is that each topic message can have multiple consumers.
The system delivers the messages to all its multiple subscribers instead of single receiver as in the message queue system.
Publishers and subscribers have a timing coupling dependency.
A message topic consumer must subscribe the topic before it is published unless subscription is a durable subscription, which is able to receive any topic messages sent while the subscribers are not active or not ready yet.
Applicable Domain of Message-Based Architecture:
Suitable for a software system where the communication between a producer and a receiver needs buffered message-based asynchronous implicit invocation for performance and distribution purposes.
The provider wants the components not to depend on information about other components' interfaces, so that components can be easily replaced.
The provider wants the application to run whether or not all other components are up and running simultaneously.
The application business model allows a component to send information to another and to continue to operate on its own without waiting for an immediate response.