April 20, 2011 CSS Faculty Research Talk 1
Sensor Grid IntegrationAn Agent-Based Workbench for On-the-Fly Sensor-Data Analysis
Munehiro Fukuda, Ph.D.Distributed Systems Laboratory, Computing & Software Systems University of Washington Bothell
April 20, 2011 CSS Faculty Research Talk 2
Parallel Computing Opportunities Computation-intensive opportunities using live data
1. Agriculture - frost protectionQ: How would you predict air temperature at each point of orchards for the
next 4, 8, and 12 hours, based on past/current temperature data?A: Air temperature interpolation and prediction
2. Content-based video/image analysisQ: How would you instantly find harvestable trees and empty parking
spots, based on remote video/image data? A: Parallel color-based video/image-content analysis
3. Driving-time estimationQ: How would you accurately estimate your driving time when caught in a
traffic jam?A: Real-time traffic simulation
April 20, 2011 CSS Faculty Research Talk 3
Hurdles to Parallelization From user perspective:
Yet far reaches of computing power1. Grid/Cloud yet incapable of facilitating tailor-made parallel
computation for individual-provided real-time data2. Manual set-up between computation (multi-core PCs) and
peripheral I/Os (sensors and cells) at an individual level
From developer perspective: Strong allergy to parallel computing
1. Steep learning curve of the concept and usage regarding multi-processes and threads
2. Difficulty in enforcing proper synchronization
April 20, 2011 CSS Faculty Research Talk 4
3. Elastic Data Channels
An Architecture for On-the-Fly Sensor-Data Analysis
water level sensors
temperature sensors
Cluster A
Cluster B
Storage X Y Z
User 1
User 2
wave model
heat model
1. Field-based resource allocation
2. Multi-Agent Spatial Simulation
April 20, 2011 CSS Faculty Research Talk 5
Research Contribution Field-based process dispatch and migration
Bottom-up self-organizing resource advertisement
Top-down self-adapting resource acquirement
Nomadic-process tracking and broken-link recovery
Multi-process, multithreaded library for multi-agent spatial simulation
No awareness of processes, threads, and race conditions
Dynamic load balancing
Dynamic computation scale-up and down
Delivery of sensor-data and computation outputs
Stream-oriented file-based delivery to nomadic computation
Graphical outputs to mobile users
April 20, 2011 CSS Faculty Research Talk 6
Field-Based Process Dispatch & Migration Self-Adapting and Self-Organizing Approaches
UW BothellInternet
Applications
Bottom-up self-organizing computation-resource potential field
Top-down self-adapting resource allocation
Shizuoka University
April 20, 2011 CSS Faculty Research Talk 7
network segment B network segment Cnetwork segment A
computingnode
tcplink/udp_relaybricks
tcplink/udp_relaynode
tcplink/udp_relaynode
vlink
vlink
vlink
potential fieldagent
migration
sentinelagent
rank 0 2 31
Layer 0: Hardware
Layer 1: TCP-link-assisted UDP-broadcast space
Layer 2: UWAgentsdaemondaemon
Layer 3: Computing-Resource Potential Field
Layer 4: Sentinel Agents
Layer 5: Applications (MPI, MASS)
AgentTeamwork-Lite
April 20, 2011 CSS Faculty Research Talk 8
MASS: Library for Multi-Agent Spatial SimulationExecution Model
April 20, 2011 CSS Faculty Research Talk 9
1. import MASS.*; // Library for Multi-Agent Spatial Data Analysis and Simulation 2. import java.util.Vector; // for Vector 3. 4. public class TemperatureAnalysis { 5. public static void main( String[] args ) { 6. // validate the arguments 7. int size = Integer.parseInt( args[0] ); 8. int nFlows = Integer.parseInt( args[1] ); 9. int maxTime = Integer.parseInt( args[2] ); 10. 11. MASS.init( args ); // start MASS 12. 13. // create a virtual orchard in a distributed array. 14. Places orchard = new Places( 1, ”Orchard", null, size, size ); 15. // populate agents that behave as airflows over the orchard. 16. Agents airflows = new Agents( 2, ”AirFlow", null, orchard, nFlows); 17. 18. // define the four neighbors of each cell 19. Vector<int> neighbors = new Vector<int>( ); 20. int[] north = { 0, -1 }; neighbors.add( north ); 21. int[] east = { 1, 0 }; neighbors.add( east ); 22. int[] south = { 0, 1 }; neighbors.add( south ); 23. int[] west = { -1, 0 }; neighbors.add( west ); 24. 25. // now go into a cyclic analysis 26. for ( int time = 0; time < maxTime; time++ ) { 27. // exchange temperature and estimate new temperature 28. orchard.exchangeAll( 1, Orchard.exchange, neighbors ); 29. orchard.callAll( Orchard.update ); 30. 31. // move airflows to a neighbor if necessary 32. airflows.callAll( Airflow.decideNewPosition ); 33. airflows.manageAll( ); 34. } 35. MASS.finish( ); // finish MASS 36. } 37. }
MASS Programming Style
April 20, 2011 CSS Faculty Research Talk 10
rank 0 2 31
Major underlying network protocols converted to FileInput/OutputStream System.in/out/err and Graphics forwarded to a remote user Connection resumed upon a job migration
WiFi sensor network
418/900MHz sensor network
Access point
Sink point
cluster
SNMT/UDP BroadcastFileInput/OutpuStream
SSH Tunnel
SSH Tunnel
FileInput/OutputStream
Storage
User
HTTP client
HTTP server
Sensor server (FTP)
SFTP ServerSFTP Client
SSH Tunnel stdin, stdout, and X
SSH Tunnel
Connectors: Flexible Data Cannel
FileInput/OutpuStream
System.in/out/errGraphics
FTP Client
rank 0 2 31Job migration
April 20, 2011 CSS Faculty Research Talk 11
Programming with Connectors
FTP Server
sensor1
Access point
SNMT/UDP Broadcast
Sensor Server
sensor2
April 20, 2011 CSS Faculty Research Talk 12
Application 1Temperature Analysis
temperature sensor network
Sink point
Step 1 (estimating current spatial state):Interpolating temperatures with
- inverse distance weighting (http://en.wikipedia.org/wiki/Inverse_distance_weighting)
- polynomial regression (http://www.kdkeys.net/)
Step 2 (predicting future spatial state):Simulating heat propagation with heat equation (Dr. Terrel: http://www.math.cornell.edu/~bterrell/free.html)
orPredicting temperature with artificial neural network (Smith, McClendon, Hoogenboom: Improving Air Temperature Prediction with Artificial Neural Networks, Int’l Journal of Computational Intelligence Vol3 No3)
April 20, 2011 CSS Faculty Research Talk 13
Application 2Traffic Simulation
Webcam netwrok
HTTP server
Step 1 (retrieving current traffic state):Initializing a traffic simulation with web-cam/real-time GIS dataas well as receiving a travel itinerary
Step 2 (estimating travel time):Calculating accurate travel time from traffic simulation(Multi-Agent Transport Simulation Toolkit, http://matsim.org/)
DB servers
Userstart
goal
start
goal
45 minutes
Note: these two graphics are snapshots of MATSIM execution.
April 20, 2011 CSS Faculty Research Talk 14
Application 3Color-Based Video/Image Analysis
Web cam network
Sink point
Step 1 (analyzing photos in color):Analyzing each photo with Mansell color system(Dr. Kiyoki and Dr. Kurabayashi: http://www.mdbl.sfc.keio.ac.jp)
Step 2 (sorting them):Based on matching counts of Mansell color patterns
…
1 2 3 …
April 20, 2011 CSS Faculty Research Talk 15
Group Members
Tim Clapp CSS497: Porting Java Grande Benchmark to MASS and measuring the MASS performance
April 20, 2011 CSS Faculty Research Talk 16
Research Items to Be Done1. AgentTeamwork-Lite
Job deployment/migration policies: rate-based, history-based, job-duration-based, etc. Job check-pointing: user-initiated, system-initiated, check-pointing frequency, etc.
2. MASS Library Different platforms: multi-process, multithreaded, and Java/C++-based versions Dynamic load balancing: changing node boundary and #nodes engaged in
computation Performance evaluation: using benchmark programs and applications
3. Connector Stream-based channels from sensors through cloud jobs to a user laptop. Channel hand off to nomadic jobs and mobile users Sensor data presentation (from raw text data to XMLs)
4. Applications Temperature prediction: artificial neural network, empirically-obtained formulae, and
graphical outputs Traffic simulation: MatSim (partially working) Video/image analysis: color-based content analysis, etc. Programmability and performance evaluation
April 20, 2011 CSS Faculty Research Talk 17
Correlation between Coursework and Research
Research projects CSS434 CSS534
AgentTeamwork-Lite HW3: RMI v.s. mobile agents
Week 10: Grid Computing
Week 7: Job Management
Week 8: File Management
Week 9: Fault Tolerance
MASS Library Week 5: OS Supports Week 1-2: OpenMP
Week 3-4: MPI
Week 4-5: Paradigm Oriented Programming
Connector HW1: Chat server Week 9: Fault Tolerance
(CSS543: Sockets)
Applications HW2: MPI Java programs HW1: TSP
HW2: Molecular Dynamics
HW3: Inverted Indexes
Week 6: Parallel Programming Patterns
April 20, 2011 CSS Faculty Research Talk 18
Keys to Success Targeting sensor networks in practical use
Collaboration with Mr. Eliot, Valhalla-Wireless and Mr. Doornink, WA State Tree Fruit Research Commission
Receiving proper and timely inputs from sensor-network specialists
Collaboration with at other universities: Shizuoka and Keio
Getting funded
NSF CSR core program
UW Business Plan Competition with AgComm and UWS MBAAdvanced to Investment Round on April 27 at the Bell Harbor International Conference Center in downtown Seattle.
Waiting for hopefully good news