If You Build It, They Will Come: The SNBENCH Architecture - PowerPoint PPT Presentation

About This Presentation
Title:

If You Build It, They Will Come: The SNBENCH Architecture

Description:

http://www.cs.bu.edu/groups/wing/ Web and InterNetworking Group. If You Build It, They Will Come: ... A common space equipped with video sensors (VS) for ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 41
Provided by: AdamDB
Learn more at: http://csr.bu.edu
Category:

less

Transcript and Presenter's Notes

Title: If You Build It, They Will Come: The SNBENCH Architecture


1
If You Build It, They Will ComeThe SNBENCH
Architecture
  • Adam BradleyAzer Bestavros Michael Long
  • Computer Science Department
  • Boston University

2
Before we begin
  • Welcome
  • To
  • Summer!

3
Sensorium Infrastructure _at_ BU
Sensorium A common space equipped with video
sensors (VS) for ubiquitous recognition and
tracking of activities therein
  • Infrastructure
  • Range of VS Elements
  • Programmable VS Network
  • Backend compute engines
  • Backend TByte storage
  • Mobile/wireless query units
  • Research Engineer

4
snBench
  • The Sensorium is the computer
  • Design/implement the programming and run-time
    infrastructure necessary for developers to
    specify and deploy truly distributed applications
    over a heterogeneous network of Sensing Elements
    (SEs) and Computing Elements (CEs)

What sensors could I use and what functionality
do I get from them?
5
snBench Goals
  • Write Once, Run Wherever
  • Dont program nodes Program the network!
  • Start with building blocks
  • Sensors
  • Stock algorithms (edge detect, face count, FFT)
  • Dynamic modules (novel algorithms)
  • Glue together with high-level language
  • Conditionals, loops, functions
  • Pretend the network isnt there
  • Single System Image Programming Paradigm

6
snBench Programming Cycle
  • Program
  • Program specified by gluing together building
    blocks using SNAFU language
  • Compile
  • SNAFU program is compiled to produce a plan of
    execution expressed in STEP
  • Map and Link
  • Service Dispatcher decomposes STEP plans into
    smaller linked dispatch-able STEPs
  • Load and Execute
  • STEP plans are dispatched (i.e., loaded) into
    SXE execution environments

7
SNAFU SNet Apps as FUnctions!
  • Functional specification language
  • e.g., identify the face seen through camera 1

identify(facefind(snapshot(cam1)))
8
SNAFU SNet Apps as FUnctions!
  • Use annotative functions for constraints
  • e.g., minimum acceptable resolution
  • e.g., what streams can be exposed

facecount(resn(800x600x24b,snapshot(cam1)))
public(facecount(snapshot(private(cam1)))))
9
SNAFU SNet Apps as FUnctions!
  • Events in time captured by triggers
  • e.g., motion detected at night triggers email

email(security_at_bu.edu, trigger(
(motion(snapshot(cam2)) (2amltNOWlt4am)),
snapshot(cam2)))
10
SNAFU SNet Apps as FUnctions!
  • Three trigger types
  • trigger(p,a) Wait until p
  • do / no-op / until (p) a
  • level_trigger(p,a) Whenever p
  • while (true) if (p) a
  • edge_trigger Whenever p becomes true
  • while (true) if (p) a while (p)
  • Value of trigger is value of as evaluation
  • Level and edge triggers produce streams
  • a.k.a. persistent queries living in network

11
SNAFU SNet Apps as FUnctions!
  • Trigger QoS (Scheduling annotations)

period(100ms, level_trigger(f(cam1), g(cam1)))
12
SNAFU SNet Apps as FUnctions!
  • Retrieving values from triggers
  • Non-blocking read - Last result
  • Blocking read - Wait for next result
  • Fresh read - Wait for a from scratch result
  • Recursion
  • LAST_TRIGGER_EVALUATION term
  • Last value produced by innermost(?) trigger term
  • Not sure what to call it head recursion ?

13
STEP Sensorium Typed Exec Plan
Instruction Set Architecture is a DAG
email
edge_trigger
security_at_bu.edu
email(security_at_bu.edu, edge_trigger(
(motion(snapshot(cam2)) (2amltNOWlt4am)),
snapshot(cam2)))

