DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services...

41
DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Prof. Marcelo de Sá Barbosa

Transcript of DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services...

Page 1: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Prof. Marcelo de Sá Barbosa

Page 2: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

�MÓDULO 6: �Sistemas distribuídos baseados em coordenação.

�Coordenação de serviços Web

Page 3: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Coordenação de serviços Web

A infraestrutura SOAP suporta interações requisição-

resposta entre clientes e serviços web. Entretanto, muitas

aplicações úteis envolvem várias requisições que precisam

ser executadas em uma ordem em particular. Por exemplo,

ao se fazer reservas para um vôo, são reunidas as

informações sobre preço e disponibilidade, antes que as

reservas sejam feitas. Quando o usuário interage com

páginas web por intermédio de um navegador para fazer

reserva em um vôo ou para dar um lance em um leilão, a

interface fornecida pela navegador controla a sequência

em que as operações são executadas.

Page 4: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Transações distribuidas planas e aninhadas

Uma transação cliente se torna distribuída se ativa operações em

vários servidores diferentes. Existem duas maneiras distintas

pelas quais as transações distribuídas podem se estruturadas:

como transações planas e transações aninhadas.

Em uma transação plana, um cliente faz pedidos para mais de um

servidor.

Em uma transação aninhada, a transação de nível superior pode

abrir subtransações e assim sucessivamente em qualquer

profundidade de aninhamento.

Page 5: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

(a) Flat transaction (b) Nested transactions

Client

X

Y

Z

X

Y

M

NT1

T2

T11

Client

P

T

T12

T21

T22

T

T

Transações distribuídas planas e aninhadas

Page 6: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Os servidores que executam pedidos como parte de uma

transação distribuida precisam se comunicar uns com os outros

para coordenar suas ações quando a transação é efetivada

Coordenação de uma transação distribuida

a.withdraw(10)

c.deposit(10)

b.withdraw(20)

d.deposit(20)

Client A

B

C

T1

T2

T3

T4

T

D

X

Y

Z

T = openTransaction

openSubTransactiona.withdraw(10);

closeTransaction

openSubTransactionb.withdraw(20);

openSubTransactionc.deposit(10);

openSubTransactiond.deposit(20);

Page 7: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Tem-se trabalhado em um modelo geral para a coordenação de

serviços web, o qual é semelhante ao modelo de transação

distribuida descrito anteriormente pois têm funções de

coordenador e participante que são capazes de atuar em

protocolos específicos, por exemplo, para executar uma transação

distribuida. Esse trabalho, que é chamado WS-Coordination é

descrito por Langworthy[2004].

Requisitos de coreografia: se destina a suportar interações entre

serviços web que geralmente são gerenciadas por diferentes

empresas e organizações.

Page 8: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

�MÓDULO 8: �Introdução ao SOA

�Serviços

�Gerenciamento de Processos de Negócios

�MODULO 9: �SOA e Desempenho;

�SOA e Segurança;

Page 9: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

SOA – SERVICE ORIENTED ARCHITECTURE

Process management facilitates organizational change supporting

innovation.

“SOA é uma abordagem arquitetural corporativa que permite a

criação de serviços de negócio interoperáveis que podem facilmente

ser reutilizados e compartilhados entre aplicações e empresas.”

Gartner Group

Businesses want change at the speed of business.

Is yours an innovation-driven business?

Page 10: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 11: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 12: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 13: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 14: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

BPM

– Business process management

• BAM

– Business activity monitoring

• KPI

– Key performance indicator

• Organization, business, company, corporation, and enterprise

will be used interchangeably

• Free-form process layout in WebSphere Business Modeler

– The traditional flowchart layout with object attributes

• Swimlane process layout in Modeler

– Emphasis is on the handoffs between performers

• Governance

– Implementing standards, controls, and ownership of processes

throughout the enterprise

Page 15: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Service

– Web service: integration of machine-to-machine interaction over the Web

• SOA

– Service-oriented architecture

• J2EE (Java 2 Platform, Enterprise Edition)

– A programming platform

• Eclipse

– An open source platform-independent software framework

• Business object

– A set of attributes that represents a business entity

• Relationships (data cross-referencing)

– An association between two or more data entities

• WSDL

– Web Services Description Language

• BPEL

– Business Process Execution Language

• Process choreography

– The order in which services will be invoked

Page 16: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 17: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 18: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 19: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 20: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 21: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 22: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 23: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

• Simple things do not necessarily need a model.

– The solution is relatively easy to construct.

– Few people collaborate or use the solution (often only one).

– The scope of future needs is unlikely to grow substantially.

• Certain complex systems must begin with a design or another

abstract representation.

– Construction of an office building needs architectural plans and a

mock-up for visualization.

• Modeling provides visualization of the entire system.

– Allows assessment of various options

– Communicates design risks before actual construction

Page 24: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

A model serves as an abstraction of the item being built.

• Business analysts, engineers, scientists, and other

professionals who build complex structures or systems create

models.

– Sometimes the models are physical.

• Scaled mock-ups of airplanes, houses, or autos

– Sometimes the models are less tangible.

• Financial models, market trading simulations, electrical circuit

diagrams

• Traditional flow charts are a common method for representing

the paths of a process.

– Structure charts, or simple block diagrams with arrows, are often

used on whiteboards.

Page 25: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 26: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 27: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 28: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Web Services Description Language (WSDL) is the XMLbased

file that describes the Web service.

– The Web service request uses this file to bind to the service.

• SOAP is the XML-based protocol that the Web service request

uses to invoke the service.

• Universal Description Discovery and Integration protocol is the

registry that hosts the service broker.

– UDDI is similar to the Yellow Pages in a phone book.

Page 29: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

Page 30: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

�MODULO 9:

�SOA e Desempenho.

�SOA e Segurança.

30

Page 31: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

SOA

O seu serviço está seguro?

31

Page 32: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

ATAQUE x DEFESA

32

Page 33: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

FOOTPRINT

33

Page 34: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

SNIFFING, DATA TAMPERING, REPLAY-ATTACK, MITM

Man-in-the-middle-attack

34

Page 35: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

SOLUÇÕES

35

Page 36: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

ATAQUES DE FORÇA BRUTA XDOS – XML denial of service

36

Page 37: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

SOLUÇÕES

37

Page 38: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

CODE INJECTION - XML

38

Page 39: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

SOLUÇÕES

39

Page 40: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

PARSING ATTACKS

40

Page 41: DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS · DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS Web Services Description Language (WSDL) is the XMLbased file that describes the Web service.

DESENVOLVIMENTO DE SISTEMAS DISTRIBUIDOS

SOLUÇÕES

XML Schema é uma linguagem baseada no

formato XML para definição de regras de

validação ("esquemas") em documentos no

formato XML41