Prism-MW Tutorial. From Architecture to Design 2.

Slides:



Advertisements
Similar presentations
Message Passing Vs Distributed Objects
Advertisements

Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
A Tailorable Environment for Assessing the Quality of Deployment Architectures in Highly Distributed Settings Sam Malek and Marija Mikic-Rakic Nels Beckman.
A component- and message-based architectural style for GUI software
Overview of Prism-MW CS 795 / SWE 699 Sam Malek Spring 2010.
Remote Procedure Call (RPC)
Presented by: Thabet Kacem Spring Outline Contributions Introduction Proposed Approach Related Work Reconception of ADLs XTEAM Tool Chain Discussion.
Component Interaction in Distributed Systems Nat Pryce Imperial College
Technical Architectures
Implementing Software Architecture Software architecture is a set of principal design decisions; thus it is both: –Prescriptive: Gives “direction” on what.
Remote Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Architecture-driven Modeling and Analysis By David Garlan and Bradley Schmerl Presented by Charita Feldman.
An Architectural Approach to Robotics Software Design, Implementation, and Deployment Brian D’Souza Joshua Garcia Ivo Krka Natachart Laotheppitak Hossein.
1 Dynamic Assembly, Assessment, Assurance, and Adaptation via Heterogeneous Software Connectors Nenad Medvidovic with Marija Rakic and Barry Boehm University.
Communication in Distributed Systems –Part 2
University of Southern California Center for Systems and Software Engineering From Dependable Architectures To Dependable Systems Nenad Medvidovic Center.
Distributed Systems: Client/Server Computing
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
FHIRFarm – How to build a FHIR Server Farm (quickly)
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Thammanoon Kawinfruangfukul CSSE MS, ID: Middleware.
Windows Internet Connection Sharing Dave Eitelbach Program Manager Networking And Communications Microsoft Corporation.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
Adapting Legacy Computational Software for XMSF 1 © 2003 White & Pullen, GMU03F-SIW-112 Adapting Legacy Computational Software for XMSF Elizabeth L. White.
© 2005 by IBM; made available under the EPL v1.0 | March 1, 2005 Tim deBoer Gorkem Ercan Extend WTP Server Tools for your.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
International Conference on Software Engineering 2007
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
第十四章 J2EE 入门 Introduction What is J2EE ?
CSCI 6962: Server-side Design and Programming Web Services.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Implementing Architectures Software Architecture.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
A Style-Aware Architectural Middleware for Resource-Constrained, Distributed Systems CS 5381 Steven Ruiz Authors: Sam Malek, Marija Mikic-Rakic, and Nenad.
11 CORE Architecture Mauro Bruno, Monica Scannapieco, Carlo Vaccari, Giulia Vaste Antonino Virgillito, Diego Zardetto (Istat)
+ Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Modeling Component-based Software Systems with UML 2.0 George T. Edwards Jaiganesh Balasubramanian Arvind S. Krishna Vanderbilt University Nashville, TN.
Prism-MW Tutorial CS 795 / SWE 699 Sam Malek Spring 2010.
PIKA Technologies Inc. RPC Client/Server Application Sample October 2009.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
INT-9: Implementing ESB Processes with OpenEdge ® and Sonic ™ David Cleary Principal Software Engineer.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Object Oriented Analysis and Design 1 Chapter 9 From Design to Implementation  Implementation Model  Forward, Reverse, and Round-Trip Engineering  Mapping.
Designing a Middleware Server for Abstract Database Connection.
Architecture Description Languages (ADLs) Cf. Architecture Analysis and Design Languages.
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
Architectural Mismatch: Why reuse is so hard? Garlan, Allen, Ockerbloom; 1994.
Layers Architecture Pattern Source: Pattern-Oriented Software Architecture, Vol. 1, Buschmann, et al.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
Basic Concepts of Software Architecture. What is Software Architecture? Definition: – A software system’s architecture is the set of principal design.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
Implementing Architectures
Chapter 5 Remote Procedure Call
Google Web Toolkit Tutorial
Implementing Architectures
Software Design and Architecture
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
The Client/Server Database Environment
CHAPTER 3 Architectures for Distributed Systems
#01 Client/Server Computing
Interpreter Style Examples
Implementing Architectures
JavaServer Faces: The Fundamentals
A GUI Based Aid for Generation of Code-Frameworks of TMOs
#01 Client/Server Computing
CORBA and COM TIP Two practical techniques for object composition
Presentation transcript:

Prism-MW Tutorial

From Architecture to Design 2

From Architecture to Implementation 3

Mapping Architecture to Implementation Infeasible in general – Reduces to transformational programming Possible by limiting target space – Middleware platforms – Software bus technologies 4

