+ All Categories
Home > Documents > 03/11/20021 PRISM Programming in the Small and Many Nenad Medvidovic Marija Mikic-Rakic...

03/11/20021 PRISM Programming in the Small and Many Nenad Medvidovic Marija Mikic-Rakic...

Date post: 19-Dec-2015
Category:
View: 219 times
Download: 0 times
Share this document with a friend
Popular Tags:
15
03/11/2002 1 PRISM Programming in the Small and Many Nenad Medvidovic Marija Mikic-Rakic (neno,marija)@usc.edu
Transcript

03/11/2002 1

PRISMProgramming in the Small and

ManyNenad MedvidovicMarija Mikic-Rakic

(neno,marija)@usc.edu

03/11/2002 2

Past and Present

• The past: programming in the small– small, simple systems– single developer– programs are hacked– developer = customer = user

• The present: programming in the large– large, complex systems– powerful hardware– teams of developers– systems are engineered– many people, many roles

03/11/2002 3

Present and FutureProgramming in the Small and

Many• Highly distributed systems• Dynamic• Mobile• Heterogeneous• Resource-constrained• Ad-hoc network connections

Software development in such a setting - Prism

03/11/2002 4

Prism Challenges• This has been your

computer• This will become your

computer•Resource constraints

–Demand highly efficient computation, communication, and memory footprint–Demand unorthodox solutions

•e.g., off-loading components

•Hardware and software heterogeneity–Proprietary operating systems

–Dialects of programming languages

–Device-specific data formats

–Lack of support for inter-device interaction

–Lack of support for code mobility

03/11/2002 5

Prism Objectives•Asynchronous communication

•Peer-to-peer interactions

•Dynamic reconfiguration

•Deployment

•Mobility

•Disconnected operation

•Execution context awareness

•Scalability

•Efficiency

03/11/2002 6

Prism Style

A

D

CB

Requests

Notifi

catio

ns

PeerPalm-1

Palm-2

Palm-3

iPAQ

PC

•Extensively leverages C2

•Peer-to-peer interactions

–Side component ports, peer connectors, peer messages

–Preserves substrate independence

•Architectural self-awareness

–Application level

–Meta level

•Admin component

•Continuous analysis component

•Message types

–Application data

–Component content

–Architectural model

03/11/2002 7

Prism Connectors• All Prism connectors are able to

exchange data, code, and architectural models

• Two interaction techniques– Client-server, Peer-to-peer

• Four connector categories•Synchronous and asynchronous interaction

•Message routing policies

–Unicast

–Multicast

–Broadcast

•Delivery guarantees

•Support for real-time constraints pending

•Spanning contexts

–Address spaces, Processes, Machines

•Marshalling and unmarshalling of information

•XML encoding

•Wireless interaction (IR)

•Network link monitoring

•Mechanisms

–CORBA, RMI, Sockets, ILU, Q, Polylith

•Useful in connector-to-connector interaction

•Reusable security module

–E.g., used in IR border connector

•Multiple such modules would allow altering security policy on the fly

•Open issue

–Mismatched security policies by interacting connectors

•Ensure reliable component upgrades

•Monitor multiple versions of a component

–Correctness, Performance, Reliability

•Functional behavior of system unaffected

–Performance possibly affected

–Possible impact on real-time systems

–Basic

–Border

–Secure–Multiversioning

03/11/2002 8

Implementing Prism Architectures

Size1.35KB at system start-upmax 56KB

Performance500MHz PentiumIII RAM 256 +Java KVM framework +50 components above +one connector +one component below +50 threads +100 000 sent messages ______________________________________________________________________________________________________

~ 4.7 seconds

Adjustable threadingAdjustable scheduling

...

}50

Request

100 000

Request5 000 000

03/11/2002 9

A Prism Application

n

Component

RequestNotification

Notification()Notification()

ListIterator

Thread(f rom lang)

ConnectorThread

Object(f rom lang)

Object(f rom lang)

Hashtable(from uti l )

Message

source

param etersFIFOPort

SimpleArchitecture

Sim pleArchitecture()Sim pleArchitecture()

ComponentThread

Object(f rom lang)

C2Object

myself

BinarySemaphor

available : boolean

Connector

bottomtop

WorkerThreadSemaphor

localSem

waitingSem

