Architectural styles for software systems The client-server style

Similar documents
Chapter 11 Web-based Information Systems

Chapter 2 Distributed Information Systems Architecture

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

1 Enterprise Modeler

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings

Τεχνολογία Λογισμικού

Goals of the Lecture UML Implementation Diagrams

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

Outline. CSCI 4730 Operating Systems. Questions. What is an Operating System? Computer System Layers. Computer System Layers

Chapter 8 Web Services Foundations

System and Software Architecture Description (SSAD)

Outline n Introduction n Background o Distributed DBMS Architecture

Chapter 5 Application Server Middleware

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

Code Review Defects. Authors: Mika V. Mäntylä and Casper Lassenius Original version: 4 Sep, 2007 Made available online: 24 April, 2013

BEA Tuxedo. Introducing the BEA Tuxedo System

Computers and Scientific Thinking

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

Baan Finance Financial Statements

Baan Tools User Management

Elementary Educational Computer

Python Programming: An Introduction to Computer Science

Software Architecture. Paolo Ciancarini

Ontology-based Decision Support System with Analytic Hierarchy Process for Tour Package Selection

Session Initiated Protocol (SIP) and Message-based Load Balancing (MBLB)

Threads and Concurrency in Java: Part 1

Chapter 3 DB-Gateways

SCI Reflective Memory

Threads and Concurrency in Java: Part 1

Data Warehousing. Paper

Service Oriented Enterprise Architecture and Service Oriented Enterprise

Software development of components for complex signal analysis on the example of adaptive recursive estimation methods.

n Learn how resiliency strategies reduce risk n Discover automation strategies to reduce risk

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.

BEA WebLogic Collaborate

Panel for Adobe Premiere Pro CC Partner Solution

Chapter 4 Remote Procedure Calls and Distributed Transactions

% Sun Logo for. X3T10/95-229, Revision 0. April 18, 1998

n Explore virtualization concepts n Become familiar with cloud concepts

Python Programming: An Introduction to Computer Science

Introduction to Network Technologies & Layered Architecture BUPT/QMUL

BEA Tuxedo. Creating CORBA Server Applications

Web OS Switch Software

The Magma Database file formats

BEA WebLogic Server. Programming WebLogic Enterprise JavaBeans

Oracle Server. What s New in this Release? Release Notes

Adapter for Mainframe

MOTIF XF Extension Owner s Manual

Appendix D. Controller Implementation

Modeling a Software Architecture. Paolo Ciancarini

Customer Portal Quick Reference User Guide

Browser code isolation

% Sun Logo for Frame. X3T10/95-229, Revision 2. September 28, 1995

Goals of this Lecture Activity Diagram Example

Extending The Sleuth Kit and its Underlying Model for Pooled Storage File System Forensic Analysis

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON

BEA WebLogic XML/Non-XML Translator

. Written in factored form it is easy to see that the roots are 2, 2, i,

BEA WebLogic Portal. Guide to Events and Behavior Tracking

BEA Tuxedo. Using the CORBA Name Service

BEA WebLogic Process Integrator

Workflow Management Systems

Τεχνολογία Λογισμικού

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Security of Bluetooth: An overview of Bluetooth Security

Java net programming II

Lecture 28: Data Link Layer

1&1 Next Level Hosting

Using the Keyboard. Using the Wireless Keyboard. > Using the Keyboard

BEA Tuxedo. Creating CORBA Client Applications

GE FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III

BAAN IV. BAAN IV Installation Manual for DB2 on Windows NT

BEA Tuxedo. Using the CORBA Notification Service

DEFINITION OF CELL BEHAVIOUR. Actions and Behaviour. CELL = a CELL CELL = b CELL

Firewall and IDS. TELE3119: Week8

n We have discussed classes in previous lectures n Here, we discuss design of classes n Library design considerations

What are Information Systems?

