Rudra Dutta CSC 453-001, Fall, 2012 A Simple Sensing Program Structure.

Slides:



Advertisements
Similar presentations
Computer Networks21-1 Chapter 21. Network Layer: Address Mapping, Error Reporting, and Multicasting 21.1 Address Mapping 21.2 ICMP 21.3 IGMP 21.4 ICMPv6.
Advertisements

Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
CCNA – Network Fundamentals
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
BOOTP and DHCP Shivkumar Kalyanaraman Rensselaer Polytechnic Institute
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
Data Networking Fundamentals Unit 7 7/2/ Modified by: Brierley.
Host Configuration: BOOTP and DHCP
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Fundamentals of Python: From First Programs Through Data Structures
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Communicating over the Network Network Fundamentals – Chapter 2.
Ad Hoc Wireless Routing COS 461: Computer Networks
Lecture slides prepared for “Business Data Communications”, 7/e, by William Stallings and Tom Case, Chapter 8 “TCP/IP”.
DHCP for Multi-hop Wireless Ad-Hoc Networks Presented by William List.
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Dynamic Host Configuration Protocol (DHCP)
CN2668 Routers and Switches Kemtis Kunanuraksapong MSIS with Distinction MCTS, MCDST, MCP, A+
1 Lab 3 Transport Layer T.A. Youngjoo Han. 2 Transport Layer  Providing logical communication b/w application processes running on different hosts 
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
TELE202 Lecture 10 Internet Protocols (2) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Internet Protocols (1) »Source: chapter 15 ¥This Lecture »Internet.
Bootstrap and Autoconfiguration (DHCP)
1 Transport Layer Computer Networks. 2 Where are we?
CIS 725 Wireless networks. Low bandwidth High error rates.
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 6 Basic TCP/IP Services.
1 Dynamic Host Configuration Protocol (DHCP) Relates to Lab 7. Module about dynamic assignment of IP addresses with DHCP.
Exploring the Packet Delivery Process Chapter
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
Protocols and the TCP/IP Suite
Examining TCP/IP.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
NUS.SOC.CS2105 Ooi Wei Tsang Application Transport Network Link Physical you are here.
NETWORKING COMPONENTS AN OVERVIEW OF COMMONLY USED HARDWARE Christopher Johnson LTEC 4550.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
Transport Layer: UDP, TCP
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
802.11n Sniffer Design Overview Vladislav Mordohovich Igor Shtarev Luba Brouk.
Lectu re 1 Recap: “Operational” view of Internet r Internet: “network of networks” m Requires sending, receiving of messages r protocols control sending,
Internet Protocols (chapter 18) CSE 3213 Fall 2011.
Networking Basics CCNA 1 Chapter 11.
Understanding IPv6 Slide: 1 Lesson 12 IPv6 Mobility.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
Linux Operations and Administration Chapter Eight Network Communications.
1 Connectivity with ARP and RARP. 2 There needs to be a mapping between the layer 2 and layer 3 addresses (i.e. IP to Ethernet). Mapping should be dynamic.
CS/EE 145A Reliable Transmission over Unreliable Channel II Netlab.caltech.edu/course.
IP Protocol CSE TCP/IP Concepts Connectionless Operation Internetworking involves connectionless operation at the level of the Internet Protocol.
© 2002, Cisco Systems, Inc. All rights reserved..
+ Lecture#2: Ethernet Asma ALOsaimi. + Objectives In this chapter, you will learn to: Describe the operation of the Ethernet sublayers. Identify the major.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Chapter 5. An IP address is simply a series of binary bits (ones and zeros). How many binary bits are used? 32.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Network Layer IP Address.
Communication in Distributed Systems. . The single most important difference between a distributed system and a uniprocessor system is the interprocess.
Dynamic Host Configuration Protocol
Instructor Materials Chapter 8: DHCP
Chapter 9: Transport Layer
ICMP The IP provides unreliable and connectionless datagram delivery. The IP protocol has no error-reporting or error-correcting mechanism. The IP protocol.
Instructor Materials Chapter 9: Transport Layer
Chapter 21 Address Mapping
21-2 ICMP(Internet control message protocol)
BOOTP and DHCP Objectives
Mobile and Wireless Networking
Vidur Nayyar Xueting Wang Weicong Zhao
EEC-484/584 Computer Networks
CS4470 Computer Networking Protocols
A Simple Sensing Program Structure
Mobile IP Outline Homework #4 Solutions Intro to mobile IP Operation
Computer Networks Protocols
Presentation transcript:

