Lecture 9 - SDaA
Lecture 9 - SDaA
Architecture
Implicit Asynchronous
Communication Architecture
Overview
Asynchronous implicit invocation communication
Non-buffered
Buffered.
Publisher-subscriber (producer-consumer)
Subscribers are interested in some events/messages
issued by a publisher
Subscribers register themselves with the event source.
Once an event is fired off by an event source, all
corresponding subscribers are notified.
It is up to the subscribers to decide on the actions to
execute.
Implicit Asynchronous Communication
Architecture
Publisher-subscriber (producer-consumer)
The message queue or topic are typical buffered
asynchronous architectures
subscribers need to register their interests with the
event/message is fired off when available on the buffered
message queue or topic.
A Message queue: one-to-one or point-to-point architecture
between message senders and message receivers;
A Message topic: one-to-many architecture between
publishers and subscribers.
Non-Buffered Event-Based Implicit Invocations
event listeners.
The event registration process connects these two partitions.
There is no buffer available between these two parties.
Non-Buffered Event-Based Implicit Invocations
Non-Buffered Event-Based Implicit Invocations
: Service : Service
requester provider
service ()
AsyncService ()
serviceResponse ()
Non-Buffered Event-Based Implicit Invocations
Event Source
Event Listener
+addEventListener()
+removeEventListener() +handleEvent()
+notify()
Benefit
Availability
Reusability: Easy to plug-in new event handlers without
affecting the rest of the system.
Maintenance and Evolution: Easy to update both of event
sources and targets.
Flexibility: Dynamic registration and deregistration can be
done dynamically at run-time.
Possibility of parallel execution of event handlings.
Buffered Message-Based Software
Architecture