L I N U X. Unit 6 S Y S T E M DHCP & DNS (BIND) A D M I N I S T R A T I O n DPW

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method

Topics. Instance object. Instance object. Fundamentals of OT. Object notation. How do objects collaborate? Pearson Education 2007 Appendix (RASD 3/e)

Goals of the Lecture Object Constraint Language

WYSE Academic Challenge Sectional Computer Science 2005 SOLUTION SET

CS 111: Program Design I Lecture 19: Networks, the Web, and getting text from the Web in Python

CMSC Computer Architecture Lecture 11: More Caches. Prof. Yanjing Li University of Chicago

BEA Tuxedo. Using the BEA Tuxedo Domains Component

CA InterTest for CICS r8.5

Getting Started. Getting Started - 1

BEA WebLogic XML/Non-XML Translator. Samples Guide

Oracle Process Manufacturing

User s Guide. OMEGAMON XE for Oracle. Version 300 GC April 2002

Lazy Type Changes in Object-oriented Database. Shan Ming Woo and Barbara Liskov MIT Lab. for Computer Science December 1999

One advantage that SONAR has over any other music-sequencing product I ve worked

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS

Loop Emulation Service Protocols over ATM. Enea LES-SIG-Bricks is a complete implementation of the Loop Emulation

POMA: A Pattern-Oriented and Model-Driven Architecture

Avid Interplay Bundle

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Out the box. dataloggers. easy to configure easy data streaming easy choice. connect, simply configure and go

Transcription:

Architectural styles for software systems The cliet-server style Prof. Paolo Ciacarii Software Architecture CdL M Iformatica Uiversità di Bologa

Ageda Cliet server style CS two tiers CS three tiers CS -tiers 2

Cliet-Server (CS): Overview CS has bee coceived i the cotext of distributed systems, aimig to solve a problem of resources shared amog several computers The drivig idea is to make ubalaced the parters roles withi a commuicatio process Oe or may servers provide services to istaces of subsystems, called cliets Each cliet calls o the server, which performs some service ad returs the result 3

Cliet-Server: Overview Fuctios performed by cliet: Requires a service through the server iterface(s) Allows to users to commuicate with the system through a certai iput (Customized user iterface) Frot-ed processig of iput data Fuctios performed by server: Cetralized data maagemet Services provider Back-ed processig of the data provided by cliet 4

Cliet server patter: mai A cliet-server system ca be logically divided ito three parts: The presetatio tier, i charge of maagig the user iterface (graphic evets, iput fields check, etc ) The actual applicatio logic tier The data maagemet tier for the maagemet of persistet data ad trasactio maagers 5

The busiess logic tier Some patters help i structurig the busiess logic: Trasactio script: a procedure that takes the iput from the presetatio, processes it with validatios ad calculatios, stores data i the database, ad ivokes ay operatios from other systems. It the replies with more data to the presetatio, perhaps doig more calculatio to help orgaize ad format the reply. Domai model: a object model of a domai icorporates both behavior ad data Table module: a sigle istace that hadles the busiess logic for all rows i a database table or view (as i relatioal database) Fowler, Patters of eterprise applicatio architecture 6

Cliet-Server patter A cliet-server system architecture ca be: 2-tiered: presetatio ad applicatio logic modeled as a sigle tier cotaied i the cliet 3-tiered: oe tier for each part, with dedicated servers for applicatio logic ad data maagemet -tiered: the last two parts spread i a chai of servers 7

Cliet: CRC Class Cliet Resposibilities Compoet: hadles User iteractio Asks the Server for some service Collaborators Server

Server: CRC Class Server Collaborators Resposibilities Compoet (offers some services) Provides a API for receivig/aswerig messages

Cliet-Server: Architecture 10

CS 2-tiers: Overview This style is used to describe cliet-server systems where the cliet requests resources ad the server respods directly to the request usig its ow resources The server does ot call o aother applicatio i order to provide part of the service If the server is more powerful tha its cliets, it is possible to coect may cliets at the same time 11

