Implementation Architecture

Similar documents
Implementation Architecture

Execution Architecture

Architectural Styles II

INTRODUCTION TO SERVLETS AND WEB CONTAINERS. Actions in Accord with All the Laws of Nature

JAVA SERVLET. Server-side Programming INTRODUCTION

SA Analysis and Design

WWW Architecture I. Software Architecture VO/KU ( / ) Roman Kern. KTI, TU Graz

What is Software Architecture

Servlets by Example. Joe Howse 7 June 2011

Architectural Styles I

SSC - Web applications and development Introduction and Java Servlet (I)

Web based Applications, Tomcat and Servlets - Lab 3 -

Advanced Internet Technology Lab # 4 Servlets

Architectural Styles I

The Basic Web Server CGI. CGI: Illustration. Web based Applications, Tomcat and Servlets - Lab 3 - CMPUT 391 Database Management Systems 4

WHAT IS SOFTWARE ARCHITECTURE?

Appendix A - Glossary(of OO software term s)

Object Oriented Analysis and Design - Part2(Design)

Architectural Design. Architectural Design. Software Architecture. Architectural Models

JSR 311: JAX-RS: The Java API for RESTful Web Services

Developing Applications with Java EE 6 on WebLogic Server 12c

Introduction to Software Engineering

Topic : Object Oriented Design Principles

Cloud Computing Platform as a Service

sessionx Desarrollo de Aplicaciones en Red A few more words about CGI CGI Servlet & JSP José Rafael Rojano Cáceres

Servlets1. What are Servlets? Where are they? Their job. Servlet container. Only Http?

COMP9321 Web Application Engineering

Apache Wink Developer Guide. Draft Version. (This document is still under construction)

Advanced Topics in Operating Systems. Manual for Lab Practices. Enterprise JavaBeans

The requirements engineering process

Network Programmability with Cisco Application Centric Infrastructure

Introduction. This course Software Architecture with Java will discuss the following topics:

Over All Idea about MVC: How to use Model- View-Controller (MVC)

Introduction. Literature: Steelman & Murach, Murach s Java Servlets and JSP. Mike Murach & Associates Inc, 2003

HTTP status codes. Setting status of an HTTPServletResponse

X-S Framework Leveraging XML on Servlet Technology

SA Analysis and Design

Designing Component-Based Architectures with Rational Rose RealTime

Ch04 JavaServer Pages (JSP)

Introduction to Servlets. After which you will doget it

COMP9321 Web Application Engineering

Development of web applications using Google Technology

This tutorial will teach you how to use Java Servlets to develop your web based applications in simple and easy steps.

Enterprise Java Unit 1- Chapter 3 Prof. Sujata Rizal Introduction to Servlets

Building the User Interface: The Case for Continuous Development in an Iterative Project Environment

JVA-563. Developing RESTful Services in Java

Human-Computer Interaction. CA357 Lecture 7 More on Prototyping

RADX - Rapid development of web applications in XML

SE 2730 Final Review

The Servlet Life Cycle

LAB 1 PREPARED BY : DR. AJUNE WANIS ISMAIL FACULTY OF COMPUTING UNIVERSITI TEKNOLOGI MALAYSIA

Oracle Fusion Middleware 11g: Build Applications with ADF I

Design Process Overview. At Each Level of Abstraction. Design Phases. Design Phases James M. Bieman

Advanced WCF 4.0 .NET. Web Services. Contents for.net Professionals. Learn new and stay updated. Design Patterns, OOPS Principles, WCF, WPF, MVC &LINQ

Etanova Enterprise Solutions

UNIT 5 - UML STATE DIAGRAMS AND MODELING

Ch 1: The Architecture Business Cycle

S1 Informatic Engineering

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Introduction to Software Architecture. The top level... (and design revisited)

Chapter 1 GETTING STARTED. SYS-ED/ Computer Education Techniques, Inc.

Creating and Analyzing Software Architecture

Migrating traditional Java EE applications to mobile

Lab session Google Application Engine - GAE. Navid Nikaein

1 Software Architecture

DESIGN PATTERN - INTERVIEW QUESTIONS

