1 Design II : Plant Care System Sushant Jain Jong Hee Kang Daniel Lloyd.

Slides:



Advertisements
Similar presentations
MicroKernel Pattern Presented by Sahibzada Sami ud din Kashif Khurshid.
Advertisements

Lists and the Collection Interface Chapter 4. Chapter Objectives To become familiar with the List interface To understand how to write an array-based.
COS 461 Fall 1997 Network Objects u first good implementation: DEC SRC Network Objects for Modula-3 u recent implementation: Java RMI (Remote Method Invocation)
Lecture plan Information retrieval (from week 11)
RPC Robert Grimm New York University Remote Procedure Calls.
Exception Handling. Background In a perfect world, users would never enter data in the wrong form, files they choose to open would always exist, and code.
Technical Architectures
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
590ES1 Design of Plant Care System Mike Swift Steve Swanson Stefan Bjarni Sigurdsson.
Introduction to Web Database Processing
CS3771 Today: network programming with sockets  Previous class: network structures, protocols  Next: network programming Sockets (low-level API) TODAY!
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Advanced Java Class Serialization. Serialization – what and why? What? –Translating the contents of an Object to a series of bytes that represent it,
Integration case study Week 8 – Lecture 1. Enrolment request (Workstation) Application server Database server Database New University Student Record System.
Problem Solving #3: JVM ICS Outline Review of Key Topics Review of Key Topics Problem 1 Problem 1 Problem 2 Problem 2 Problem 3 Problem 3 Problem.
ASP.NET Programming with C# and SQL Server First Edition
JokerStars: Online Card Playing William Sanville Milestone 4.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
C++ fundamentals.
Virtual LANs. VLAN introduction VLANs logically segment switched networks based on the functions, project teams, or applications of the organization regardless.
Internet GIS. A vast network connecting computers throughout the world Computers on the Internet are physically connected Computers on the Internet use.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
1 Java Database Connection (JDBC) There are many industrial-strength DBMS's commercially available in the market. Oracle, DB2, and Sybase are just a few.
Confidential Proprietary Click to edit Master text styles Second level Third level Fourth level Fifth level Software Architecture April-10 Click to edit.
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
DNS (Domain Name System) Protocol On the Internet, the DNS associates various sorts of information with domain names. A domain name is a meaningful and.
Dynamic Data Exchanges with the Java Flow Processor Presenter: Scott Bowers Date: April 25, 2007.
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
CSCI 6962: Server-side Design and Programming Web Services.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
1 Java Inheritance. 2 Inheritance On the surface, inheritance is a code re-use issue. –we can extend code that is already written in a manageable manner.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
The Reflection Lucielle Mendez Antonio Bologna.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
REVIEW On Friday we explored Client-Server Applications with Sockets. Servers must create a ServerSocket object on a specific Port #. They then can wait.
Chapter 6 – Connectivity Devices
CS 3131 Introduction to Programming in Java Rich Maclin Computer Science Department.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2008 Pearson Education, Inc., Upper.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
More About Objects and Methods Chapter 5. Outline Programming with Methods Static Methods and Static Variables Designing Methods Overloading Constructors.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
 Problem Definition  Presented by Sushant and Alex Overview of the problem space Scenario Issues Example (plant care example) Discussion conclusion open.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
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.
Object-Oriented Programming © 2013 Goodrich, Tamassia, Goldwasser1Object-Oriented Programming.
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.
Web Services An Introduction Copyright © Curt Hill.
CSCE 314 Programming Languages Reflection Dr. Hyunyoung Lee 1.
Introduction to Databases Angela Clark University of South Alabama.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
E-commerce Architecture Ayşe Başar Bener. Client Server Architecture E-commerce is based on client/ server architecture –Client processes requesting service.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
Application Sharing Bhavesh Amin Casey Miller Casey Miller Ajay Patel Ajay Patel Bhavesh Thakker Bhavesh Thakker.
ODBC, OCCI and JDBC overview
Network Architecture Layered system with alternative abstractions available at a given layer.
Spark Presentation.
CSE 413, Autumn 2002 Programming Languages
Virtual LANs.
Creating a Distributed System with RMI
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
Creating a Distributed System with RMI
Creating a Distributed System with RMI
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
Creating a Distributed System with RMI
Exceptions and networking
Presentation transcript:

1 Design II : Plant Care System Sushant Jain Jong Hee Kang Daniel Lloyd

2 Scenario Buy a plant Buy some sensors/actuators Attach sensors/actuators to the plant Subscribe to a plant care service

3 Picture Network Data Store Service Sensors/ Actuators ID tag Gateway Dashed Line : Short-rage wireless communication(e.g. RF)