Rudra Dutta CSC , Fall, 2012 A Simple Sensing Program Structure

Overview Designing the program on the mobile platform – Brings up issues and representative solutions – Possibly useful in project – Not mandated to be template – not a “standard” Assumes a wireless multihop (mesh) network – Nodes perform routing, forwarding, sensing – Some or all nodes can act as Aps Mobile auxiliary sensing devices (ASD) – Sensor rich, , moderate processing/memory – Flexibly connecting and disconnecting from mesh Copyright Fall 2013, Rudra Dutta, NCSU2

Requirements / Issues Rendezvous – Mobile devices’ presence is transient Context management – Benefits if same device is recognized Sensing Management – Agreeing on frequency of sensing, reporting Timestamping – Cannot assume accurate clock at auxiliary nodes Semantics – Physical quantities corresponding to readings, units – Heterogeneity: Multiple types of sensing devices Robustness – State refresh, soft state Copyright Fall 2013, Rudra Dutta, NCSU3

Big Picture to Design Problem Copyright Fall 2013, Rudra Dutta, NCSU4

Syntax “Wire format” of application layer PDU – Signals – header design – Data – sensed data format in payload – Meta – type of packet, details Common header format – Preamble – application specific distinct pattern – Action code – type of packet, interpretation of rest of packet – ID – identity of ASD (from / to) Copyright Fall 2013, Rudra Dutta, NCSU5 PreambleAction CodeID CodeMeaning 0Rendezvous request 1Rendezvous reply 2Req. capabilities 3Reply capabilities 4Set requirements list 5Reporting sensed data 6Sensed data ACK ……

Rendezvous Auxiliary Sensing device’s presence is transient Rendezvous with AP when close MAC / IP : Inbuilt into protocol – Entry to network of AP, IP address by DHCP Application level rendezvous – Periodic beacons from Server, optionally – Periodic broadcasts for discover from ASD Client, when ready to connect – Subnet broadcast at IP level, but specific UDP port – Reply is unicast, completing application layer association Copyright Fall 2013, Rudra Dutta, NCSU6

Rendezvous Auxiliary Sensing device’s presence is transient Does ASD perform sensing while disconnected? – May be useful in many cases; mobility trace etc. that can be post-analyzed – Less useful for managed sensing systems ASD requires local auxiliary storage Copyright Fall 2013, Rudra Dutta, NCSU7 Server Comm Client Sensor Mgr

Context Management ASDs may connect and disconnect multiple times, to multiple servers (APs) Recognizing previously encountered ones can be beneficial – May be able to “connect” space-time differentiated sensor readings (location, mobility) – May help in calibration, self-calibration Simple approach: ASD puts ID (if assigned) in rendezvous packet, Server assigns in reply – Allows continuity of readings without PII, supports heterogeneity Copyright Fall 2013, Rudra Dutta, NCSU8 PreambleAction CodeID PreambleAction CodeID

Sensor Management ASDs may connect and disconnect multiple times, to multiple servers Different servers may have different ability/requirement to serve multiple clients Must be capable of telling the client to report at a certain frequency Reasonable to piggyback on the rendezvous interaction – Or use a general-purpose SET message (later) Copyright Fall 2013, Rudra Dutta, NCSU9 PreambleAction CodeID PreambleAction CodeIDRep. Freq.

Distributed Server Copyright Fall 2013, Rudra Dutta, NCSU10 To utilize the distributed nature of the mesh, server must run as distributed coordinated process Human user / controlling application at one node (may or may not be mesh node) – Commands issued at any mesh node should reach any and all ASDs – Sensor readings reported to any mesh node should be available at central database May not be necessary for simple applications

Timestamping Each ASD keeps its own clock – Not guaranteed to be very accurate Stores sensor readings with timestamps by local time – When reporting to Server, includes a “reporting timestamp” Server is expected to maintain accurate clock – Synchronized across the mesh – Can calibrate/update ASD timestamps by comparing time at server with ASD reporting time Copyright Fall 2013, Rudra Dutta, NCSU11

Semantics Further sensing management tasks – Not all sensor readings may be “needed” by server at all times – Sensor readings need not be collected unnecessarily – ASDs are heterogeneous – not all have similar sensing capability Must be able to exchange information about sensing capabilities – “Sensed quantity” – “Representation” Code values in application logic – or config file – Similar to action code Copyright Fall 2013, Rudra Dutta, NCSU12