Requirements and Design Overview

Programming in C# for Experienced Programmers

Software Architecture

Software Design and Analysis CSCI 2040

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Enterprise Java Technologies (Part 1 of 3) Component Architecture. Overview of Java EE. Java Servlets

Avancier Methods (AM) CONCEPTS

Systems Analysis and Design in a Changing World, Fourth Edition

4.2.2 Usability. 4 Medical software from the idea to the finished product. Figure 4.3 Verification/validation of the usability, SW = software

Properties of High Quality Software. CSE219, Computer Science III Stony Brook University

There is no such thing as a microservice!

VO Software Engineering

Application Architectures, Design Patterns

Welcome To PhillyJUG. 6:30-7:00 pm - Network, eat, find a seat 7:00-7:15 pm - Brief announcements 7:15-8:30 pm - Tom Janofsky's presentation

SERVLETS INTERVIEW QUESTIONS

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

Patterns Architectural Styles Archetypes

TABLE OF CONTENTS CHAPTER TITLE PAGE

Oracle Fusion Middleware 11g: Build Applications with ADF I

Software Processes. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 4 Slide 1

CHAPTER 4: ARCHITECTURE AND SYSTEM DESIGN OF PROPOSED EXPERT SYSTEM: ESOA

How to build a UML model

Application Servers in E-Commerce Applications

Java TM. JavaServer Faces. Jaroslav Porubän 2008

Liberate, a component-based service orientated reporting architecture

ICOM 5016 Database Systems. Database Users. User Interfaces and Tools. Chapter 8: Application Design and Development.

Announcements. How to build a UML model. Rational Unified Process. How RUP builds a model. UI design. Architect

CAS 703 Software Design

CS 307: Software Engineering. Lecture 10: Software Design and Architecture

Training topic: OCPJP (Oracle certified professional Java programmer) or SCJP (Sun certified Java programmer) Content and Objectives

Object-Oriented Design

Semantic SOA - Realization of the Adaptive Services Grid

COURSE 9 DESIGN PATTERNS

5/9/2014. Recall the design process. Lecture 1. Establishing the overall structureof a software system. Topics covered

Transcription:

Implementation Architecture Software Architecture VO/KU (707023/707024) Roman Kern ISDS, TU Graz 2017-11-15 Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 1 / 54

Outline 1 Definition 2 Design 3 Behaviour 4 Requirements 5 Prototypes Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 2 / 54

Definition What is implementation architecture? Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 3 / 54

Implementation Architecture Focuses on how the system is built Which technological elements are needed to implement the system Software packages, libraries, frameworks, classes, Addresses non-runtime requirements & quality attributes: configurability, testability, reusability, Comprised of components and connectors Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 4 / 54

Implementation Architecture Components and connectors reflect software entities and their relationships at the level of source and binary code Typically a number of implementation models Each model focuses on one of the concurrent subsystems or processes from the execution view Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 5 / 54

Components Two types of components: Application Infrastructure Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 6 / 54

Components Application components are responsible for implementing domain-level responsibilities These are responsibilities found in a detailed conceptual architecture Application components might be realized as binary packages, source packages, and files Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 7 / 54

Components Infrastructure components are needed to make the system run but are not related to the application functionality Eg HTTP Connection Handler in our sample is a typical infrastructure component Whether a particular component is an application or an infrastructure component depends on the application Eg if we are building a Web application server then HTTP Connection Handler is an application component Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 8 / 54

Components Often an infrastructure component acts as a container for application components A container component provides an execution environment for the contained components and manages their lifetime Typically, the container executes within a process and creates threads for application components Eg a Web application server which runs multiple applications, each of them in their own threads Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 9 / 54

Component stereotypes Figure: Implementation stereotypes from Software Architecture Primer Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 10 / 54

Connectors In implementation architecture connectors represent a uses relation The arrow depicts the direction of this relation The nature of communication is depicted through the connector styles Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 11 / 54

Connectors API call: A component calls a method in another component (possibly only if both components are in the same process) Callback: The caller passes a reference of an object to the callee The callee invokes a method on that object later Network protocol: Needed when implementation components reside in different processes on networked machines Components need to agree on a common protocol or use a standardized protocol OS signals: Communication between processes running on the same machine Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 12 / 54