4 We’ll talk about Communication Data Store Service

5 Communication How to transfer data from sensor to data store? Packet format URL : pointer to semantics of DATA URLDATA

6 From Sensor to Data Store Sensors broadcast data to nearest node Intermediate nodes add data to the incoming data packet URL1DATA1URL1DATA1URL2DATA2 Intermediate Node Next

7 From Sensor to Data Store temp.com63temp.com63plant.comID:45236temp.com63plant.comID:45236myhome.netroom23 Sensor ID tag(plant) Gateway(in a room)

8 Pros & Cons + Do not need to configure sensors We can attach additional sensors without configuration - How to associate sensor data with a specific object correctly? Plant A may catch Plant B’s data Recursion

9 Alternative Ideas Configure sensors So that they can send the object ID with data Use 3-D location sensing technology for associating data with object

10 Semantics of data Problem: how do you interpret “raw data” from the devices only device manufacturer knows about the data format standard is needed so that services can be built on top of raw data

11 Self describing data Data contains information which can be used to interpret it. Sending code along with data pointer to code(URL) data itself can be a java object(serializable) which implements some standard interface data with a pointer to a service which converts raw data to meaningful object. (rmi)

12 Reflection Create an instance of a class whose name is not known until runtime. Determine the class of an object. Get information about a class's modifiers, fields, methods, constructors, and superclasses. Find out what constants and method declarations belong to an interface. Get and set the value of an object's field, even if the field name is unknown to your program until runtime. Invoke a method on an object, even if the method is not known until runtime.

13 Design choice Data packets with Pointer to code and data URL#rawdata processing data packet locally: reflection based approach remotely: RMI based URL has the information about the path of the class file, name of the class

14 How it happens !! From datapacket:: String classname, String rawdata // may require downloading the class classname Class ctemp = Class.forName(classname) // cache this object ctemp to handle subsequent //packets from that particular sensor Object otemp = ctemp.newInstance(rawdata) Now one can query this object to see what all interfaces it implements, what all functions are available etc….for example otemp may implement interface Temperature

15 Sensors sending Objects Data packets with a java object URL#JavaObject object should be serializable processing data packet use(Object Output Stream, Object Input Stream) readObject, writeObject functions can determine the class of object, (using reflection)

16 pros/cons + Leverages off java reflection capabilities - Locks everything in Java, all data is basically Java objects + devices are dumb, only assumption is the format of data that they send, which is extremely simple - run untrusted code on your machine

17 Standardization/Extensibility Every manufacturer of a particular device implements a standard interface It can extend the interface to provide more functionality Services query the class of an object and can provide enhanced functionality if additional functions are available This allows devices with similar but different capabilities to be used for same service depending upon availability

18 What’s realisitc? We’ve been operating under the assumption that the DataStore knows everything. A Good assumption for thinking about applications. But not a realistic assumption. Typically in a database, you only care about the current value (current model of the world), not how it changes over time.

19 Kinds of single source data Current value Average value Average over what? Last millisecond? Last year? History Sampled how often? Rate of change First derivative? Second derivative?

20 What should the “Data Store” store? Instead of storing everything, store nothing. Data Store serves as a gateway to the data: A DataPort. A DataPort serves as a locus of data, a place where data is channeled to and from.

21 DataPort Sensors Actuators DataPort RF/Network connection

22 What does the DataPort know? The DataPort only knows atomic pieces of information: what the sensors tell it. There is no correlation of information in the DataPort. There are no views supported in the DataPort.

23 ViewPort A ViewPort runs on top of potentially several DataPorts. A ViewPort supports additional Interfaces which build off of the data contained in one or more DataPorts or ViewPorts. Average temperature. Location History

24 ViewPort DataPort ViewPort

25 Interface of DataPort and ViewPort DataPort and ViewPort have the same interface: [ selection method]> Every ViewPort and DataPort contains a list of Interfaces of the objects that they contain or can indirectly retrieve. > returns the set of all interfaces supported by that DataPort or ViewPort.

26 Example  >  {Plant, Temp, Room, etc.}  { … return room.contains(plant.getLocation()) && room.contains(temp.getLocation()); }>  {,,...} Based on these tuples, a ViewPort can create and offer the PlantRoomtemp class.

27 Advantages Flexible Arbitrary selection method. ViewPort can be implemented to support any kind of combination of the data, in anyway. If a DataPort or ViewPort contains a collection that implements a more specific interface, these objects can be used. Can dynamically add ViewPort.

28 Disadvantages Inflexible Locks in Java. Locks in SQL like query language. Difficult to dynamically create ViewPort.