Presentation is loading. Please wait.

Presentation is loading. Please wait.

Context Aware Scheduler for Active Spaces Gaurav Kumar University of Illinois Urbana.

Similar presentations


Presentation on theme: "Context Aware Scheduler for Active Spaces Gaurav Kumar University of Illinois Urbana."— Presentation transcript:

1 Context Aware Scheduler for Active Spaces Gaurav Kumar University of Illinois Urbana

2 Objectives Program Gaia’s devices, services and apps to model activities, in an easy way Execute actions in response to events Resolve conflicts of actions Schedule Applications Store preferences of individuals/groups. A Work Flow Management System

3 Active Spaces - Gaia Active Space Physical space which can interact with users, devices and applications in an intelligent way Gaia– Infrastructure enabling Active Spaces

4 Active Spaces Smart Room(2401)

5 Gaia – Ubiquitous Operating System Context Aware Scheduler

6 Basic Component – A State Machine Input/Output State 1State 2 Input – Gaia Event (Discovery/Temperature/Stock Price) Output – Sequence of Actions (for apps/devices –MP3, X10) Input (Event) - Time 10 am Output (Actions) - Lights On, Doors Opened Conference Room empty Meeting begins

7 Key Definitions State - A certain stage in the activity State Machine - Belongs to an entity (group/individual) Represents an Activity with a predefined sequence of states. Stores preferences of an entity(group/individual) Resources - Active Devices ( X10 lights),Active Applications ( MP3 player) Actions – X10 light (on, off), MP3 player (next,previous..)

8 Scheduler – GUI

9 State Machine – Gaia Meeting Chairperson Enters 10. 30 am Presentation ends 10 am People enter Everybody leaves starts waiting abandoned end ending.. started yet to start

10 Simple Scenario: Gaia Meeting State 1 - Conference Yet to Start Event Timer Service Event Channel Actions Lights on Put the Meeting Agenda on the Display 5 State 2 – Conference Starts Event Discovery Service Actions :- Attendance Call Chairperson’s secretary State 3 - Waiting for Chairperson

11 Scenario : Meeting (Contd.) Depending upon whether Chairman enters, change to State 4 or 5 Event Timer Service 10.15 Actions :- Discuss Agenda of next meeting State 4 - Meeting Abandoned Event Discovery Service - Chairman enters Actions :- Start the relevant Presentation State 5 - Meeting Begins

12 Scenario : Meeting (Contd.) Event PPT Event Channel Actions :- Discuss Agenda for next meeting State 6 - Meeting going to end Event Discovery Event Channel – Everybody leaves Actions :- Lights off State 7 - Meeting Ends

13 Problems Explosion of States Explosion of transitions For Multiple State Machines :- a) Conflicting actions – resource specific b) Race Conditions at Resources c) Need Communication between SM’s ?

14 Explosion Of States/Transitions State Charts ( David Harel ’74) Hierarchy Each state, a Superstate consisting of substates superstate -Jack alone in the room waiting for meeting to start substates – Jack playing chess, listening to music,programming Orthogonality More than one substate of a superstate can be independently active at a time Jack can be playing chess and listening to music at a time

15 State Charts (contd.) Music (m) Program (P) Eating (t) Meeting Starts, Time 10 am State A- Jack alone in room State B- Meeting starts Chess (C) Chess application closed friend enters Close music, chess, program

16 Explosion Of States/Transitions (Without Superstates/Substates) e & p p & c !m & e m & c e & c c&m&e State B C & p !p & c m&e&p Meeting Starts Meeting S. Meeting Starts M.. Meeting Starts

17 Multiple State Machines - Conflicts of Actions Gaia meeting & Jack in Active Space Both have their preferences configured Both have separate state machines Event Temperature changes to below 20 degrees Fahrenheit Gaia meeting – Thermostat Same Jack - Thermostat increase, Conflict !! Points to consider Communicating State machines bring forth many problems So, Keep both state machines ignorant of each other Different resources have different meanings of conflicts Lights( on/off),MP3(Play/Stop),Thermostat(increase/decrease)

18 Conflicting Actions ? – Resource Controller(RC) Resource Specific : Light, MP3 Player, Calendar Defines Actions Possible for a Resource Lights – on, off, dim, brighten Evaluates Action Conflicting ? Yes/No On/off –Yes Defines Conflict Resolution Policy FCFS /Priority/Any other Notifies Entity if not given resource Keep Intelligence close to the Resource instead at a Central Entity

19 Race Conditions at Resource Controllers Asynchronous nature of Events State Machine(SM) A receives event before SM B One SM is faster than another SM A dispatches actions to a RC before B RC executes actions without waiting for all SM’s Central Listener Listens to Event Channels, Queues events For each event, Retrieves actions from all SM’s Partitions actions for different RC’s and dispatches them, per event synchronization

20 Scheduler – Components Central Listener Event Channels Temp Discovery Stock Price SM A SM B SM C X10 RC ppt RC calendar RC mp3 RC X10 Actions Mp3 Actions ppt Actions Cal Actions

21 Contribution/Conclusions Makes the Active Space easy to program - Makes it easy to model activities, scenarios - Co-ordinates users, devices and applications, in a seamless, transparent way Works as an overlay over the present infrastructure, without creating any new integration problems A Simple solution


Download ppt "Context Aware Scheduler for Active Spaces Gaurav Kumar University of Illinois Urbana."

Similar presentations


Ads by Google