15829B18849B95811A19729A InternetScale Sensor Systems: Design and Policy - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

15829B18849B95811A19729A InternetScale Sensor Systems: Design and Policy

Description:

Code accessible via CVS. What is CVS version control system ... Anonymous CVS can't check in code. Lecture 3. 4. 01-21-03. Mailing-lists. Class members ... – PowerPoint PPT presentation

Number of Views:125
Avg rating:3.0/5.0
Slides: 41
Provided by: Sri698
Category:

less

Transcript and Presenter's Notes

Title: 15829B18849B95811A19729A InternetScale Sensor Systems: Design and Policy


1
15-829B/18-849B/95-811A/19-729AInternet-Scale
Sensor Systems Design and Policy
  • Lecture 3 Code Overview Project Ideas

2
Outline
  • Code Overview
  • Project Ideas

3
Code Availability
  • http//www.intel-iris.net
  • Code accessible via CVS
  • What is CVS ? version control system
  • Useful for group access to source code
  • Multiple people can edit the same file but
    conflicts may occur
  • Anonymous CVS ? cant check in code

4
Mailing-lists
  • Class members
  • irisnet-course_at_intel-iris.net
  • Iriscode developers
  • irisdev_at_intel-iris.net
  • Managed by majordomo_at_intel-iris.net

5
Using Laptop
  • Laptop setup
  • irisnet and root account ? passwords irisnet
  • Feel free to customize account but dont change
    password
  • IrisNet source code checked out in
    irisnet/IRISNET
  • Redhat 8.0
  • Boot with camera attached
  • Say configure at all the configuration prompts
  • Log in as irisnet
  • Start X server
  • Network configuration
  • System settings ? network
  • Add ? wireless ? lucent ? SSID CMU
  • Activate
  • Start browser with outside CMU URL ? register
    wireless

6
Building IrisNet
  • cd IRISNET
  • export CVS_RSHssh
  • cvs login
  • password anonymous
  • cvs up -d -P
  • ./install
  • Should build without error
  • Try test suite
  • cd /IRISNET/TestSuite ./testall.sh

7
Components
  • SA
  • C-based
  • Base SA code
  • OpenCV
  • CamStream webcam viewer
  • OA
  • Java-based
  • Base OA code
  • Apache Xindice XML database
  • Logger
  • NAM network simulation animator
  • Applications

8
SA Architecture
Sensor Feed
Senselet
Senselet
Shared Memory
Network
Senselet
SA Daemon
9
SA Sensor Feed
  • Read from sensor and place info in shared memory
  • One process per sensor
  • Sensor readings are stored in circular buffer
  • Provides access to historical measurements as
    space permits

10
SA Starting the Sensor Feed
  • cd SA/IrisWebcam
  • ./runwebcam.sh to use real camera
  • ./loadImage to load one image
  • ./loadImage images/pX.jpg 75
  • X number of full spots 0..6
  • 75 shared memory key for IrisNet
  • ./loadImages to cycle through files in images
    subdir
  • ./showImage shows the current image

11
SA CamStream
  • CamStream provides an interface to webcams and a
    bunch of useful tools
  • E.g., webcam capture/record
  • Needs gcc 2.95 (not installed on laptops) to
    compile completely
  • Gcc 3.2 only compiles the few libraries critical
    to IrisNet

12
SA Senselet
  • Senselet
  • One senselet per sensor service
  • Each senselet runs as a separate process
  • Senselet typically does
  • 1) take sensor data from shared memory
  • 2) processes data to produce result
  • 3) Transmits result to configured OA
  • 4) Results may be stored back in shared memory

13
SA Running Senselet
  • ./SAControl 127.0.0.1 3456 S 127.0.0.1 6789
    parking executes parking detection senselet
  • Need to first run Util/Portsink/portsink 6789
    to discard data
  • Can load new images to see changes in result
  • Can use similar technique to test your code for
    mini-project