Connectors Figure: Implementation connectors from Software Architecture Primer Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 13 / 54

Connectors In some cases we depict ports as endpoints of connectors between components and their interfaces Ports are used to represent the communication between inside and outside of a component Interfaces are the specification how the communication looks like, eg the API Eg a component might be quite complex but it provides a simple interface for communication Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 14 / 54

Interfaces Interfaces are part of the implementation architecture Usually depicted via the lollipop notation, while ports are depicted as little squares They expose the responsibilities Typically interfaces change more slowly the components Interfaces abstract out hardware they can be standardised Interfaces allow distribution Ports and interfaces are optional and should be used only if they are relevant for the model Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 15 / 54

Example Figure: Example of implementation architecture from Software Architecture Primer Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 16 / 54

Conceptual vs Implementation Element Conceptual Implementation Components Domain-level responsibilities Implementation module Connectors Information flow Uses relationship Views Single Split Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 17 / 54

Conceptual vs Execution vs Implementation Figure: Conceptual vs execution vs implementation from Software Architecture Primer Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 18 / 54

Design How to design the implementation architecture Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 19 / 54

Implementation architecture design 1 Define application components 2 Define infrastructure components 3 Define interfaces 4 Behaviour design and verification Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 20 / 54

Application components Ideal 1-to-1 mapping of conceptual components onto application components is typically not possible Some conceptual components will become infrastructure components Eg persistent storage (databases) are typically infrastructure components Some conceptual components are spread over a number of application components if conceptual components have complex responsibilities Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 21 / 54

Application components A number of conceptual components can be mapped onto a single application component if few and simple responsibilities Complex conceptual components might map on additional application components UI components map onto one application component (ie HTML UI) Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 22 / 54

Infrastructure components Off-the-shelf components Frameworks (eg application framework) Servers (web, application, database, file) Generic clients (browser) Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 23 / 54

Sample infrastructure components Consider a simple Web application (eg the navigation application): There are least two infrastructure components: browser, application server Web browser Web application server Apache Tomcat: http://tomcatapacheorg/ Reference implementation of the Servlet API Servlet API abstracts the HTTP protocol from programmers and allows to write Java classes that handle HTTP requests Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 24 / 54

Sample infrastructure components public class SomeServlet extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = responsegetwriter(); } } Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 25 / 54

Sample infrastructure components With a servlet we can read parameters from the user Eg dataset name, dataset file We can respond with HTML Eg a new input form for selecting the start and end point for the route Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 26 / 54

Sample infrastructure components Servlets are still very low level We want to operate on a higher level of abstraction than reading/handling user parameters There are frameworks which abstract eg HTTP request/response cycle For example, for general UI applications MVC frameworks Component-based frameworks such as GWT Also, Java servlets are just one possibility (Python, PHP, etc) Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 27 / 54

Infrastructure selection Research on which infrastructure to choose (or to develop) Conceptual issues, eg MVC, component-based, service-based, Execution issues, eg spawning of external processes Implementation issues, eg programming language Contextual issues, eg commercial products, open source, etc Organizational issues, eg know-how, team, Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 28 / 54

Infrastructure selection Trough research you will obtain a list of several infrastructures Identification of criteria set (what is important) Weighting of criteria (to what extent is some feature important) Evaluation of modules Selection (of the best infrastructure) Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 29 / 54

Weighted Scoring Method There are n alternatives A 1, A 2,, A n There are m different criteria C 1, C 2,, C m Each alternative is for each criterion with score S ij Each criterion has a weight relative to its importance W 1, W 2,, W m The final score for the alternative A i : S(A i ) = m S ij W j (1) j=1 Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 30 / 54

Weighted Scoring Method For uniform distribution of weights: S(A i ) = 1 m m j=1 S ij (2) Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 31 / 54

Weighted Scoring Method - Example Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 32 / 54

Weighted Scoring Method - Example Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 33 / 54

Sample infrastructure selection Apply the same methodology for your projects We select Open Source Java with Tomcat We select component-based framework Apache Wicket as a Web application framework We select Postgres as database backend We selected to develop the navigation algorithm my ourselves Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 34 / 54

