• No results found

SOA Service Oriented Architecture

N/A
N/A
Protected

Academic year: 2021

Share "SOA Service Oriented Architecture"

Copied!
27
0
0

Loading.... (view fulltext now)

Full text

(1)

1

Ambientes de

Desenvolvimento Avançados

http://www.dei.isep.ipp.pt/~jtavares/ADAV/ADAV.htm

Aula 16

Engenharia Informática 2006/2007 José António Tavares [email protected]

2006/2007 ADAV

SOA

(2)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

3

B, Bleeding edge is a phase in which a few visionary organizations start to work out certain concepts and apply them, having to create new technologies from scratch or use existing technologies in a very unusual.

L, Leading edge is a phase in which there is industry support for a new technology, but the right way to use this technology is still known to only a few organization.

M, Mature is the phase in which the knowledge of a new approach is largely available and the supporting technologies are stable.

1970 1980 1990 2000 2010

Evolução para os Componentes na Industria

Structured programming B L M Object-orientation B L M Distributed objects/systems B L M Component-based dept. B L M Pascal, Ada, COBOL, RPG, Structured methodologies C++, Eiffel, OOA/D (Booch, OMT, Objectory) CORBA2.0, OpenDoc, ActiveX, DCOM, UML CORBA3.0, EJB, DNA, XML, e-commerce, Business component approach 2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

4

Phase I

Phase I

Downsize

Downsize ••••Client/ServerClient/ServerDCE DCE

Phase II Phase II Components Components • •CORBACORBA • •DCOMDCOM • •EJBEJB Phase III Phase III Messaging

Messaging ••MOMMOM

(3)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

Issues with Existing Models

z

Proprietary protocols

z

Interoperability

z

Platform lock-in

z

Flexibility

2006/2007 ADAV

What is SOA?

z

IT architecture for request - reply

applications

z

Application functions are modularized

and presented as services

z

Services are loosely coupled

z Service interface is independent of the implementation

(4)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

7

Terminology

z

Message

z Data exchanged between services z Not Objects. Code doesn't travel

z

Context

z Defines scope of action, conversation z Clothes-line for state and infrastructure

z

Destinations

z Target service or service class. z Not "http://somewhere/"

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

8

Service Orientated Architecture

z An architectural approach to creating systems built from

autonomous services

z Integration as a fore-thought rather than an after-thought

z A service is a program you interact with via message

exchanges

z Services are built to last

z Availability and stability are critical

z A system is a set of deployed services cooperating in a given

task

z Systems are built to change

(5)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

9

Four Tenets of Service

Orientation

1. Boundaries Are Explicit

2. Services Are Autonomous

3. Services Share Schema And Contract, Not Class

4. Service Compatibility Is Determined By Policy ten·et[ténnət]

(plural ten·ets)

noun

something accepted as an important truth: any of a set of established and

fundamental beliefs, especially one relating to religion or politics (formal)

a tenet of Christianity

[Late 16th century. From Latin , literally “he or she holds,” the 3rd person present singular form of tenere“to hold.”]

Microsoft® Encarta® Reference Library 2005. © 1993-2004 Microsoft Corporation. All rights reserved.

ten·et[ténnət] (plural ten·ets) noun

something accepted as an important truth: any of a set of established and fundamental beliefs, especially one relating to religion or politics (formal) a tenet of Christianity

[Late 16th century. From Latin , literally “he or she holds,” the 3rd person present singular form of tenere“to hold.”]

Microsoft® Encarta® Reference Library 2005. © 1993-2004 Microsoft Corporation. All rights reserved.

2006/2007 ADAV 10

Examples of Services

z

Storage service

z

Data transfer

z

Troubleshooting service

z

Common theme is monitoring service,

(6)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

11

Technology Agnostic Interaction

z

SOAP / XML is the only hope

z COM, CORBA, RMI assume platform z Anything binary assumes platform z Any transport assumes platform

z

XML InfoSet is the focal point

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

12

Characteristics of SOA

z Services have platform

independent, self describing interfaces (XML)

