An Operating System for the Home. HomeOS: An OS for the home HomeOS Video recording Remote unlock Climate control HomeStore Z-Wave, DLNA, UPnP, etc. HomeOS.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

1 Symbian Client Server Architecture. 2 Client, who (a software module) needs service from service provider (another software module) Server, who provide.
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
An Operating System for the Home Colin Dixon (IBM Research) Ratul Mahajan Sharad Agarwal A.J. Brush Bongshin Lee Stefan Saroiu Paramvir Bahl.
An Operating System for the Home Colin Dixon (IBM Research) Ratul Mahajan Sharad Agarwal A.J. Brush Bongshin Lee Stefan Saroiu Paramvir Bahl.
View the home as a computer Ratul Mahajan Microsoft Research IEEE CCW, Oct 2011 Joint work with Sharad Agarwal, AJ Brush, Colin Dixon, Bongshin Lee, Stefan.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Towards commodity smarthomes Ratul Mahajan. Partners in crime A.J. BrushBongshin Lee Sharad AgarwalStefan Saroiu Colin Dixon Frank Martinez.
The Home Needs an Operating System (and an App Store) Colin Dixon (University of Washington) October 20 th, 2010 Ratul Mahajan, Sharad Agarwal, A.J. Brush,
.NET Remoting. .Net Remoting Replaces DCOM (Distributed Component Object Model – a proprietary Microsoft technology for communication among software components.
Home Lab: Shared Infrastructure for Home Technology Field Studies A.J. BrushJaeyeon JungRatul MahajanJames Scott.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
HomeOS CSE 481m April 4, Lots of tech in homes.
USB – An Overview Group 3 Kaushik Nandha Bikram What is the Universal Serial bus (USB)? Is a cable bus that supports data exchange between a host computer.
Communication in Distributed Systems –Part 2
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
1 I/O Management in Representative Operating Systems.
An Operating System for the Home Colin Dixon (IBM Research) Ratul Mahajan Sharad Agarwal A.J. Brush Bongshin Lee Stefan Saroiu Paramvir Bahl.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
.NET, and Service Gateways Group members: Andre Tran, Priyanka Gangishetty, Irena Mao, Wileen Chiu.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
1 Input/Output. 2 Principles of I/O Hardware Some typical device, network, and data base rates.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
AJAX Chat Analysis and Design Rui Zhao CS SPG UCCS.
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Module 8 Configuring and Securing SharePoint Services and Service Applications.
An Operating System for the Home PRESENTED BY KARL AND SALEM.
Chapter 6 Operating System Support. This chapter describes how middleware is supported by the operating system facilities at the nodes of a distributed.
HTML+JavaScript M2M Applications Viewbiquity Public hybrid cloud platform for automating and visualizing everything.
Home Lab: Shared Infrastructure for Home Technology Field Studies A.J. BrushJaeyeon JungRatul MahajanJames Scott.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
ARCH-4: The Presentation Layer in the OpenEdge® Reference Architecture Frank Beusenberg Senior Technical Consultant.
Spring/2002 Distributed Software Engineering C:\unocourses\4350\slides\DefiningThreads 1 RMI.
© 2004 Mercury Computer Systems, Inc. FPGAs & Software Components Graham Bardouleau & Jim Kulp Mercury Computer Systems, Inc. High Performance Embedded.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Processes Introduction to Operating Systems: Module 3.
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 system architecture 1 after designing to meet functional requirements, design the system.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Implementation of EIDE Gateway using ACES Callouts WECC DEWG EIDE Training.
Jini Architecture Introduction System Overview An Example.
Kemal Baykal Rasim Ismayilov
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Web Services An Introduction Copyright © Curt Hill.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Presented by Syed Baber Development Lead Mazik Global.
.NET Mobile Application Development XML Web Services.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Overview of the Spring Framework Introducing.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Nguyen Thi Thanh Nha HMCL by Roelof Kemp, Nicholas Palmer, Thilo Kielmann, and Henri Bal MOBICASE 2010, LNICST 2012 Cuckoo: A Computation Offloading Framework.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Introduction to Operating Systems Concepts
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
Windows Communication Foundation and Web Services
Introducing the Microsoft® .NET Framework
CS533 Concepts of Operating Systems
Windows Communication Foundation and Web Services
WEB API.
Systems for Smart Home Automation
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Implementation of EIDE Gateway using ACES Callouts
Presentation transcript:

An Operating System for the Home

HomeOS: An OS for the home HomeOS Video recording Remote unlock Climate control HomeStore Z-Wave, DLNA, UPnP, etc. HomeOS logically centralizes all devices Users interact with HomeOS, not individual devices HomeStore helps find compatible devices and apps

HomeOS architecture Application layer Management layer Device functionality layer (DFL) Device connectivity layer (DCL) Tasks Control Device Topological Heterogeneity source handled

DCL and DFL (Drivers) DCL provides basic connectivity to devices – Discovery – Abstract differences in protocols – Connectivity DFL exports device functionality as a service – Services are protocol-independent – Exposed as roles and operations – Kernel does not parse or understand services – Allows subscriptions (e.g. when light is toggled) – Applications do not require changes App layer Mgmt layer DFL DCL

Application layer Apps compose abstract rules from DFL Management layer interposes on accesses Manifests help with compatibility testing – Lists of mandatory and optional features – E.g., mandatory: {TV, SonyTV}, {MediaServer} optional : {Bass Speaker} App layer Mgmt layer DFL DCL

Interaction between Apps and Drivers Drivers Device (camera, thermostat) Core Platform Exports Ports Exposes Ports Applications

What are ports (classical definition) Hardware ports sockets that a device can plug into e.g., printer ports, mouse ports? Software ports locations/addresses that processes run e.g., Http (port 80), ssh (port 22) processes can read and write from ports

Ports in Home Lab (HomeHub) Ports are uses as a communication abstraction between Drivers  Platform (kernel)  Applications All modules (drivers, kernel, applications) can read/write using ports HomeHub ports are associated with Roles Read/write data Driver platform Applications

What are Roles? Roles define service and capabilities that a device offers Example role for a pan-tilt-zoom video camera: up, down, left, right, getImages Roles may be shared between devices same roles can be provided by multiple devices e.g. getTemperature() is a role that can be provided by a temperature sensor and a thermostat

Interaction between Apps and Drivers Drivers Device (camera, thermostat) Core Platform Exports Ports with Roles Exposes Ports with Roles Applications Bind Ports Invoke Roles implements roles

How would a camera device work? Drivers Pan/Tilt/Zoom Camera Core Platform Port roles (CameraRoles: move camera up, down,Left, right) Scan for ports that exports a CamerRole Camera Viewer Application Bind Ports Invoke Roles implements roles Invoke the roles exported by CameraRole

How would you implement different components like kernel, drives, and apps Design goals you want isolation between the kernel, drivers, and applications Sandbox execution of different components? How would you implement something like this?

What are different ways of implementing this? Processes High communication overhead High overhead for switching processes on and off Threads substantial amount of sharing minimal isolation

.Net provides Application domains to implement this? Somewhere in between process and threads The common language infrastructure runs as a process and the sub processes or applications runs within the CLI process Each application domain has a separate virtual address space Provides isolation Exception in one domain does not affect other application domain, each application domain are assigned different access levels, and multiple threads can run in one domain

How would you implement ports Use a framework called.Net Remote There are two ways to pass Objects from one process to the other By object copying and passing object references System.AddIn.AddIn Attributes provides a fairly complex way of implementing the communication using a similar idea. App domain 1 App domain 2 proxy responsible for marshalling/unmarshalling

Implications to Garbage collection Object passed across boundaries are garbage collection It is slower than garbage collection inside app domains Each application domain has a separate virtual address space

Programming Abstraction for HomeHub Drivers and Apps are modules Extends ModuleBase class provides four methods (start, stop, portregistered, portderegistered) Uses the System.AddIn.AddIn(“Appname”) attribute Modules export services and can use service Drivers and Apps therefore theoretically can export and use services Services are operations defined in roles associated with ports Input and output parameters of operations are of ParamType

ParamType Used for transferring data between modules using ParamType class has two fields MainType: this can be an integer, image, sounds, txt MainType can be simple of complex object Value: captures the actual object Example ParamType (maintype=image, value=byte[])

Helper Functions Logger class Generate log messages When a module is instantiated, HomeOS passes a pointer to the log object Redirect messages to a log or stdout logger.log(); SafeThread Focusses on communication between modules

Example of Using SafeThread Logic inside the thread Parameter passed to the thread

Writing Applications Two main steps for writing applications Discover Interesting ports Building application logic

Example (discovering and registering ports) Port object Gets all the ports that are registered with the HomeOS platform This serves a dual purpose: (1) callback when a new port is registered (2) determine ports of interest Finding a port of interest

Making calls to operations in roles Synchronous invocation port Role arguments Operations

Making calls to operations in roles (Asynchronous)

Putting all of this together lets see an example.

HomeOS apps + Web interface.Net App Web App Use WCF (Windows Communication Foundation) Allows communication between.Net and non-.Net entity This is unlike.Net Remote that is between.Net modules WCF framework

Web app is written in HTML+Javascript Web App (html, index.html) Invokes Javascript functions Calls made into.NET application

How does WCF work Javascript functions interface Service class that implements the interface Interfaces define the contracts contracts are the functionality that the server implements and the client uses has two attributes [ServiceContract] – interface attribute [OperationContract] – function attribute [WebInvoke] --- function attribute stating that the function would be invoked through Javascript/WCF Rest interface client server

Every HomeOS app has a index.html Dashboard | Dummy Dummy Application Update

The Javascript function function ShowDummyPortsInfo() { new PlatformServiceHelper().MakeServiceCall("webapp/GetReceivedMessages", "", GetReceivedMessagesCallback); } function GetReceivedMessagesCallback(context, result) { var portsInfo = result.GetReceivedMessagesResult; $("#DummyList").html(''); for (i = 0; i < result.GetReceivedMessagesResult.length; i++) { $("#DummyList").append(portsInfo[i] + " "); }

How to instantiate the service from the server DummyService dummyService = new DummyService(logger, this); serviceHost = new SafeServiceHost(logger,typeof(IDummyContract), dummyService, this, Constants.AjaxSuffix, moduleInfo.BaseURL()); serviceHost.Open(); string binarydir = moduleInfo.BinaryDir(); //directory of where the dlls and libraries are string baseurl = moduleInfo.BaseURL(); // baseurl for the application appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger); Start the server service

Lets take a look at the implementation of the service class

Writing Drivers Five steps for writing applications Instantiating Roles Instantiating Ports Binding roles to ports Registering the port with the platform Implementing functions for handling operation invocations

Roles Data Structure Base class: Role (Your role will extend Role) e.g.: DummyRole:Role Roles have Operation Operation (name, arguments, returnvalue) name: :dummy:->echo (Name, function name) arguments, returnvalue of type ParamType List args = new List () { new ParamType(0) };

Writing Drivers (setting up Roles)

Writing Drivers (instantiating ports) portInfo = GetPortInfoFromPlatform(name) InitPort(portInfo) BindRoles(port, RoleList)

Writing Drivers logic (synchronous)

Putting all of this together lets see an example.

Scouts Scouts are used for discovering devices Discovers devices in the environment Makes the core platform aware of the devices User can query the platform for discovered devices that are not part of the platform Device setup is performed through HTML pages Initial page enables setting up the configurations

What do Scouts do Discover devices and report to the platform Host the UI for custom device configuration Hand over control to the platform by pointing to the generic device addition page