motion
lt
lt
snapshot
clock
4am
2am
cam2
14
STEP Sensorium Typed Exec Plan
  • Notes
  • Evaluation percolates up from leaf nodes toward
    roots.
  • Sensor nodes provide fresh data at all times.
  • Function nodes evaluate once then disable
    themselves.
  • Trigger nodes can re-enable children for
    re-evaluation.

email
edge_trigger
security_at_bu.edu

motion
lt
lt
snapshot
clock
4am
2am
cam2
15
snBench Runtime Setting
  • SNAFU-to-STEP compiler
  • SXE Sensorium eXecution Environment
  • SD Service Dispatcher

SXE
SXE
SXE
SD, SXE
SXE
SXE
SXE
Compiler, Web Browser, SXE(?)
16
Map, Link, and Dispatch
email
SXE
edge_trigger
security_at_bu.edu

SXE
motion
lt
lt
snapshot
clock
4AM
2AM
SXE
cam2
17
Map, Link, and Dispatch
email
SXE
edge_trigger
security_at_bu.edu
SXE
SXE
18
Why snBench?
  • A Sensorium Research Catalyst
  • Extrinsic research
  • Accessible framework for developing distributed
    sensing applications in heterogeneous networks
  • Intrinsic research
  • Languages, type systems, compilers, graph
    algorithms, schedulers, QoS engines, naming, etc.
    to make the framework efficient/useful/flexible
  • Supporting research
  • System context, supporting middleware/services

19
Extrinsic Research
  • Flexible substrate for experimenting with
    distributed sensor applications
  • Extensible w/ new algorithms (opcodes)
  • Trade some speed for versatility and easy
    re-programmability/re-tasking
  • Abstracts away the network
  • Vision researchers dont need to understand
    communication protocols, RT schedulers, network
    resource reservation, etc.

20
Extrinsic Research Sensorium Target Applications
  • Assistive Environments
  • e.g. for home/hospice/elder care/
  • Safety Monitoring
  • e.g. in factories/daycare/garages/subways
  • Intelligent Spaces
  • e.g. for classrooms/meeting rooms/theaters/farms
  • Secure Facilities and Homeland Security Uses
  • e.g. at airports/embassies/prisons/CS labs/
  • People Flow/Activity Studies
  • e.g. at malls/interstates/

21
Intrinsic/Extrinsic Research
  • Why limit ourselves to passive
    sensing?Control actuators with snBench programs!
  • Multi-DOF Cameras
  • Mobile Sensors
  • Robots
  • Control theory issues

22
Intrinsic Research
  • Scheduling/Linking/Binding
  • How did we arrive at this partitioning?
  • How did we arrive at these assignments?

23
Scheduling Processing Capacity
Load averages? Busy rate? STEP nodes/s? Realtime
scheduler?
SXE
?
SXE
SXE
SXE
24
Scheduling Network Capacity
8Mb/s95
SXE
?
100Mb/s40
SXE
100Mb/s10
100Mb/s20
512kb/s75
SXE
SXE
25
Scheduling Code Presence
motion
email
empty
empty
delta
facefind
bodytrack
email
SXE
motion
oflow
delta
empty
?
SXE
snapshot
delta
SXE
SXE
26
Intrinsic Research
  • Scheduling Constrained Graph embedding
    and optimization!

motion
email
empty
empty
delta
facefind
bodytrack
email
8Mb/s60
SXE
?
motion
oflow
delta
empty
100Mb/s40
SXE
100Mb/s10
100Mb/s20
snapshot
delta
512kb/s75
SXE
SXE
27
More Scheduling
  • Multiple simultaneous programs may share STEP
    sub-graphs

email(security_at_bu.edu, block(
edge_trigger(motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2)))
trigger( facerecognizer( block(
edge_trigger(motion(snapshot(cam2))
(2amltNOWlt4am),
snapshot(cam2))), facelibrary(Adam
Bradley)), email(adams.wife_at_gmail.com, Hes
working late again.))
28
More Scheduling CSE
  • Common Subexpression/Subgraph Elimination

