54204_PP08_Chap08PPT_Modified

54204_PP08_Chap08PPT_Modified - Chapter 8 IMPLICIT...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 8 IMPLICIT ASYNCHRONOUS COMMUNICATION SOFTWARE ARCHITECTURE
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Objectives Introduce concepts of the asynchronous communication software architecture Describe the non-buffered event-based and buffered message-based architectures Discuss applicable domains Discuss the benefits and limitations of the asynchronous software architecture Discuss other related architectures
Background image of page 2
Overview This chapter discusses software designs with asynchronous implicit invocation communications . An asynchronous implicit invocation communication can be specified in two different modes : non-buffered and buffered . We have seen some architecture that apply the publisher-subscriber or producer-consumer patterns where the subscribers/consumers are interested in some events or messages issued by a publisher/producer .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Subscribers register themselves with the event source. The subscriber is actually an event listener that after registration is notified of such occurrences. Once an event is fired off by an event source, all corresponding subscribers are notified, which then take corresponding actions. It is up to the subscribers to decide on the actions to execute. The Observer pattern is another name used for this type of architecture .
Background image of page 4
The message queue and message topic are typical buffered asynchronous architectures that subscribers/consumers also need to register their interests with; the event/message is fired off when available on the buffered message queue or topic. A message queue is a one-to-one or point-to- point architecture between message senders and message receivers; whereas a message topic is a one-to-many architecture between publishers and subscribers.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Non-Buffered Event-Based Implicit Invocations The non-buffered 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.
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
: Service requester : Service provider service() AsyncService () serviceResponse()
Background image of page 8
A typical event-based implicit invocation class diagram . +addEventListener() +removeEventListener() +notify() Event Source +handleEvent() Event Listener +notify() +getState() +setState() -state Concrete Event Source +handleEvent() -state Concrete Listener
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The event source class must provide mechanisms to register or deregister event targets and to notify event targets of the occurrence of the event. Event targets must specify the action in the handleEvent() method to respond to incoming events . Above the concrete classes are the interfaces for event source and event listener.
Background image of page 10
The event-based implicit invocation is a good solution for user interaction in a user interface application . Following are simple Java fragments that demonstrate how event sources and event targets (listeners) work together in an event-driven architecture for a user interface application.
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 46

54204_PP08_Chap08PPT_Modified - Chapter 8 IMPLICIT...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online