Infosphere: Ubiquitous Computing A Midterm Update on Infopipes Calton Pu

advertisement
Infosphere:
A Midterm Update on Infopipes
Calton Pu
Professor and John P. Imlay, Jr. Chair in Software
Georgia Institute of Technology
 2003 Calton Pu and Georgia Institute of Technology
Infosphere
Ubiquitous Computing
♦Plenty of computers (Moore’s Law)
• Are everywhere, all connected, almost free
• Know Everything
• 5 IT Expeditions in 1999 (e.g., MIT’s Oxygen)
♦Information is where value is
• Paying distributed applications (DL, EC)
• Cheap disks connected by cheap bandwidth
Infosphere
2
1
Infosphere
Problem: too many sources,
too much information
Internet:
Information Jungle
Pr
op
er
ty
Mg
mt
ack
Microfeedb
Clean, Reliable,
Timely Information,
Anywhere
Personalized
Filtering &
Info. Delivery
Sensors
s
rie
ue
Info
rm
atio
n
Qu
ality
Infosphere
lQ
ua
ntin
Co
Digital
Earth
Infopipes
specialization
ce
ur
o
s
Re
n
io
at
t
ap
Ad
3
• Freeway Surveillance
• 80+ PTZ Cameras
• 500+ VDS Cams
• Many info sources
• Potential direct input
• Instrumented cars
• Trucks and others
Infosphere
4
2
RT Traffic Optimization
♦Central traffic control scenario
• Car navigational system registers route
• Control sends back detailed traffic info/estimate
• When rerouting: register the new route
♦Peer-to-peer scenarios
• Taxi/delivery trucks exchange information
• Opposite direction cars know what’s ahead
Infosphere
5
Emergency Response
♦Increasing importance after 9/11, Iraque
♦Proactive planning, handling, response
• Hurricanes, tornados, presidents, etc
• Real-time observation and forecasting of exact
route for “big events”
• Get out of harm’s way, get back to help
• A few minutes can make a big difference
Infosphere
6
3
Infopipes: Backbone of Infosphere
Active
Control
High
Bandwidth
Long Latency
Quality
Annotations
Infopipe
Composition
survivable
„ Syntax, semantics, QoS
?
„ Property preserving
Personalized
Filtering
Preserved
Information
Quality
composition of Infopipes
„ Timely delivery of high
quality fresh information
Infosphere
7
Infopipe Abstraction
♦Syntax, semantics, QoS requirements
♦Component Infopipes
• Ends: Typespec, property specifications
• Middle: processing, buffering, active
♦Composition of Infopipes
• End-to-end QoS property preservation
Infosphere
8
4
Goals for ISL/ISG
♦ ISL – Infopipe Specification Language
•
•
•
•
Simple description for Infopipes
Support datatypes
Support serial composition
QoS requirements
♦ ISG – Infopipe Stub Generator
• Generate datatypes, communication stubs
• Support multiple communication layers
• Support multiple implementation languages
Infosphere
9
Infopipe Internals
♦Information flow driven
• Middle method by hand
• ISG generates the rest
XML
parser
Stub
Consumer-end
Infosphere
XML
$a $b
Infopipe
XML
Middle
method
void
func (a, b) {
…
c = a + b;
}
Stub
XML
XML
generator
Producer-end
XML
$c
10
5
Infopipe Software Architecture
GUI
ISL Spec
XIP Spec
ECho
Multi-stage translators
Java RMI
Sockets
CORBA
A/V Stream
Infosphere
11
Multi-Stage Translation
XIP Spec
XIP + build
Fill Repository
Repository
Custom Translators
<build>
commands
XIP assembly
XSLT Translators
XIP+
Templates
Apply templates
XIP
+
code (w/jpt)
Aspects
Execut.
Source
AXpect weaver
XIP
+
woven code
XSLT Translators
Write Files
C ECho
Java Sockets
Infosphere
C Sockets
12
6
Demo Scenario
Big-picture image stream
UAV video
UAV video
Subsample
Color
Reduction
Window
Filter
Reduce
Rate – 2x
d
re
e
uc
d
H
o
de
vi
r
we
lo
/
ity
r
we
lo
w
Ra
o
de
vi
ig
/H
h
UAV video
Color
Reduction
h
dt
wi
nd
ba
Reduce
Rate – 10x
Infosphere
ity
h
Subsample
r
io
pr
Team video
h
ig
p
r
rio
t
id
w
nd
ba
Mobile Command
Receiver controls signals
through remote data reduction
Window
Filter
Reduce
Rate – 2x
Team video
13
Demo Application – Sensor Streams in
Wired and Wireless Environments
Multiple
Wireless
Media
Command Post
Wired Media
Infosphere
14
7
Ptolemy Design Tool
Infosphere
15
UAV: datatype, filter, pipe
Infosphere
16
8
XML description
Infosphere
17
Ptolemy => ISL/XIP
Infosphere
18
9
XIP => Gen code
Infosphere
19
Multiple Language/API Bindings
Infosphere
20
10
Generating Multiple Languages
Infosphere
21
Code Generation
& Compilation
Infosphere
22
11
UAV Sender
Infosphere
23
UAV Receiver: Adaptation + Control Interface
Infosphere
24
12
Scaling Filter
Infosphere
25
Scaling + B/W
Infosphere
26
13
Encryption (Symmetric)
Infosphere
27
JPEG (factor of 1/25)
Infosphere
28
14
Infopipe and Software Eng.
♦QoS/QoI support implemented with AOP
• QoS dimensions: performance, security, etc
• Performance monitoring, recording, adjusting
♦Feedback-based QoS maintenance
• Monitoring at each stage of information flow
• Make adjustments when QoS exception raised
Infosphere
29
XIP Benefits
♦ Extensible XML intermediate representation
• Several abstract machines, custom code
• Datatypes, Filters, Pipes, Serial composition
• Easy addition of AXpect
♦ Good XML software tools
• XSLT Modularity (xsl:include)
• Meta programming through templates
• Leveraging future XML tool development
Infosphere
30
15
An Aspect
Pointcut: selects joinpoint in XIP from generated code
Joinpoint: Added in aspect, or
from generated code
<xsl:template
match="//filledTemplate[@name=$pipename][@inside=$inside]//jpt:pipe-middle">
struct timeval base;
struct timeval end;
<jpt:time-process>
// take timing here
gettimeofday(&base,NULL);
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
gettimeofday(&end,NULL);
usec_to_process = (end.tv_sec - base.tv_sec )*1e6+(end.tv_usec - base.tv_usec);
Infosphere
fprintf(stdout,"Time to process: %ld\n", usec_to_process);
</jpt:time-process>
31
</xsl:template>
AXpect Weaver
Aspect
XIP
Code
Generation
WSLA
Aspect
Weaver
Source
Code
ISG
♦ XIP specification has apply-aspect commands
♦ Aspects are XSLT, operate on XIP + generated code
♦ Aspects can refer to outside XML (e.g. WSLA) for
Infosphere additional data
♦
Source code: C, C++, Java
32
16
An AOP Experiment
♦ Infopipe: Image stream sender to receiver
♦ Receiver has CPU usage limits
♦ Aspects build on top of other aspects (e.g. CPU usage
computation requires timing info)
♦ Rate control aspect governs receiver CPU usage through
sender rate adjustment
♦ Aspect code accounts for 348 of 1135 NCLOC (31%)
♦ Aspects affect 9 of 14 generated files
Infosphere
33
Specialization of Infopipes
♦Specialization of Infopipes
• Tools: Tempo-C and Java partial evaluator
• Goal: reduce interpretation of data (2nd
example later)
Producers
PBIO/XML
parser
Infosphere
Consumer
Stub
Middle
Method 1
Stub
PBIO/XML
parser
Producer
PBIO/XML
PBIO/XML
generator
parser
Stub
Middle
Middle
Method 1
Method 2
Consumers
Stub
Stub
Middle
Method 2
Stub
PBIO/XML
generator
PBIO/XML
generator
34
17
Infopipe Further Details
Connector Stub Port Middle Port Stub Connector
• Middle : Pipe’s processing module
• Port : Communication endpoint abstraction
• Stub : Data marshalling
• Connector : Communication runtime, Handles
connection info
Infosphere
35
Pipe Connectors
… Middle Port Stub Connector
Connector Stub Port Middle
…
♦ Each port can be plugged with different
types of stubs and connectors
♦ Currently we have 3 types
Infosphere
• Socket connector
• IPC(unix pipe) connector
• Function connector
36
18
Replugging (Same Machine)
Middle
Port
Socket Socket
Stub Connector
IPC
IPC
Stub Connector
Socket Socket
Port
Connector Stub
Middle
IPC
IPC
Connector Stub
Infosphere
37
Replugging (Same Process)
Pipe 1
… Middle1 Port
IPC
IPC
Stub Connector
…
Infosphere
Pipe 2
Middle1 Port
IPC
IPC
Port Middle2 …
Connector Stub
Function
Middle2
Stub
…
•Pipe 1, 2 are collapsed into one pipe
•Pipe 1 loads Pipe 2’s middle code dynamically
38
19
Port Code Example
Same Interface: pipeSource->outPorts[“out1”]->push(item);
Port::push(item)
{
lock(stub); // for replugging synchronization
stub->push(item);
unlock(stub);
}
StubSocket::push(item)
{ marshal(item, buf);
conn->send(buf);
}
ConnSocket::send(buf)
{ send(sock, buf);
}
Infosphere
StubIPC::push(item)
{ marshal(item, buf);
conn->send(buf);
}
ConnIPC::send(arg)
{ write(pipe_fd, arg);
}
StubFunction::push(item)
{
nextPipe->middle
->process(item);
}
39
Benchmark Results
♦ Send 8 byte data
(in the same machine)
Socket
IPC
Function
41.7 us
12.6 us
1.8 us
♦ (Manually specialized)
Specialization cost
Socket->IPC
1127.6 us
IPC->Function
1045.7 us
Infosphere
40
20
Project Summary
♦Infopipe: Distributed information flows
• ISL, GUI, XIP
♦ISG and software engineering tools
• AOP and AXpect
• Specialization of Infopipes
♦End-to-end QoS properties
• Performance, maintainability, scalability
Infosphere
41
Fresh Information
On the World
Infosphere
42
21
Download