Relating Architecture and Implementation Architectures provide high-level concepts – Components, connectors, ports, events, configurations Programming languages provide low-level constructs – Variables, arrays, pointers, procedures, objects Bridging the two often is an art-form – Middleware can help “split the difference” Existing middleware technologies – Support some architectural concepts (e.g., components, events) – but not others (e.g., configurations) – Impose particular architectural styles End result  architectural erosion – Architecture does not match the implementation What is needed is “architectural middleware” 5

The Mapping Problem Components  ? – classes, packages, modules, … Connectors  ? – software buses, middleware; what else? Interfaces  ? – API signatures; what about protocols? Configurations  ? – interfaces, function pointers, reflection Design rationale  ? – comments, documentation Behavior  ? – how do we translate FSP, StateCharts, Z, etc. to code? NFPs  ? – indirectly via rationale, inspections, testing, user studies, … 6

Architectural Middleware Natively support architectural concepts as middleware constructs Include system design support – Typically via an accompanying ADL and analysis tools Support round-trip development – From architecture to implementation and back Support automated transformation of architectural models to implementations – i.e., dependable implementation Examples – ArchJava – Aura – c2.framework – Prism-MW 7

What Matters in an Architectural Framework Matching assumptions Fidelity Platform support Efficiency … anything else? 8

Prism-MW Architectural middleware for distributed, resource constrained, mobile, and embedded systems Supports architecture-based software development – Architecture-based software development is the implementation of a software system in terms of its architectural elements Efficient Scalable Flexible and Extensible – Allows us to cope with heterogeneity Supports arbitrarily complex architectures Supports multiple architectural styles 9

Prism-MW 10

Prism-MW 11