Sensing Management (SET) After rendezvous, interaction to setup recurrent sensing – Client sends capabilities with every heartbeat (see next) – Server sets requirements “SET” actions have soft state (decay over time) – May also set reporting frequency Copyright Fall 2013, Rudra Dutta, NCSU13 PreambleAction CodeIDQuantityRepresentationMax Sns. Freq. PreambleAction CodeIDQuantitySens. Freq. PreambleAction CodeID (Multiple instances) Seq. Nbr. Rep. Freq.

State Maintenance (HeartBeat) ASD sends periodic “I am alive” messages to server – Possibly broadcast Reasonable to include capabilities of sensor, ID if available Copyright Fall 2013, Rudra Dutta, NCSU14 PreambleAction CodeIDQuantityRepresentationMax Sns. Freq. (Multiple instances)

Sensing Reporting Client maintains timer(s), collects sensor readings Client maintains reporting timer, transmits sensor readings Server transmits acknowledgement Copyright Fall 2013, Rudra Dutta, NCSU15 PreambleAction CodeID PreambleAction CodeID QuantityRepresentationReadingTimestampRep. Time (Multiple instances) Seq. Nbr.

ASD Program Design Multi-thread implementation possible – One thread for each sensor – block on timer – One thread for server communication – block on read – One thread for transmitting – block on timer Issues of concurrence – Different threads wake up at different times – May be “simultaneous” – Global memory to communicate state – Behavior of server communication thread unpredictable More demanding of platform capabilities Copyright Fall 2013, Rudra Dutta, NCSU16

ASD Multi-thread Design Copyright Fall 2013, Rudra Dutta, NCSU17 Idle On Tx Timer If buffer not empty Broadcast one packet On Rx If SET for this ASD, fresh Change settings Record sequence # If ACK Purge packet from buffer On Sensor 1 Timer Read Sensor 1, buffer On Heartbeat Timer Broadcast capabilities, ID, time, sequence number

ASD Single-thread Design Merge “idle” states into a single one Merge timers into a single one with variable alarm period Copyright Fall 2013, Rudra Dutta, NCSU18 Idle On Tx Timer OR Flag is UP If buffer not empty Broadcast one packet On Heartbeat Timer Broadcast capabilities, ID, time, sequence number RX ACK for measurement Discard top measurement Flag  UP On Measurement Timer Take readings and buffer Flag  UP RX SET If SET is for this ASD, new SEQ # Broadcast ACK/NACK Do SET action (change setting) Record SEQ #

ASD Single-thread Program Flow Copyright Fall 2013, Rudra Dutta, NCSU19 x  min (NxtTimes)-t Block Receive with x second timeout Rx Discard top measurement Flag  UP Broadcast ACK / NACK Take SET action Record SEQ # t > NxtMeasureme nt Time? t > NxtTx Time OR Flag UP ? If buffer not empty broadcast one packet NxtTxTime += TxTimer Take readings and buffer Flag  UP NxtMeasurementTime += MeasurementTimer t > NxtHeartBeat Time? YES NO Fresh SET for this ASDACK Timeout Broadcast capabilities, ID, time, sequence number NxtHeartBeatTime += HBTimer YES NO Other

Server Program Design Copyright Fall 2013, Rudra Dutta, NCSU20 Idle RX Measurement from Client (From ASD) Broadcast ACK (WiFi) Take Measurement Action RX Heartbeat Timer (From ASD) Process Heartbeat RX User SET Command Buffer SET command to be sent to all ASDs On ClientSETTxTimer For each SET in the the SETbuffer If entry expired then remove it else broadcast it (to ASDs) On ServerSETTxTimer For each SET in the the SETbuffer If entry expired then remove it elseif Originating=TRUE then Bcast to all other mesh nodes RX ClientSETACK (from ASD) Broadcast SETACK to all mesh nodes RX SETACK (from Mesh Nodes) Remove SET from SETBuffer RX SET (from other Mesh Node) Buffer SET command to be sent to sensor node(s) Buffer SET command to be sent to all other mesh nodes and the ASDs Set Originating=TRUE Remove SET from buffer

Summary Even simple system requires some design Semantics and client-server management need to be designed Sits on top of networking and communication semantics Copyright Fall 2013, Rudra Dutta, NCSU21