1 / 14

Event Based Implicit Invocation

Event Based Implicit Invocation. By Ajay Mansata. INTRODUCTION. An Architectural style defines a family of systems. It defines the vocabulary of components and connectors that can be used in instance of a particular style.

jorryn
Download Presentation

Event Based Implicit Invocation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Event Based Implicit Invocation By Ajay Mansata

  2. INTRODUCTION • An Architectural style defines a family of systems. • It defines the vocabulary of components and connectors that can be used in instance of a particular style. • For example if we are using a pipeline Architecture model then there are certain rules as to how data will flow between various components making up the system. Now this will be different in a Peer to Peer Architecture.

  3. Current Operation • In Traditional Systems where Component Interfaces interact with each other, the interaction is through invocation procedures and functions when required. • Now usually a Component calls procedures and functions of other components to perform certain actions depending on certain events occurring. • Consider an example where a customer authenticates himself to the bank. Now After the customer logs in , the verification system verifies the user and then calls procedures such as account status, balance etc.

  4. Main Idea • The Main Idea behind implicit invocation is that instead of components invoking procedures of other components , a component announces one or more events. • The other components if they want to act on a particular event they can register the appropriate methods with that event. • When that particular event is announced the system invokes all the procedures registered with that event. • Now here many different procedures can be invoked thus giving a parallel look to it.

  5. Example • The Example presented in the documents is that of a debugger. When we stop a debugger at a break point the debugger announces an event. Corresponding to this event various procedures are called which might record the value of a specified variable or scroll an editor to an appropriate line. • Now here all the debugger does is announce an event. It is not concerned as to which procedures might be invoked and in what order the procedures may be executed if there are more than one procedures called

  6. Diagrammatic View • Overview Subject Observer StateChange 1 Statechange 2 …………… Overall Implicit Invocation Opfor Event1(.) Opfor Event2(.) 1 1 n n 1 n State Change Event Stub Forward(..) Announce(..) Register() Deregister() Operation Observer

  7. Example continued • Subject: Defines an abstract state • State Change: • - Represents a possible state change • - Offers operation for the subject to trigger event notification • - Offers operations to register and unregister observers via event stub Object. • Observer : Provides event stub with an operation reference to be called incase of invocation.

  8. Continued • Event Stub : Knows which operation of its owner an observer) is to be called in case of invocation. • Collaborations: • If a subject changes its state , it triggers the corresponding state change object. • A state change object distributes the notification to all its event stubs. • An Event Stub forwards a notification to its owner (an observer).

  9. Components and Connectors • Components in an implicit invocation style are modules whose interface provide both a collection of procedure and a set of events. • Procedures may be called normally and in addition some procedures may be registered with a particular event. • The Connectors include traditional procedure calls as well as binding between event announcement and procedure calls.

  10. Benefits • Strong support for Reuse. • A component can be introduced into a system simply by registering it for events of that system. • Another benefit is that it eases out system evolution. • Components may be replaced by other components without affecting the interfaces of other components in the system. • In contrary to this is explicit based system whenever the identity of a component that provides some system function is changed, all modules that import that module must also be changed.

  11. Disadvantages • Component does not have control over computations performed in the system. • Component has no idea what other components will respond to against an event. • In what order operations take place is also not known to the component and when is the operation done with. To overcome this explicit invocation is also included in systems. • Global Performance and Resource Management become a serious issue since all components share a common repository.

  12. Example • One example could be the java awt package. In these when we design buttons we associate event handlers for that button. Whenever that button is clicked all the event handlers are executed.

  13. References • An Introduction to Software Architecture By Garlan & Shaw. • http://www.riehle.org/computer-science-research/1996/tapos-1996-event.pdf

  14. Thank you • Thank you very much

More Related