email(security_at_bu.edu, block(
edge_trigger(motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2)))
trigger( facerecognizer( block(
edge_trigger( motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2))),
facelibrary(Adam Bradley)),
email(adams.wife_at_gmail.com, Hes working late
again.))
29
More Scheduling CSE
  • Common Subexpression/Subgraph Elimination

email(security_at_bu.edu, block(
edge_trigger(motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2)))
Common Subgraph
trigger( facerecognizer( block(
edge_trigger( motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2))),
facelibrary(Adam Bradley)),
email(adams.wife_at_gmail.com, Hes working late
again.))
30
More Scheduling CSE
Common Subexpression/Subgraph Elimination
email(security_at_bu.edu, block(
edge_trigger(motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2)))
trigger( facerecognizer( block(
edge_trigger( motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2))),
facelibrary(Adam Bradley)),
email(adams.wife_at_gmail.com, Hes working late
again.))
31
More Scheduling CSE
Common Subexpression/Subgraph Elimination
email(security_at_bu.edu, block(
edge_trigger(motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2)))
SXE
SXE
trigger( facerecognizer( block(
edge_trigger( motion(snapshot(cam2))
(2amltNOWlt4am), snapshot(cam2))),
facelibrary(Adam Bradley)),
email(adams.wife_at_gmail.com, Hes working late
again.))
SXE
32
Intrinsic Research
  • Program Optimization
  • What to optimize?
  • STEP Node count?
  • Trigger count? (More or less?)

let x snapshot(cam2) in email(security_at_bu.edu,
block( edge_trigger(motion(x)
(2amltNOWlt4am), x)))
let x snapshot(cam2) in trigger(
edge_trigger(motion(x) (2amltNOWlt4am),
true), email(security_at_bu.edu, x))
33
More Scheduling Architecture
  • What if we cant run SXE on a node?
  • STEP a compile-able virtual ISA
  • Embedded C dialects?
  • Java ME?
  • Support alternate linking protocols
  • Serial (base station)
  • SN wireless protocols (e.g. 802.15.4)

34
Intrinsic Research
  • Better Programming Languages
  • Alternate Execution Environments

SnLOG
SnQL
SnC
SNAFU
STEP
SXE
Native C
JXTA
J2ME
35
Intrinsic Research
  • Scheduling/Real-Time Type Systems
  • Resource Management Type Inference
  • Actualizers (SD is a mini-ITM)
  • Static and dynamic type checks

period(100ms, let x period(75ms,
edge_trigger(y, z)) in
edge_trigger(f(x), g(x))
level_trigger( state(4MB, entropymeasure(
bw(2MBps, deltastream(cam1)))),
period_gt(250ms, signal(actuator1, true))
36
Intrinsic Research
  • Intentional Naming
  • Naming sensors by identity The webcam in
    Azers Office
  • Naming sensors by property Any two cams which
    see point X from perspectives gt90 degrees
    apart
  • Naming sensors by dynamic attribute Any cam
    which sees Adam
  • May depend upon existence of persistent queries.
    What p.q.s should we instantiate to produce the
    highest odds of success at the lowest cost?
  • Wearables as part of the Sensorium?

37
Intrinsic Research
  • How do you offer RealTime, QoS, etc. if you dont
    know about the timing of atomic operations?
  • Live profiling of new opcodes
  • Speculative/probabilistic scheduling
  • Run-time scheduler parameter changes

38
Supporting Research
  • SXE Implementations and Internals
  • SXE itself as high-performance service
  • Real-time scheduling
  • Self-profiling
  • Fast I/O delivery (Lives in kernel sandbox?)
  • Programmer can upload their own functions
  • C, Java, C, Perl, Matlab, whatever
  • Automatically generate glue to link with SXE
  • Sandboxing issues

39
Current Status
  • Whitepaper
  • SNAFU and STEP syntax (tentative)
  • SNAFU type principles (tentative)
  • 1G Implementation (work in progress)
  • Java
  • SNAFU-to-STEP compiler
  • Service Dispatcher
  • SXE (with HTTP-based interface)
  • JAR-based extensibility
  • Expect first live demo mid-summer

40
If You Build It, They Will ComeThe SNBENCH
Architecture
  • Adam BradleyAzer Bestavros Michael Long
  • Computer Science Department
  • Boston University
Write a Comment
User Comments (0)
About PowerShow.com