Architecture - DEMO class DemoArch { static public void main(String argv[]) { Architecture arch = new Architecture ("DEMO"); Using Prism-MW // create components ComponentA a = new ComponentA ("A"); ComponentB b = new ComponentB ("B"); ComponentD d = new ComponentD ("D"); Component B Component A Component D // create connectors Connector conn = new Connector("C"); CConnector C // add components and connectors arch.addComponent(a); arch.addComponent(b); arch.addComponent(d); arch.addConnector(conn); Component BComponent A Component D CConnector C // establish the interconnections arch.weld(a, conn); arch.weld(b, conn); arch.weld(conn, d) } 12

Component B handles the event and sends a response public void handle(Event e) { if (e.equals("Event_D")) {... Event e1= new Event("Response_to_D"); e1.addParameter("response", resp); send(e1); }... } Send (e1) Using Prism-MW Architecture - DEMO Component BComponent A Component D CConnector C Component D sends an event Event e = new Event ("Event_D"); e.addParameter("param_1", p1); send (e); Send (e) 13

Event Dispatching Component BComponent A D E 1 E 2 E 3 E 4 E 5 send Event handle Event Thread Pool E X E Component B ConnectorC X E2E2 2 E Scaffold Adaptation of an existing worker thread pool technique Topology based routing Single event queue for both locally and remotely generated events Easy redeployment and redistribution of applications onto different hardware configurations 14

Prism-MW Performance Efficiency 1750 SLOC 4600 B for the core 160 B per component 240 B per connector 70 B per weld 160 B per event 240 B per event parameter components connectors Total event roundtrip time 2.7 sec … Scalability Numbers of devices, threads and events not limited by Prism-MW Numbers of components and connectors available_memory – middleware_size average_element_size 15

Prism-MW Benchmarks on a PC 16

Prism-MW has been adopted by several industry partners Troops Deployment Simulation US Army MIDAS Bosch Research and Technology Center 17

Recent Progress 18

Obtaining Prism-MW Lite Download Prism-MW Lite from Compile and develop your code on top of it Alternatively, you could download Prism-MW Jar file and set the appropriate class paths The easiest way to compile the source code is to use Eclipse – You can download the eclipse from: – Create a Java project and import the source code – Eclipse will automatically compile the code for you 19

Package Structure Prism – Benchmark – Core – Exception – Extensions Architecture Component Connector Evt Port – Style – Test Core Extensible_port real_time Style Packages you would need to be familiar with 20

Simple Calculator 21

Simple Calculator – Single Address Space 1/2 package Prism.test.core; /* import statements removed for brevity */ class testArchLocally { static public void main(String argv[]) { // Create an architecture for the calculator. Architecture calculatorArchitecture = new Architecture(); // Create the GUI component. Component guiComponent = new Component(); guiComponent.setImplementation(new GUI()); // Add a port to the GUI for sending requests. Port guiRequestPort = new Port(PrismConstants.REQUEST); guiComponent.addPort(guiRequestPort); // Add the GUI to the calculator architecture. calculatorArchitecture.add(guiComponent); // Create the subtraction component. Component subtractComponent = new Component(); subtractComponent.setImplementation(new Subtract()); // Add a port to the subtraction component for receiving requests. Port subReplyPort = new Port(PrismConstants.REPLY); subtractComponent.addPort(subReplyPort); // Add the subtraction component to the calculator architecture. calculatorArchitecture.add(subtractComponent);

Simple Calculator – Single Address Space 2/2 // Create the addition component. Component additionComponent = new Component(); additionComponent.setImplementation(new Addition()); // Add a port to the addition component for receiving requests. Port addReplyPort = new Port(PrismConstants.REPLY); additionComponent.addPort(addReplyPort); // Add the addition component to the calculator architecture. calculatorArchitecture.add(additionComponent); // Create a connector for the calculator. Connector connector = new Connector(); // Add a port to the connector for receiving requests. Port connectorReplyPort1 = new Port(PrismConstants.REPLY); connector.addPort(connectorReplyPort1); calculatorArchitecture.weld(guiRequestPort, connectorReplyPort1); // Add a port to the connector for forwarding requests to the // subtraction component. Port connectorRequestPort1 = new Port(PrismConstants.REQUEST); connector.addPort(connectorRequestPort1); calculatorArchitecture.weld(subReplyPort, connectorRequestPort1); // Add a port to the connector for forwarding requests to the addition // component. Port connectorRequestPort2 = new Port(PrismConstants.REQUEST); connector.addPort(connectorRequestPort2); calculatorArchitecture.weld(addReplyPort, connectorRequestPort2); calculatorArchitecture.start(); }

Simple Calculator – Distributed 24

Client Side – GUI Component 1/2 package Prism.test.extensible_port; /* import statements removed for brevity */ public class testClientWithExtensiblePort { public static void main(String argv[]) { String hostName = "localhost"; int portNum = 2601; // Create an architecture for the calculator client. Architecture clientArchitecture = new Architecture(); // Create the GUI component. Component guiComponent = new Component(); guiComponent.setImplementation(new GUI()); // Add a port to the GUI for sending requests. Port guiRequestPort = new Port(PrismConstants.REQUEST); guiComponent.addPort(guiRequestPort); // Add the GUI to the calculator architecture. clientArchitecture.add(guiComponent); // Create a connector for the calculator client. Connector clientConnector = new Connector(); // Add a port to the connector for receiving requests. Port connReplyPort = new Port(PrismConstants.REPLY); clientConnector.addPort(connReplyPort); // Add a port to the connector for forwarding requests to the calculator server. ExtensiblePort connRequestPort = new ExtensiblePort (PrismConstants.REQUEST); connRequestPort.addDistribution(new SocketDistribution()); clientConnector.addPort(connRequestPort);

Client Side – GUI Component 2/2 // Add the client connector to the calculator architecture. clientArchitecture.add(clientConnector); // Weld the GUI request port to the connector reply port. clientArchitecture.weld(guiRequestPort, connReplyPort); // Start the architecture. clientArchitecture.start(); // Connect the connector request port to the calculator server. connRequestPort.connect(hostName, portNum); }

Server Side – Addition Component 1/2 package Prism.test.extensible_port; /* import statements removed for brevity */ public class testServerWithExtensiblePort { public static void main(String argv[]) { int portNum = 2601; // Create an architecture for the calculator server. Architecture serverArchitecture = new Architecture(); // Create the Addition component. Component additionComponent = new Component(); additionComponent.setImplementation(new Addition()); // Add a port to the Addition for receiving requests. Port additionReplyPort = new Port(PrismConstants.REPLY); additionComponent.addPort(additionReplyPort); // Add the Addition to the calculator architecture. serverArchitecture.add(additionComponent); // Create a connector for the calculator server. Connector serverConnector = new Connector(); // Add a port to the connector for forwarding requests. Port connRequestPort = new Port(PrismConstants.REQUEST); serverConnector.addPort(connRequestPort);

Server Side – Addition Component 2/2 // Add a port to the connector for receiving requests from the // calculator client. ExtensiblePort connReplyPort = new ExtensiblePort(PrismConstants.REPLY); connReplyPort.addDistribution(new SocketDistribution(portNum)); serverConnector.addPort(connReplyPort); // Add the server connector to the calculator architecture. serverArchitecture.add(serverConnector); // Weld the Addition reply port to the connector request port. serverArchitecture.weld(additionReplyPort, connRequestPort); // Start the architecture. serverArchitecture.start(); }