z Messages are formally

defined

z Services can be discovered z Services have quality of

service characteristics defined in policies

z Services can be provided on

any platform SOA SOA SOA Interoperable Loosely Coupled Re-Usable Composable

(7)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

Why SOA? – The Cruel Reality

Screen Scrape Screen Scrape Screen Scrape Screen Scrape Message Queue Message Queue Message Queue Download File Download File Download File Transaction File Transaction File Transaction File ORB ORB CICS Gateway CICS Gateway APPC APPC RPC RPC Transaction File Sockets Sockets Message Message Application Application Application Application Application Application Application Application Application Application Source: Gartner 2006/2007 ADAV 14 Oracle Oracle Financials Financials Standard Interface Standard Interface Custom Order Custom Order Application Application Standard Interface Standard Interface New Web New Web Application Application Standard Interface Standard Interface Siebel Siebel CRM CRM Standard Interface Standard Interface Mainframe HR Mainframe HR Application Application Standard Interface Standard Interface .NET Inventory .NET Inventory Application Application Standard Interface Standard Interface New Supply Chain Management Application

(Business Process or Composite Application)

Why SOA?

z Respond to business changes

z Address new needs with existing applications z Unlock existing application investments

z Support new channels & complex interactions z Support organic business

(8)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

15

Anatomy of a Service

Service Consumer Service Consumer Interface Proxy Interface Proxy Service Service Interface Interface Service Service Implementation Implementation New Service New Service Wrapped Wrapped Legacy Legacy Composite Composite Service Service 2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

Service

Service

Consumers

Consumers ProducersProducersService Service

Service Communication

z

Communicate with messages

z

No knowledge about partner

(9)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

17

Service Interfaces and

Service Interfaces and

Service Implementations

Service Implementations

Service Consumers

Service Consumers

Service Delivery Bus

Service Delivery Bus

Service Service Rules Rules & Config & Config Cha nge Cha nge

Service Platform

Control Control Service Service Reporting Reporting & Mgmt & Mgmt 2006/2007 ADAV 18

SOA – Based on Standards

SOA Tools App Dev Framework

SOAP, WSDL, UDDI

SOAP, WSDL, UDDI

WS

WS--I Basic ProfileI Basic Profile

Web Service Policy

Web Service Policy

Web Service Transactions

Web Service Transactions

Web Service Reliable Messaging

Web Service Reliable Messaging

J2EE 1.4

J2EE 1.4

Web Service Security

Web Service Security

Web Service Orchestration

Web Service Orchestration

Web Service Distributed Management

Web Service Distributed Management

Web Service Coordination

Web Service Coordination

Web Service Choreography

Web Service Choreography

TPM, Mainframe, TPM, Mainframe, Legacy Sys Legacy Sys Applications Applications Databases Databases B2B Partners B2B Partners

