Presentation is loading. Please wait.

Presentation is loading. Please wait.

Explore Patterns in Context-Aware Applications --Using Reactor Pattern to Develop In/Out Board Fall 2002 Yu Du.

Similar presentations


Presentation on theme: "Explore Patterns in Context-Aware Applications --Using Reactor Pattern to Develop In/Out Board Fall 2002 Yu Du."— Presentation transcript:

1 Explore Patterns in Context-Aware Applications --Using Reactor Pattern to Develop In/Out Board Fall 2002 Yu Du

2 Outline Motivation Pattern definition In / Out Board using Reactor Pattern – Requirements – Design – Reactor Pattern – Screen shots Conclusions

3 Motivation Context-aware applications is complex. Patterns are a recent software engineering problem-solving discipline. An attempt to describe good designs, and capture experience for reuse. “The long term goal is to develop handbooks for software engineers.”  Explore patterns in context-aware applications development.

4 What is pattern A pattern is a reusable solution to a recurring problem. Context Program structure Participants Consequences: both positive and negative Examples!

5 Pattern example class Singleton { public: static Singleton* Instance(); // gives back a real object! proof(void); // proof that the object was made protected: Singleton(); // constructor private: static Singleton* _singleton; };

6 In/Out Board Displays the in/out status of users Displays the day and time when the users last entered/left the room Web-based application User-defined services will be triggered upon user’s entering / leaving. – Turn on / off the lights – Pull out the seat – Turn on and log in the user’s computer – Coffee will be served

7 Architecture Design Client (Web Browser) User Info DB (MS Access) In/Out Event Simulator HTTP RMI Main Server (Java programs) Web Server (Tomcat, JSP) JDBC RMI

8 Main Server Design -- Reactor Pattern For demultiplexing and dispatching handles for synchronous events. Also known as dispatcher, notifier. Used in – CORBA ORBs – InterViews – Ericsson EOS Call Center Management System – ACE Framework

9 Main Server Design -- Reactor Pattern

10 Reactor Pattern Handles: identify resources Synchronous Event Demultiplexer: blocks awaiting events to occur on a set of Handles. Initiation Dispatcher: an interface for registering, removing, and dispatching Event Handlers. Event Handler: specifies hook methods Concrete Event Handler: implements the hook method, as well as the methods to process these events

11 Reactor Pattern – General Collaborations

12 Pro’s & Con’s Separation of concerns Improve modularity, reusability Improve application portability Provides coarse-grained concurrency control Non-preemptive Hard to debug

13 User Interface

14 User Interface -- Event Simulator

15 Conclusions Patterns are useful for developing and documenting software. Patterns repositories have been set up for – Distributed systems – Database systems – Fault tolerant systems… More exploration on context-aware applications

16 Questions?


Download ppt "Explore Patterns in Context-Aware Applications --Using Reactor Pattern to Develop In/Out Board Fall 2002 Yu Du."

Similar presentations


Ads by Google