14
SA Example Senselet
  • cd Applications/parking/SA
  • parking.cc contains parking space senselet
  • Main function called Start(FilterParameter param)
  • Typical structure of main function
  • Open shared memory
  • cvCreateImageHeader and cvSetImageData calls
    retrieve video image
  • openCV calls to process image data
  • Send data to the OA

15
SA SA Daemon
  • Manages the execution of senselets
  • Accepts commands from OAs to start/stop execution
  • Text-based command protocol (port 3456)
  • L name
  • uploads the code for a senselet and places it in
    filesystem
  • S
  • starts execution of a senselet and transmits
    output to specified OA
  • U
  • stop execution of a senselet

16
SA SA Daemon
  • Starting
  • cd SA/IrisSA/src
  • ./runsa
  • Controlling
  • Normally controlled by OAs
  • cd Util/SAControl
  • ./SAControl to manually send commands

17
OA - Architecture
Xindice
OA Daemon
Network
18
OA Xindice
  • What does it do?
  • Local XML database engine
  • Stores XML documents, handles Xpath 1.0 (mostly
    select and update)
  • Interfaces
  • Command line ? enter Xpath
  • Java API
  • What doesnt it do well
  • Xquery, XSLT
  • XSLT processing ? done in separate Java library
  • Image storage
  • How do we use it
  • Each service has a single XML document that
    stores sensor readings and static metadata

19
OA Starting Xindice
  • cd packages/xml-xindice-1.0
  • ./xindice.server start
  • Make sure that config/xindice.pid does not exist
  • export XINDICE_HOMEpwd
  • cd packages/xml-xindice-1.0/bin
  • Run ./xinidiceadmin to control database

20
OA OA Daemon
  • Listens on port 6789
  • Handles processing/forwarding of queries
  • Uses XSLT to query Xindice database
  • Manages partitioning of database across nodes
  • DNS entries
  • Reaction to load

21
OA OA Daemon Messages
  • Query query
  • Process the XPath query, id identifies source
    query made at root, fragment identifies this
    particular subquery
  • Reply
  • Answer to a query
  • Take ownership
  • Start a new OA
  • Delegate ownership query
  • Split an OA
  • Delete database
  • Load data from SA
  • Used by SAs to add to database
  • Update DNS
  • Use dynamic DNS

22
OA OA Daemon
  • Running
  • cd OA/IrisOA
  • Edit oa.cfg if needed
  • make run
  • Controlling
  • make runcl
  • Type help to see interface
  • Running a Service
  • cd Applications/parking/OA
  • Look at demodataone.xml
  • Follow handout instructions to load xml document

23
Logging
  • What are the OAs/SAs doing?
  • Log all messages ? currently uses a central
    server
  • Challenge how to order and playback log messages
  • Lamport clocks to ensure causal order
  • ns-2 network animator (nam) used to playback log
  • What is nam?

24
Logging
  • Running the logger
  • cd logger/IrisLogger/src
  • runnam.sh
  • Running NAM
  • cd logger/nam-1.0a11a_iris
  • ./nam ../IrisLogger/src/logfile.6
  • Currently logging must be carefully tuned to the
    application ? manual steps involved
  • Name and layout of nodes in animation
  • Conversion of logfile node names to nam nodes
    identifiers

25
Outline
  • Code Overview
  • Project Ideas

26
Projects
  • 2 or 3-person groups
  • IrisNet-based
  • Mini-project provides intro to IrisNet
  • Expectations
  • 10 page report presentation
  • Workshop quality results
  • Project ideas
  • Will be posted on Web pages

27
Projects (cont.)
  • Generous donation from Intel
  • 20 laptops cameras
  • 10 desktops
  • Each project group will receive 2 laptops and 3
    cameras
  • Handed out TODAY in CMCL lab 3604 Wean Hall
  • Only to enrolled students, other students will
    need to wait
  • No replacements take good care of them
  • No grade until you return them in good condition!
  • Interesting deadlines
  • Sensys Apr 8th
  • Mobicom workshops June middle