J2EE Application Server (OracleAS 10

(10)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

19

Benefits of SOA

z

Better reuse

z Build new client functionality on top of existing Business Services

z

Well defined interfaces

z Make changes without affecting clients

z

Easier to maintain

z Changes/Versions are not all-or-nothing

z

Better flexibility

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

20

(11)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

21

Conteúdo

z

Introdução

z história da computação distribuída

z

Arquitecturas

z

SOAP

z

WSDL

z

UDDI

2006/2007 ADAV 22

Web Services

z A Web Serviceis a method that is callable

remotely across a network

z The Service Web will be the backbone of

functionality for the coming generation of distributed applications

(12)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

23

Web Services

z Web servicessão serviços oferecidos via Web.

z Web servicessão aplicações modulares que são

autodescritas e podem ser publicadas, localizadas e invocadas de qualquer local na Web (ou numa LAN).

let stock_value = apli2.get_stock("IBM")

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

24

(13)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

25

z

Companies, suppliers, partners, and

customers must be able to work together

z Faster than ever before z Over the Internet

z Or risk “death by isolation”

z

Leverage Internet cost structure

Web Services

2006/2007 ADAV 26

Web Services

z

Possible Solutions

z Distributed computing z Web sites (portals) z Web Services

(14)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

27

Computação Distribuída

z CORBA/IIOP (OMG) www.corba.org/

z Common Object Request Broker Architecture z Internet Inter-ORB Protocol

z especialização TCP/IP de GIOP (General ...)

z Statefull Programming Model

z Modelo orientado à ligação (overheads de sessão)

z COM e DCOM (MS) www.microsoft.com/com/

z Complexo

z Orientado à ligação (overheads de sessão)

z RMI (SUN) java.sun.com/products/jdk/rmi/

z Bom desempenho

z Apenas para a linguagem JAVA

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

28

Comunicação

síncrona/assíncrona

z DCOM e RMI são orientados ao pedido/resposta

z Síncronos; não permitem envio de mensagens só num

sentido

z JMS (Java) java.sun.com/products/jms/

z Java Message Service

z Suporta filas de mensagens e o modelo editor/subscritor

z MSMQ (MS) www.microsoft.com/msmq/default.htm

z Microsoft Message Queueing

z Suporta trocas segura e fiável de mensagens, suporte para

(15)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

29

Web Services

2006/2007 ADAV 30

Portal Limitations

z No standard way to expose functionality z Integration is expensive and error-prone z Hard to outsource

z Not designed to be used outside original scope z The problem?

z HTML is designed for presentation to people z Can’t repurpose it in a general, reliable way z Don’t even think about screen scraping

(16)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

31

Web Services

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

32

What Is a Web Service?

z

The solution? Web Services!

z

A Web Service exposes functionality to a

consumer

z Over the Internet or intranet z A programmable URL

(17)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

33

What Is a Web Service?

z

Based on Web standards

z HTTP, XML, SOAP, WSDL, UDDI, with more to come

z

Can be implemented in any language on

any platform

z

Black boxes

z Component-like, reusable

2006/2007 ADAV 34

Web Services Standards

z XML is the “lingua franca”

z SOAP (Message format and protocol)

z WSDL (Web Services Description Language) z UDDI (Directory)

(18)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

35

What Is a Web Service?

z

A Web Service combines the best

features of distributed computing and

portals and eliminates the worst

z Provides a mechanism for invoking methods remotely

z Uses Web standards (e.g. HTTP, XML) to do so

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

36

What is a Web Service?

z Web Services allow you to interconnect:

z Different companies z Many/any devices z Applications z Different clients

z Not just browsers

z Distribution and integration of application logic z Enable the programmable Web

z Not just the purely interactive Web z Web Services are loosely coupled

(19)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

37

z

New paradigm for Internet development

z

Deliver applications as services

z

Richer, customer-driven experience

z

Continuous delivery of value/bits

z

Third-generation Internet

What is a Web Service?

2006/2007 ADAV 38

z Web Services fornecem uma abstracção entre o código

da aplicação cliente e o código da aplicação servidor

What is a Web Service?

(20)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

39

What Is a Web Service?

z "Web services are modular, self-describing applications that can be published, located and invoked from just about anywhere on the Web or a local Network. The provider and the consumer of the XML Web Service do not have to worry about the Operating System, language environment or component model used to create or access the XML Web Service, as they are based on ubiquitous and Open Internet standards, such as XML, HTTP and SMTP."

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

40

Evolution of the Web

Generation 1 Static HTML HTML Generation 2 Web Applications HTML HTML, XML HTML, XML Generation 3 Web Services

(21)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

41

Web Service as an API

Hardware BIOS

API OS

Application Web Services

API

What is a Web Service?

2006/2007 ADAV 42

Benefits

z Everyone

z Leverage existing infrastructure z “Build or buy” development decisions z Minimize development time/costs

z Enterprises

z Integration imperative

z Dynamic, easy B2B relationships

z New Web-based businesses

z Greater personalization

z New services/new revenue streams z Be “everywhere” vs. single destination

(22)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

43

Other Web Services

Partner Web Service

Partner Web Service

Data Access and Storage Tier Application Business Logic Tier

YourCompany.com

Internet + XML

Web Services Overview

Application Model

Other Applications

End Users

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

44

The Components of Web

Services

z

Web services are comprised of six

fundamental components:

1. Delivery medium:Internet

2. Delivery protocol:HTTP

3. Message format/encoding:SOAP

4. Service descriptions:WSDL

5. Web Service Publication:UDDI

(23)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

45

Web Services – Delivery Medium

z

Web services use the

Internet

as the

medium for service delivery.

z

Therefore, only computers connected to

the Internet can provide or consume a

Web service.

(Of course, what computers

aren’t

connected to the Internet nowadays?)

2006/2007 ADAV 46

Web Services – Delivery Protocol

z

Web services use

HTTP

H

yper

T

ext

T

ransfer

P

rotocol – as the delivery

protocol.

z

HTTP is a well-known, simple, open

standard that is supported by Web

servers, programming libraries, and

common client applications, like Web

browsers.

(24)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

47

Web Services – Message Format

z Communications to and from a Web service are

packaged in messages formatted in SOAP, which

stands for Simple Object Access Protocol.

z SOAP defines a protocol for formatting a message. z SOAP messages are XML-formatted.

We’ll be examining SOAP extensively in future lectures!

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

48

Web Services – Service

Description

z Web services need to be self-describing. That is, a Web service needs to be able to spell out precisely what services it offers, how the services can be invoked, and the service interface.

z This description is accomplished with WSDL, or Web Service Description Language.

z WSDLis an XML-formatted file that provides

this information vital to those who wish to consume the Web service.

(25)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

49

Web Services – Publication

z In order for others to be able to find out about the Web services a company offers, there is a public directory of Web services.

z UDDI, or Universal Description, Discovery, and Integration, is an online directory of Web

services.

z This directory is jointly managed by IBM, SAP, SUN, Microsoft, and other major players.

2006/2007 ADAV 50

Web Services - Discovery

z WS-Discoveryspecifies a protocol for developers

to discover the Web services a particular Web site/company offers.

z WS-Discovery is useful for learning about the Web services a particular company or department

provides.

We’ll talk about WS-Discovery in more detail in future lectures!

(26)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

51

Two Views of Web Services

z Keep in mind that when working with Web

services you will be taking one of two approaches:

z You will be a producer. This means you will be

creating a Web service for others to utilize.

z You will be a consumer. This means you know of

some Web service that you wish to utilize via a desktop application or Web page.

As we will see throughout this class, both producing and consuming Web services with .NET is a breeze!

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

52

Questionário

Indique quais os problemas da herança por implementação na COP (Component Oriented Programming).

Em que medida a composição tenta resolver esses problemas?

z Resposta por email até 06/12/2005 para

[email protected] corpo da mensagem.

(27)

2006/2007 ADAV

Ambientes de Desenvolvimento Avançados

53

Questões

References

Related documents

Secondly, structural invariance of the questionnaire shows that the DFS-2 Italian version is a valid and reliable instrument for measuring the experience of flow not only in sports,

The ACC International Admissions Counselor will release an official acceptance letter and I-20 form to the applicant for use in applying for the F-1 visa in his/her home

To balance cost, responsiveness and experience, B2B organisations need to look at the end-to-end customer journey, making individualised choices for products and services,

(1992b, 1998) have identified several characteristics of the associative networks that differentiate the words’ lexical representational structure in the long-term memory: the

ALL RIGHTS RESERVED - © Neodata Group, 2015 47% 2,5X 80% +191% Delle ricerche su Google sono effettuate da mobile Crescita e-commerce prevista entro il 2016 in Italia

Our conclusion is that the classical formulation of the "dutch book argument" may be slightly improved, by stating that the said normalized implied probabilities always

Teaching and learning piano in Kuwait Differences in Kuwait Student exposure to music is limited Teacher exposure to music is high Inclusion of Arabic music elements Future

Program evaluation took place across five dimensions: a site visit by an NSA/GenCyber evaluation team; administration of a 3-hour simulated CEH certification exam;