CS 2-tiers: Architecture (1) Compoets: Cliet Active etity Cotais always the User System Iterface subsystem (sessio, text iput, dialog, ad display maagemet services) If it cotais the Applicatio Logic subsystem (process maagemet), tha it is a Fat Cliet Server Reactive etity Cotais a Database Maagemet subsystem (such as data ad file services) If it cotais the Applicatio Logic subsystem, tha it s a Fat Server Coectors: Procedure Calls, RPC, or others They require a protocol 12

CS 2-tiers: Architecture (2) The Applicatio Logic may be preset either at the cliet side withi a user iterface or withi the database o the server side or spread o the both R P C R P C R P C R P C R P C Fat Server Fat Cliet 13

CS 2-tiers: Compoet Diagram 14

CS 2-tiers: Class Diagram Cliet * requester * provider Server service1() service2() servicen() 15

CS 2-tiers: Sequece Diagram 16

CS 2-tiers example (1): web browser ad web server HTTP (Hypertext Trasfer Protocol): ASCII-based request/reply protocol that rus over TCP HTTPS: variat that first establishes symmetrically-ecrypted chael via public-key hadshake, suitable for sesitive ifo By covetio, servers liste o TCP port 80 (HTTP) or 443 (HTTPS) Uiversal Resource Idetifier (URI) format: scheme, host, port, resource, parameters, fragmet http://search.com:80/img/search/file?t=baaa&cliet=firefox#p2 17

CS example: World Wide Web 18