28
Applications Monitoring Interesting Places
  • At lunch places
  • At grad lounge foosball table
  • NSH Atrium
  • Find me a free conference rooms
  • Tennis/raquetball/etc. court avail
  • Desk area/terminal room availability
  • Car theft monitor
  • Call/email owner if thief is near car!
  • Traffic monitoring
  • Auto traffic (traffic jams)
  • Throughput of area (cars, people) - speed trap

29
Applications Object Tracking
  • Person tracking
  • Where did my child/pet go
  • Advisor/advisee avoidance
  • Location of my/someone else's car
  • Inventory control

30
Other Service Types
  • Audio sensor-based applications
  • Identify language spoken
  • Identify individual based on voice
  • Triggered sensor applications
  • Record picture when car horn is heard
  • Network monitoring as an IrisNet application
  • Intrusion detection system

31
Other Service Types Environment Modeling
  • Smart room support
  • 3d positioning based on multiple sensors
  • Virtual reality tour
  • Take the sensor input to create parts of a
    virtual reality
  • Weather monitoring

32
Applications General Challenges
  • Image processing
  • How do you identify objects of interest?
  • Person/object counting techniques
  • Motion detection based
  • Identifying the same object in different views
  • Handoff of tracking data from one sensor to next

33
Applications General Challenges
  • Privacy issues
  • Access control to OA database
  • How does a person opt out of a surveillance
  • Query processing
  • What type of data schema for sensor readings?
  • How are historic queries handled
  • Data mining
  • Long term trends e.g., in parking space
    availability or waiting lines

34
Infrastructure
  • Incorporating new sensor types in IrisNet
    infrastructure
  • Sensor motes how do you modify the SA
    programming model to accommodate motes?
  • Others mobile sensors, public webcams, smart
    camera phones
  • Making IrisNet infrastructure robust to failures
  • Replicating part of database
  • How to handle dynamic vs. static parts of
    database
  • Handling failures in routing of queries e.g.,
    due to caching?
  • Distributed monitoring of system and on-demand
    collection of logs

35
Infrastructure Energy Constraints
  • Power management for local processing, e.g., how
    accurately can we predict energy consumption?
  • What is the energy tradeoff between local
    processing of data vs. sending the data to do
    remote processing?
  • Running a CPU, a sensor device, or a
    communication device in sleep mode can save
    energy considerably. An approach for saving power
    is thus to operate our devices mostly in sleep
    mode, and have them turn on periodically.
  • How much accuracy does our sensor data
    loosegiven some duty cycle?
  • Can we find more intelligent scheduling
    algorithms than simply uniform duty cycles (on
    during 100ms each second)?
  • What about using low-energy sensors to schedule
    morepower-hungry sensors?

36
Infrastructure
  • Location-based services
  • How could we incorporate location-specific
    information in our sensors?
  • How could we establish or verify the location of
    a sensor?
  • Using video landmarks
  • Image Processing
  • Can we anonymize raw sensor feed e.g., by
    blurring people in image

37
Infrastructure Policy/Security
  • How can a user ensure that a video feed has not
    been misused?
  • E.g., monitor the output XML, perform test
    queries on system
  • Assuming an open environment (i.e., no central
    certificate authority everybody trusts), how can
    we establish trust between unrelated entities?
  • How do we ensure that sensor data we receive is
    trustworthy and originates from the correct
    sensor?
  • If anyone can make queries/program sensors, how
    do we protect the system from a denial-of-service
    attack?

38
Infrastructure
  • DNS
  • Performance evaluation
  • DHTs as an alternative
  • Code safety and resource allocation on SAs/OAs
  • How are services protected from each other
  • How are nodes protected from malicious services
    that consume resources
  • Storage use on SAs
  • Support for historic sensor reading retrieval
  • Impact on result sharing

39
Infrastructure
  • Push vs. Pull of data
  • Impact on monitoring of failed nodes
  • Impact on caching/response time for queries
  • Handling aggregate fields in OA database

40
Next Lecture
  • Image processing
  • OpenCV library
  • Assigned reading
  • TBA
Write a Comment
User Comments (0)
About PowerShow.com