Infosphere Infosphere: A Midterm Update on Infopipes Calton Pu Professor and John P. Imlay, Jr....

Post on 26-Dec-2015

212 views 0 download

Tags:

transcript

Infosphere

Infosphere: A Midterm Update on Infopipes

Calton PuProfessor and John P. Imlay, Jr. Chair in Software

Georgia Institute of Technology 2003 Calton Pu and Georgia Institute of Technology

2

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

3

Infosphere

Internet:Information Jungle

Clean, Reliable,Timely Information,Anywhere

DigitalEarth

Sensors

Problem: too many sources,too much information

Infosphere

PersonalizedFiltering &Info. Delivery

Infopipes

Resou

rce A

dapta

tion Property Mgmt

Information QualityContinual Queries

Mic

rofe

edba

ck

specialization

4

Infosphere

• Freeway Surveillance• 80+ PTZ Cameras• 500+ VDS Cams• Many info sources

• Potential direct input • Instrumented cars• Trucks and others

5

Infosphere

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

6

Infosphere

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

7

Infosphere

Infopipes: Backbone of Infosphere

Syntax, semantics, QoS Property preserving

composition of Infopipes Timely delivery of high

quality fresh information

?

HighBandwidth

Long Latency

InfopipeComposition

QualityAnnotations

PreservedInformationQuality

ActiveControl

survivable

PersonalizedFiltering

8

Infosphere

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

9

Infosphere

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

10

Infosphere

Infopipe Internals

Information flow driven Middle method by hand ISG generates the rest

voidfunc (a, b) { … c = a + b;}

$a $b

XML

$c

XML

XMLparser

Middlemethod

StubXML

generatorStub

Consumer-end Producer-end

XML

Infopipe

XML

11

Infosphere

Infopipe Software Architecture

ISL Spec

XIP Spec

SocketsECho Java RMICORBA

A/V Stream

Multi-stage translators

GUI

12

Infosphere

Multi-Stage Translation

XIP Spec

Execut.Source

Custom Translators

XSLT Translators

XSLT Translators

Fill Repository

XIP + build

C Sockets

Java Sockets

C ECho

XIP assembly

Apply templates

AXpect weaver

Write Files

<build>commands

XIP+

XIP+

code (w/jpt)

XIP+

woven code

Templates

Aspects

Repository

13

Infosphere

Subsample

ReduceRate – 10x

ColorReduction

WindowFilter

Subsample

ReduceRate – 2x

ColorReduction

WindowFilter

ReduceRate – 2x

High pr

iority

/ High

ban

dwidt

h

Raw vi

deo

UAV video UAV video

UAV video

Team video

Team video

Receiver controls signals through remote data reduction

reduced videolower priority / lower bandwidth

Big-picture image stream

Mobile Command

Demo Scenario

14

Infosphere

Wireless

Multiple

Media

Wired Media

Command Post

Demo Application – Sensor Streams in Wired and Wireless Environments

15

Infosphere

Ptolemy Design Tool

16

Infosphere

UAV: datatype, filter, pipe

17

Infosphere

XML description

18

Infosphere

Ptolemy => ISL/XIP

19

Infosphere

XIP => Gen code

20

Infosphere

Multiple Language/API Bindings

21

Infosphere

Generating Multiple Languages

22

Infosphere

Code Generation & Compilation

23

Infosphere

UAV Sender

24

Infosphere

UAV Receiver: Adaptation + Control Interface

25

Infosphere

Scaling Filter

26

Infosphere

Scaling + B/W

27

Infosphere

Encryption (Symmetric)

28

Infosphere

JPEG (factor of 1/25)

29

Infosphere

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

30

Infosphere

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

31

Infosphere

An Aspect

<xsl:template match="//filledTemplate[@name=$pipename][@inside=$inside]//jpt:pipe-middle"> struct timeval base; struct timeval end; <jpt:time-process> // take timing here gettimeofday(&amp;base,NULL); <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> gettimeofday(&amp;end,NULL); usec_to_process = (end.tv_sec - base.tv_sec )*1e6+(end.tv_usec - base.tv_usec); fprintf(stdout,"Time to process: %ld\n", usec_to_process); </jpt:time-process></xsl:template>

Pointcut: selects joinpoint in XIP from generated code

Joinpoint: Added in aspect, or from generated code

32

Infosphere

AXpect Weaver

XIP specification has apply-aspect commands Aspects are XSLT, operate on XIP + generated code Aspects can refer to outside XML (e.g. WSLA) for

additional data Source code: C, C++, Java

XIP Aspect WSLA

Code Generation

Aspect Weaver

SourceCode

ISG

33

Infosphere

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

34

Infosphere

Specialization of Infopipes

Specialization of Infopipes Tools: Tempo-C and Java partial evaluator Goal: reduce interpretation of data (2nd

example later)

PBIO/XML

parser

Middle

Method 1Stub

PBIO/XML

generatorStub

Producers Consumer

PBIO/XML

parser

Middle

Method 2Stub

PBIO/XML

generatorStub

Producer Consumers

PBIO/XML

parser

Middle

Method 1Stub

PBIO/XML

generatorStub

Middle

Method 2

35

Infosphere

Infopipe Further Details

Middle Port Stub ConnectorPortStubConnector

• Middle : Pipe’s processing module

• Port : Communication endpoint abstraction

• Stub : Data marshalling

• Connector : Communication runtime, Handles connection info

36

Infosphere

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 Socket connector IPC(unix pipe) connector Function connector

37

Infosphere

Replugging (Same Machine)

Middle PortSocketStub

SocketConnector

SocketConnector

SocketStub

Port Middle

IPCConnector

IPCStub

IPCConnector

IPCStub

38

Infosphere

Port Middle2

Replugging (Same Process)

IPCStub

IPCConnector

IPCConnector

IPCStub

…Middle1 Port

•Pipe 1, 2 are collapsed into one pipe

•Pipe 1 loads Pipe 2’s middle code dynamically

Middle1 PortFunction

StubMiddle2 ……

Pipe 1 Pipe 2

39

Infosphere

Port Code Example

Same Interface: pipeSource->outPorts[“out1”]->push(item);

StubSocket::push(item){ marshal(item, buf); conn->send(buf);}ConnSocket::send(buf){ send(sock, buf);}

StubIPC::push(item){ marshal(item, buf); conn->send(buf);}ConnIPC::send(arg){ write(pipe_fd, arg);}

StubFunction::push(item){ nextPipe->middle

->process(item);}

Port::push(item) { lock(stub); // for replugging synchronization

stub->push(item);unlock(stub);

}

40

Infosphere

Benchmark Results

Send 8 byte data (in the same machine)

(Manually specialized) Specialization cost

Socket 41.7 us

IPC 12.6 us

Function 1.8 us

Socket->IPC

1127.6 us

IPC->Function

1045.7 us

41

Infosphere

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

42

Infosphere

Fresh Information On the World