CS 2-tiers example (2): web browser ad web server Cliet s request: GET /idex.html HTTP/1.0 User-Aget: Mozilla/4.73 [e] (X11; U; Liux 2.0.35 i686) Host: www.yahoo.com Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/pg, */* Accept-Laguage: e Accept-Charset: iso-8859-1,*,utf-8 Server s reply: HTTP/1.0 200 OK Cotet-Legth: 16018 Set-Cookie: B=2vscoq5p0h2 Cotet-Type: text/html HTTP method & URI Cookie data: up to 4KiB MIME cotet type <html><head><title>yahoo!</title><base href=http://www.yahoo.com/> <img width=230 height=33 etc 19

CS 2-tiers: Pro & Cos (1) Beefits (towards a Moolithic Architecture): Good security, because the users usually caot see the database directly ad ca oly access the data by startig the cliet More scalable, because allows multiple users to access the database at the same time as log as they are accessig data i differet parts of the database Faster executio due to a shared workload 20

CS 2-tiers: Pro & Cos (2) Pitfalls: Exhibits a heavy message traffic sice the frot-eds ad the servers commuicate itesively The Applicatio Logic is ot maaged by a ad-hoc compoet, but it s shared by frot-ed ad back-ed Cliet ad server deped oe from each other It s difficult to reuse the same iterface to access differet data It s difficult to iteract with databases which have differet frot-eds The busiess logic is ecapsulated ito the user iterface, thus if the logic chages, the iterface has to chage as well 21

CS 3-tiers: Overview (1) I 3-tiers CS architecture, there is a itermediary tier, meaig the architecture is geerally split up betwee: A cliet, which requests the resources through a user iterface (i.e. web browser) for presetatio purposes The applicatio server, whose task it is to provide the requested resources, but by callig o aother server The data server, which provides the applicatio server with the data it requires 22

Geeric 3-tiers software architecture 23

CS 3-tiers: Overview (2) Tiers work as they were ot part of a sigle applicatio: Applicatios are coceived as collectios of iteractig compoets Each compoet ca take part to several applicatios at the same time Each server compoet is specialised with a certai task: web server, database server, etc Tiers 1 ad 3 do ot commuicate: The user iterface either receives ay data from data maagemet, or it ca write data Iformatio passig (i both the directios) are filtered by the Applicatio Logic 24

CS 3-tiers: Architecture (1) Compoets: Cliet Active etity Thi cliet cotaiig oly the Presetatio Logic subsystem (sessio, text iput, dialog, ad display maagemet services) Applicatio Server Cotais the Applicatio Logic subsystem providig process maagemet such as queuig, applicatio executio, ad database stagig Data Server Passive etity Cotais the Database Maagemet subsystem (such as data ad file services) 25

CS 3-tiers: Architecture (2) Coectors: Remote Procedure Calls (RPC) Protocol: The cliet calls for the busiess logic o the server, the busiess logic o the behalf of the cliet accesses the database 26

CS 3-tiers: Compoet Diagram 27

CS 3-tiers: Class Diagram Cliet * requester * provid er Applicatio Server - sessios - services sessio() doservice() use call iterface Middleware Data Server + GET() + PUT() + POST() + DELETE() select() isert() delete() update() 28

CS 3-tiers: Sequece Diagram 29

CS 3-tiers example: Web Mail 30

CS 3-tiers example: Struts framework Copyright IBM Struts framework The browser seds a request to a Actio servlet The Actio servlet istatiates a Java bea that is coected to a database The Actio servlet commuicates with a JSP file The JSP file commuicates with the Form bea The JSP file respods to the browser 31

CS 3-tiers: Pro & Cos (1) Beefits: High flexibility ad high modifiability: Compoets ca be used i several systems New fuctioalities ca be added to the system by oly modifyig the compoets which are i charge of realizig them, or by pluggig ew compoets More scalability ad performace because we ca add as may middle tiers as eeded Thi cliet, because oly little commuicatio is eeded betwee the cliet ad the middleware which implemets the Applicatio Logic 32

CS 3-tiers: Pro & Cos (2) Pitfalls: The additioal tier icreases the complexity ad cost of the system: Ad hoc software libraries have to be used to allow the commuicatio amog compoets Heavy etwork traffic Legacy software: May compaies make use of preexistig (ofte moolithic) software systems to maage data Adapters have to be implemeted to iteroperate with the legacy software 33

CS -tiers: Overview (1) I the 3-tier applicatios, the middle tier is geerally ot a moolithic program but is implemeted as a collectio of compoets that are iitiated by several cliet-iitiated busiess trasactio Thus, oe compoet ca call other compoets to help it implemet a request Geerally, a server ca use services from other servers i order to provide its ow service 34

CS -tiers: Overview (2) Fudametal items: User Iterface (UI): a browser, a WAP mii browser, a graphical user iterface (GUI) Presetatio logic, which defies what the UI has to show ad how to maage users requests Busiess logic, which maages the applicatio busiess rules Ifrastructure services: They provides further fuctioalities to the applicatio compoets ( messagig, trasactios support) Data tier: Applicatio Data level 35

CS -tiers: Architecture (1) Typical compoets: Cliet Same as 3-tiers Architecture Web Server Sessio maagemet Cotet creatio, format ad delivery Applicatio Server Data access objects Trasactios Busiess logic Resources adapters Data Server Same as 3-tiers Architecture 36

CS -tiers: Architecture (2) Coectors: Remote Procedure Calls (RPC) May protocols Copyright etutorials.com Architectural solutios 37

Example: 5 tiers Presetatio Data Logic Process Cliets Portal Browser Applicatio Cliet Process Web Services WSRP Data Maiframes Data Databases Data Legacy App Web Services WSRP Web Services Process Mobile Idetity/ Policy Web App Web Services Service Ifrastructure Security Services User Iteractio Services Busiess Process Services Custom Services Service Registry Meta-data Repository Compositio Tools Data Services Sematic Services: Mediatio Text Aalytics Iferecig Evet Processig Moitorig Messagig Services Service Maagemet

Cliet server middleware 39

Refereces Fowler et al., Patters of Eterprise Applicatio Architecture, AW 2002 Clemes et al., Documetig Software Architectures, Addiso Wesley, 2010

Questios?