Interface design For all application and infrastructure components we need to define interfaces (ports) Helps in clarifying the responsibilities of a component Some interfaces are also standardized Eg HTTP, SQL, File I/O Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 35 / 54

Sample interface design UI: Combination of HTML/HTTP It is standardized! Web application server: HTTP/Servlet API It is standardized Component separation Wicket components are specified by the framework Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 36 / 54

Sample interface design We need to specify interface between Wicket and our application logic A new interface is needed We need to tell to the application logic that there is a request for an eg calculation eg findoptimalroute(user, places, criteria) Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 37 / 54

Sample interface design We should also tell to the system where to write routes, datasets, users, etc Typically these are only files We can store users in an eg XML file eg usersstoreuser(user); Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 38 / 54

Behaviour Dynamic aspects of implementation architecture? Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 39 / 54

Behavior design Now we need to go into details Use-case maps are too high level here We need to investigate behaviour at the operation level Thus, we need for example sequence diagrams Still, use-case maps might be used to analyse eg runtime attributes Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 40 / 54

Sample implementation Architecture Figure: Detailed sample implementation architecture Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 41 / 54

Sample implementation Architecture Figure: Alternative implementation architecture Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 42 / 54

Sample interface Sequence Diagram Figure: Sample sequence diagram Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 43 / 54

Practical Guidelines Mapping of conceptual components to implementation components One-to-one Implementation component supports all responsibilities Without breaking principles of granularity, cohesion and coupling One-to-many Responsibilities cannot be mapped onto a single implementation component Specific architectural style requires multiple components Many-to-one Existing product that encapsulates the functionality of multiple conceptual components Maintainance might be simpler for a single component Specific architectural style requires a single component Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 44 / 54

Requirements What kind of requirements are addressed? Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 45 / 54

Non-runtime requirements Since implementation view addresses build structure It is the right place to consider non-runtime requirements & quality attributes Eg maintainability, extensibility, reusability, We can use a mechanism similar to use-case maps Impact-maps: try to investigate what parts of the system need to change if something happens Fault tree analysis: how does a failure cascade throughout the system Tools to identify and explore architectural issues Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 46 / 54

Impact-maps Map 1: new external system - interface to external system needs to be changed Map 2: new optimal criterion - route finder application component needs to be changed Map 3: new UI - UI component needs to be changed Goal: as few component changes as possible Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 47 / 54

Fault Tree Simple fault tree Figure: A simple fault tree taken from the NASA handbook D fails if A fails and either B or C fails Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 48 / 54

Prototypes About time to build the system Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 49 / 54

Prototype To show that the architectural solution is feasible we implement prototypes For each identified application component we provide implementation Deploy it within the infrastructure components Test it and check correctness, functionality, quality-attributes Two types of prototypes: technical and executable Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 50 / 54

Technical Prototypes Technical prototypes are used assess feasibility of an architecture or to discover and quantify parameters Quickly developed to serve their purpose, but not at product quality level This kind of prototype should be thrown away (should not make it into the final product) Test out new technologies and components (or new versions) eg is a certain database suitable? does are certain framework scale to our expected number of users? and also to test whether the skill of the team is suitable Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 51 / 54

Mock-Ups Mock-ups are special technical prototypes, especially for user interfaces Serve as the communication tool with the stakeholders (and within the team) Should give an overview on how the system will look like But does not contain any functionality There are specialised tools to create mock-ups Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 52 / 54

Executable Prototypes Executable prototypes are a skeleton of the system itself First development cycles in an iterative process, evolutionary prototyping thus the code is not thrown away and code (and documentation) need to be at product quality level Includes all components of the system (infrastructure, UI, ), but only fragments of the functionality The remaining functionality is then added iteratively Discover flaws in the architecture early on Assess the performance of the overall system Blends well with agile development processes, eg Rapid Development [McConnel 1996], Unified Process Within in evolutionary prototyping, technical prototypes might be develped be precise, which type of prototype is being developed Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 53 / 54

The End Next: Quality Attributes Roman Kern (ISDS, TU Graz) Implementation Architecture 2017-11-15 54 / 54