a style-aware architectural middleware for resource-constrained, distributed systems

31
A Style-Aware Architectural Middleware for Resource- Constrained, Distributed Systems CS 5381 Steven Ruiz Authors: Sam Malek, Marija Mikic-Rakic, and Nenad Medvidovic

Upload: regina

Post on 13-Jan-2016

34 views

Category:

Documents


2 download

DESCRIPTION

A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems. CS 5381 Steven Ruiz Authors: Sam Malek, Marija Mikic-Rakic, and Nenad Medvidovic. Table of Contents. Introduction Objectives Middleware Design Prism Setting Support Architectural Support Evaluation. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

CS 5381Steven Ruiz

Authors: Sam Malek, Marija Mikic-Rakic, and Nenad Medvidovic

Page 2: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Table of Contents

Introduction Objectives Middleware Design Prism Setting Support Architectural Support Evaluation

Page 3: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Introduction Software Systems are increasingly

moving from desktop to the mobile setting

Programming in the small and many (Prism) Properties: Highly Constrained Resources

Limited power Low network bandwidth Slow CPU speed, limited memory Small display size

Page 4: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

PrismMW Programming in the Large (PitL)

Suited mainly for desktops Middleware

Developed to support the implementation of Software Arch. in Prism setting

Provides architecture level concepts Component Connector Configuration Events

Page 5: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Key Contributions Employs a separation of concern Provides:

Flexibility Efficiency

Size, speed, overhead Scalability

Number of components, connectors, events, threads, hardware devices

Extensibility Support for new development concerns

Page 6: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Goals Investigate the following issues:

Mobile device limits (power, size, memory, ..)

Modeling Analysis Simulation

Prism characterized by Proprietary OS’s (Palm, Symbian)

Tie in Prism with Software architecture (architecture-based development)

Page 7: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Objectives (Support)

Provide native support for designing & implementing architectural abstraction

Should accommodate system development based on different styles

Address the main parts of arch. based design/implementation and middleware

Page 8: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Objectives (Small & Many) Enable efficient execution of apps on

platforms with different characteristics Extend support for access of shared

hardware Scalable

Large set of devices Execution Threads Components, connectors, communication

Extensible & Configurable Accommodate varying development concerns Multiple Arch. Styles

Page 9: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Example Application TDS (Troops Deployment &

Simulation) Distributed deployment of

personnel Headquarters

Gathers info from field & displays current battlefield status

Networked via secure links to PDA’s

Commanders Connected to soldiers Give orders to soldiers

Soldiers View segment of battlefield

& receive orders

Page 10: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

TDS Components Map

Model of system resources (terrains, tanks,..) Repository

Stores map resources StrategyAnalyzerAgent

Analyze deployment of friendly troops DeploymentAdvisor

Suggests deployments of troops SimulationAgent

Simulates outcomes

Page 11: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Core 12 classes, 4 interfaces Limited direct dependencies Brick Class

Abstract class representing architectural building blocks Scaffold Class (associated with every Brick)

Schedules and queues events for delivery Pools execution threads used for event dispatching Allows most suitable event scheduling

Architecture Class Records the configuration of its constituent components,

connectors, ports, and provides removal capability Event

Captures communication in an architecture

Page 12: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Core (UML)

Page 13: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Core (Cont) Ports

Link made by welding 2 ports together Port can be welded to another corresponding

port Associated Types

Request Reply

Events placed on a port are forwarded to its linked port

Request events: forwarded from request to reply ports

Reply events: forwarded in opposite direction

Page 14: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Core (Ports)

Page 15: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Core (Components) Component

Performs computations in an architecture and maintains its own state

Each component has an arbitrary number of attached ports

Interact with each other by exchanging events via ports

Interacts either directly through ports or via connectors

Page 16: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Core (Connectors)

Connectors Central routing of events Has arbitrary number of attached ports Component attaches to a connector by

creating a link between one of its ports Components/Connectors can remove

and add ports at runtime

