CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit...

28
CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sud 1

Transcript of CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit...

Page 1: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

CSCI 5828 — Spring 2010

Foundations of Software Engineering

- Arpit Sud

1

Page 2: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

AgendaWhat is it?Why to use it? When to use it?How to implement it ? Where not to apply it?

2

Page 3: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Service oriented Architecture

3

Page 4: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

What is (Software) Architecture?

Software architecture is the fundamental organizationof a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution.

- IEEE 1471-2000

4

Page 5: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

What is Service ?

A mechanism to enable access to one or more capabilities

using a prescribed interface

consistent with constraints and policies as specified by the service description.

Windows service : RPC Locator, Event Log

Software Service: Distribution, Alert, Log

5

Page 6: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

So SOA is : A business-centric IT architectural approach that

supports integrating your business as linked, repeatable business tasks, or services. - IBM

Service Oriented Architecture is a paradigm for organizing and utilizing distributed capabilities that may be under the control of different ownership domains.

6

Page 7: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

SOA

Components of SOA

Ref: Element of SOA

7

Front End ServiceService

RepositoryService Bus

Contract Implementation Interface

Business Logic Data

Page 8: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Architectural Principles Loose coupling - Services maintain a relationship

that minimizes dependencies and only maintain an awareness of each other

Service contract - Services adhere to a communications agreement as defined collectively by one or more service description documents

Service abstraction - Beyond what is described in the service contract, services hide logic from the outside world

Service reusability - Logic is divided into services with the intention of promoting reuse

8

Page 9: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Architectural Principles… Service composability - Collections of services can

be coordinated and assembled to form composite services

Service autonomy – Services have control over the logic they encapsulate

Service optimization – All else equal, high-quality services are generally considered preferable to low-quality ones

Service discoverability - Services are designed to be outwardly descriptive so that they can be found and assessed via available discovery mechanisms

9

Page 10: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Service oriented Architecture

10

Page 11: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Business Benefits Decreased cost:

Add value to core investments by leveraging existing assets

New systems can be built faster for less money because

Reducing integration expense

Built for flexibility

Long term value of interoperability

11

Page 12: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Business Benefits… Increased employee productivity:

Built on existing skills

Consolidate Duplicate Functionality

Built for partnerships:

Standards based

Business relationships expressed via service interactions

Integration is driven by what is needed, not what is technically possible

12

Page 13: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Business Benefits… Agility - Built for change

Helps applications evolve over time and last

Abstract the backend and replace over time

Focusing on core-competencies

Incremental implementation approach is supported.

Service Outsourcing – new business model!

13

Page 14: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Technical Benefits Services Scale

Build scalable, evolvable systems

Scale down to mobile devices

Scale up to for large systems or across organizations

Manage complex systems

Does not require centralized services

Empowers users with high end communication

Platform independent Use

Loose Coupling allows flexibility

14

Page 15: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Service Oriented Architecture

15

Page 16: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Drivers Large scale Enterprise systems

Internet scale provisioning of services

Reduce the cost of doing business

Implementation abstraction

Business process reuse (multiple use cases for same process)

16

Page 17: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Service oriented Architecture

17

Page 18: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Getting to SOA Think services not objects

Select which services to expose

Choose a communication mechanism

Consider the Security mechanism

Consider the re-usability

18

Page 19: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Comprises of Services : a function or business processing that is

well-defined, self-contained, and does not depend on the context or state of other services

Loan Processing Service, Weather Forecast Service

Connections : The link connecting these self-contained distributed services with each other.

For web services : HTTP and SOAP.

19

Page 20: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

ServiceRequest - Response

20

Service Provider

Service Consumer

Query For Service

Invoke Service (via Proxy)

Service Directory/ Repository

Register The Service

Page 21: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Web Service Example Using ASP.NET

21

<%@ WebService Language="VBScript" Class="TempConvert" %>

Imports System

Imports System.Web.Services

Public Class TempConvert :Inherits WebService

<WebMethod()>

Public Function FahrenheitToCelsius (ByVal Fahrenheit As String) As String

dim fahr

fahr=trim(replace(Fahrenheit,",","."))

if fahr="" or IsNumeric(fahr)=false then return "Error"

return ((((fahr) - 32) / 9) * 5)

end function

<WebMethod()>

Public Function CelsiusToFahrenheit (ByVal Celsius As String) As String

dim cel

cel=trim(replace(Celsius,",","."))

if cel="" or IsNumeric(cel)=false then return "Error"

return ((((cel) * 9) / 5) + 32)

end function

end class

Page 22: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Web Service Example Using ASP.NET

Test the Web service :

Celsius To Fahrenheit

Fahrenheit To Celsius

Remember :

SOA != Web service.

Web services can implement a service-oriented architecture.

22

Page 23: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Challenges Managing services

Insufficient attention to governance of services can cause performance and reliability issues

Providing proper security for roles

Assuring inter-operability of Services

23

Page 24: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Service Oriented Architecture

24

Page 25: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Where Not to use SOA? When you have homogenous IT environment

When real time performance is critical

When tight coupling is a pro not a con

When things don’t change

25

Page 26: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

Service Question - Answer

Presenter Audience

Question/ Request

Answer/Response

26

Page 27: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

References Elements of SOA, by Dirk Krafzig, Karl Banke, and Dirk Slama

CIO Magazine - ABC: An Introduction to Service-oriented Architecture (SOA): http://www.cio.com/article/40941/ABC_An_Introduction_to_Service_oriented_Architecture_SOA_

Microsoft – Service Oriented Architecture: http://msdn2.microsoft.com/en-us/architecture/aa948857.aspx

Service-Oriented Architecture and Web Services: Concepts, Technologies, and Tools: http://java.sun.com/developer/technicalArticles/WebServices/soa2/

Migrating to a Service-Oriented Architecture: http://www.ibm.com/developerworks/library/ws-migratesoa/

http://www.w3schools.com 27

Page 28: CSCI 5828 Spring 2010 Foundations of Software Engineering - Arpit Sudkena/classes/5828/s10/presentations/... · What is (Software) Architecture? Software architecture is the fundamental

28