LinkedList

top

bottom

Architecture

0..*

1

+workerThreads

0..*

+arch 1

sem

SynchronizedFIFO

FIFO

messageFIFO

componentFIFO

Brick

messageFIFO

r

ICom ponent

IArchitecture

Connector

IConnector

Component

#top

#bottom

Architecture ArchitectureAdapter

ComponentThread

ConnectorThread

Message

Serializable

(f rom io)

Notification Reques t

ArchitectureEventCons tants

Address(f rom C3.util)

IScaffold

Brick

+topId+bottom Id

#scaffold

ICom ponent

IArchitecture

Connector

IConnector

Component

#top

#bottom

Architecture ArchitectureAdapter

ComponentThread

ConnectorThread

Message

Serializable

(f rom io)

Notification Reques t

ArchitectureEventCons tants

Address(f rom C3.util)

IScaffold

Brick

+topId+bottom Id

#scaffold

ICom ponent

IArchitecture

Connector

IConnector

Component

#top

#bottom

Architecture ArchitectureAdapter

ComponentThread

ConnectorThread

Message

Serializable

(f rom io)

Notification Reques t

ArchitectureEventCons tants

Address(f rom C3.util)

IScaffold

Brick

+topId+bottom Id

#scaffold

ICom ponent

IArchitecture

Connector

IConnector

Component

#top

#bottom

Architecture ArchitectureAdapter

ComponentThread

ConnectorThread

Message

Serializable

(f rom io)

Notification Reques t

ArchitectureEventCons tants

Address(f rom C3.util)

IScaffold

Brick

+topId+bottom Id

#scaffold

MapDisplay

MapRepository

AvailableTroops

Repository

StrategyAnalyzer

TroopsDeployer

AdminComponent

MapDisplay

AdminComponent

MapDisplay

AdminComponent

MapDisplay

AdminComponent

MapDisplay

AdminComponent

M M

M

StrategyAnalyzer`

StrategyAnalyzer

M

M

M

M M M M M

03/11/2002 10

Deployment Support– Leverages

ComponentContent message– Leverages Prism’s support for

code mobility– Assumes preloading a

skeleton configuration on each device

– Implemented as an extension to Visio (COTS)

add(DataRepository: source PC): PC

weld(TopBorderConnector,C_IPAQAvailableTroops): iPAQ

peerWeld(G_AvailableTroops,SideBorderConnector):Palm-1

03/11/2002 11

Support for Disconnected Operation

• Minimize the risks associated with disconnection• Maximize availability / minimize degradation

– Reroute communication– Fetch components before disconnection occurs

• Relevant factors for prefetching– Statefulness– Event frequencies across network links– Dependencies of candidate components– Type of disconnection– Time to disconnection– Required and available memory – Network bandwidth

03/11/2002 12

Defining the Problem• Minimum K-cut problem

– Memory as an additional constraint

• Knapsack - simplification– Benefit of migration does

not change if the component is migrated along with some other components

– For each component we need• Required memory• Benefit of migration

Benefit = 0

Benefit = Benefit + fi * (1 - di)– Available memory

TAM = min(M, t * nb)

DataRepository

DisplayManager

WarManager

G_AvailableTroops

G_ScenarioEditor

G_AppManager

DeploymentStrategiesRepository

StragtegyAnalyzer

DeploymentAdvisor

G_DataRepository

03/11/2002 13

Results

Time to Disconnection

Connection Speed

Available Memory

Resulting Set

1s 13KB/s 50KB Strategy Analyzer

0.5s 40KB/s 15KB War ManagerDeployment Advisor

1s 30KB/s 40KB War ManagerDeployment AdvisorStrategy Analyzer

  Strategy Analyzer

War Manager Deployment Advisor

Required Memory (KB)

13 9 5

Benefit 0.31 0.16 0.18

Message Processing Component fi di

Analyze strategy Strategy Analyzer 0.06 1

Simulate War Manager 0.16 0

Advise Deployment Advisor 0.18 0

Deploy Strategy Analyzer 0.37 0

03/11/2002 14

Future Work• Real-time guarantees• Decentralized ownership• Trust• Resource analysis• Automated optimized application

deployment

03/11/2002 15

Web Site

• http://sunset.usc.edu/~softarch/Prism/


Recommended