Page 17: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Core (Interfaces)

Interface Each subclass of brick has an associated

interface IComponent – send and handle methods IArchitecture – weld method attaches 2 ports IConnector – handle method for routing

events IPort – provides setMutualPort method for

creating one-one association between 2 ports

Page 18: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Prism Semantics Event processing performed through

Shepherd thread Shepherd thread removes the event

from head of queue If component generates further events,

it is added to end of queue Benefits

Event routing to multiple destinations reduces power consumption

Page 19: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

PrismMW Design Extensibility

Core constructs are subclassed via specialized classes

Each AbstractExtension class can have multiple implementations

Page 20: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Support for Prism Setting Distribution

5 different port extensions are implemented DistributionEnabledPort

Operates in server mode (has listening thread) Has arbitrary number of network connections Broadcasts events on all network connections One-to-many association between ports

Varies from the basic port (one-to-one) Deposits events on the network instead of local

event queue

Page 21: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Distribution Scenarios

Page 22: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Support for Prism Setting (cont.) Communication Properties

Security AbstractSecurity – port extension providing RSA and

authentication services Delivery Guarantees

AbstractDeliveryGuarantees AbstractDeliveryGuaranteesEvt

Support event delivery guarantees Real-Time Delivery

AbstractRealTimeEvt Assigns a real time deadline to an event

Data Conversion and Compression AbstractXMLConversion – Encoding/Decoding via ports AbstractCompression – minimizes network bandwidth for event

dispatching

Page 23: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Support for Prism Setting (cont.)

Awareness ExtensibleComponent

Contains references to the architecture object via IArchitecture interface

Observes components at the metalevel to facilitate different aspects of execution of application-level components

Developer can add metalevel components to a running application

Page 24: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Support Prism Setting (cont.) Deployment and Mobility

Configuration of components deployed onto a set of connected hosts

Stateless Mobility/Deployment ExtensibleEvents – contains architectural elements AdminComponent – contains a pointer to its architecture object,

which allows runtime changes to its local subsystem’s architecture:

Addition, removal, connection, disconnection of components and connectors

Stateful Mobility Provides the ability to transfer code between a set of hosts Serialization-based technique – Forwarding of an element’s state

Disconnected Operation Ability to continue functioning in the temporary absence of

network connectivity

Page 25: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Architectural Style Support

Support provided by Prism: Distinguish among different arch styles Specify the arch. Elements’ stylistic

behaviors Specify rules and constraints Use Multiple architectural styles within an

application

Page 26: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Support for Individual/Multiple Styles Individual Styles

Supported through an Extensible class Simplified by using StyleFactory utility class Example: Client and Server Style

Multiple Styles Supported through hierarchical composition ExtensibleArchitecture used to create

components with their own internal archs.

Page 27: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Evaluation Goals

Provide results of the performance trade-offs Demonstrate the middleware’s efficiency and

scalability in large distributed systems Middleware Size

Basic Logic System Memory Core: 2.3 KB Connection Object: 8 KB Port: 8.5 KB

TDS Architecture 1 Headquarters, 4 commanders, 100 soldiers Total memory overhead: 511 KB

Page 28: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Evaluation

Benchmark Results

Page 29: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Evaluation

Distributed Architecture Scenario Only 2 percent in performance

overhead compared to a “pure” java implementation

Page 30: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Group Work

Client and Server Style Create a basic ClientServer representation using the

below topology( refer to (d) of diagram): One Server, Two Clients

Page 31: A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems

Group Work Use StyleFactory to match style for your Extensible [Architecture,

Component] StyleFactory methods below are static Below is the format to follow(Java based):

Class ClientServer { static public void main(String argv[]) { //Create your architecture first (use ExtensibleArchitecture)

//Each Extensible Component should have an implementation to describe it (3 in total, clients and server)

//Add your components to the architecture (3 components to add)

//Establish / Weld the connections between the clients -> server

//Start the architecture architecture.start();}

}