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

Preview:

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

Citation preview

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

CS 5381Steven Ruiz

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

Table of Contents

Introduction Objectives Middleware Design Prism Setting Support Architectural Support Evaluation

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

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

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

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)

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

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

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

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

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

Prism Core (UML)

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

Prism Core (Ports)

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

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

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

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

PrismMW Design Extensibility

Core constructs are subclassed via specialized classes

Each AbstractExtension class can have multiple implementations

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

Distribution Scenarios

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

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

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

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

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.

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

Evaluation

Benchmark Results

Evaluation

Distributed Architecture Scenario Only 2 percent in performance

overhead compared to a “pure” java implementation

Group Work

Client and Server Style Create a basic ClientServer representation using the

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

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();}

}

Recommended