BB12: Microsoft .NET Service Bus Protocols, Protection, and How ...

fortnecessityusefulDéveloppement de logiciels

14 déc. 2013 (il y a 3 années et 6 mois)

78 vue(s)



Clemens
Vasters


Technical Lead, Service Bus


.NET Services

BB12










Service Orchestration

Service Registry

Naming

Federated
Identity and
Access Control

Messaging Fabric

Clients


MS/3
rd

Party Services

On
-
Premise ESB

ESB

Desktop,
RIA, Web

Desktop,
RIA, &
Web

Your
Services






Sender

Receiver

?

Machine Firewall

Network Firewall

Network Address Translation

Dynamic IP

Service Registry

Naming

Federated
Identity and
Access Control

Messaging Fabric



Corresponding WCF Binding

Service Bus Relay
Binding

BasicHttpBinding

BasicHttpRelayBinding

WebHttpBinding

WebHttpRelayBinding

WSHttpBinding

WSHttpRelayBinding

WS2007HttpBinding

WS2007HttpRelayBinding

WSHttpContextBinding

WSHttpRelayContextBinding

WS2007HttpFederationBinding

WS2007HttpRelayFederationBinding

NetTcpBinding

NetTcpRelayBinding

NetTcpContextBinding

NetTcpRelayContextBinding

n/a
[loosely

related to
NetMsmqBinding
]

NetOnewayRelayBinding

n/a
[loosely related to
NetTcpPeerBinding
]

NetEventRelayBinding


Service Bus Relay
Binding

Transport

Binding Element

BasicHttpRelayBinding

Http(s)RelayTransportBindingElement

WebHttpRelayBinding

Http(s)RelayTransportBindingElement

WSHttpRelayBinding

Http(s)RelayTransportBindingElement

WS2007HttpRelayBinding

Http(s)RelayTransportBindingElement

WSHttpRelayContextBinding

Http(s)RelayTransportBindingElement

WS2007HttpRelayFederationBinding

Http(s)RelayTransportBindingElement

NetTcpRelayBinding

TcpRelayTransportBindingElement

NetTcpRelayContextBinding

TcpRelayTransportBindingElement

NetOnewayRelayBinding

OnewayRelayTransportBindingElement

NetEventRelayBinding

OnewayRelayTransportBindingElement

HttpTransportBindingElement

HttpRelayTransportBindingElement

SymmetricSecurity
-
BindingElement

TextMessageEncoding
-
BindingElement

ReliableSessionBindingElement

SymmetricSecurity
-
BindingElement

TextMessageEncoding
-
BindingElement

ReliableSessionBindingElement

WSHttpBinding

WSHttpRelayBinding

Listener:

SB Internal

Socket Binding

Client Channel:

HttpTransport
-
BindingElement

Listener:

System.Net.

HttpListener

Client Channel:

System.Net.

WebRequest

Same binding elements


Different Transport

Service Bus

Sender

Receiver

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

TCP/SSL
828

Backend

Naming

Routing

Fabric

Frontend

Nodes

TCP/SSL
808/828

Msg

Msg

NAT

Firewall

Dynamic IP

Subscribe

Route

NLB

Service Bus

Sender

Receiver

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

TCP/SSL
828

Backend

Naming

Routing

Fabric

Frontend

Nodes

TCP/SSL
808/828

Msg

Msg

NAT

Firewall

Dynamic IP

Subscribe

Route

NLB


Listener Socket Connection


Similar to WCF
NetTcpBinding


Full
-
duplex communication path


.NET Framing message delineation


.NET Binary encoding


SSL channel overlaid on socket


Always connects
to

port 828 on SB


Port # will change before V1


OnewayRelayTransportBindingElement

tries to reconnect as needed when
connection drops


Service Bus

Sender

Receiver

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

TCP/SSL
828

Backend

Naming

Routing

Fabric

Frontend

Nodes

TCP/SSL
808/828

Msg

Msg

NAT

Firewall

Dynamic IP

Subscribe

Route

NLB


Sender Socket Connection


Uses
NetTcpBinding

underneath


Full
-
duplex communication path


.NET Framing message
delineation


.NET Binary encoding


SSL channel overlaid on socket


Connects to port 808 on SB: Open


Connects to port 828 on SB: SSL


Port #s will change before V1


Oneway

transport tries to
reconnect as needed when
connection drops

Service Bus

Sender

Receiver

http://servicebus.windows.net/services
/
solution
/
a
/
b
/

HTTPS

443

Backend

Naming

Routing

Fabric

Frontend

Nodes

TCP/SSL
808/828

create buffer

Msg

Subscribe

Route

NLB

Message Buffer

Msg

subscribe

subscribe

Backend

Naming

Routing

Fabric

Frontend

Nodes

Receiver

http://servicebus.windows.net/services
/
solution
/
buf
/

Relay HTTP Listener

HTTP Socket
Forwarder

MB Factory
Extender

Message

Buffer

Create

Subscribe

SOAP


<
sb:ProcessAt
>


<
sb:RelayAccessToken
>


CreateMessageBuffer

Operation

Plain HTTP POST


X
-
Process
-
At


X
-
MS
-
Identity
-
Token


X
-
Http
-
Method
-
Equiv: X
-
CREATEMB

<
sb:ProcessAt
>

Check
Token

Create

Backend

Naming

Routing

Fabric

Frontend

Nodes

Service Bus

Receiver

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

1

HTTP
-
Socket Forwarder

HTTPS

443

NLB

Message Buffer

2

3

5

Ctrl

4

6

Message Buffer resides on the Service Bus node that
received the ‘Create’ request.

Service Bus

Receiver

sb://servicebus.windows.net/services
/
solution
/
buf
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

HTTPS

443

NLB

Message Buffer

Subscribe

SOAP Subscribe


<
sb:ProcessAt
>


<
sb:RelayAccessToken
>

Plain HTTP POST


X
-
Process
-
At


X
-
MS
-
Identity
-
Token


X
-
Http
-
Method
-
Equiv: X
-
SUBSCRIBE

Service Bus

sb|http
://servicebus.windows.net/services
/
solution
/
*
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

Message Buffer

4

Sender

TCP/SSL
808/828

Msg

HTTPS
80/443

Route

SOAP Relayed
Oneway



<
sb:RelayAccessToken
>


Any Operation

HTTP Relayed
Oneway


X
-
MS
-
Identity
-
Token


Any method (except GET)

Service Bus

Receiver

http
://servicebus.windows.net/services
/
solution
/
buf
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

HTTPS

443

NLB

Message Buffer

Request is “parked” until

(a)
Timeout expires (30s max)
or

(b)
At least one message available

SOAP
RetrieveMessages


<
sb:ProcessAt
>


<
sb:RelayAccessToken
>

Plain HTTP POST


X
-
Process
-
At


X
-
MS
-
Identity
-
Token


X
-
Http
-
Method
-
Equiv:

X
-
RETRIEVE

Options


Timeout


Encoding


MaxMessages

Service Bus

Receiver

sb://servicebus.windows.net/services
/
solution
/
buf
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

HTTPS

443

NLB

Message Buffer

Available Response Encodings


SOAP


BareEnvelopeSequence

Bare envelopes inside
response body


WrappedEnvelopeSequence

Envelopes wrapped in inside
body





HTTP


MimeMultipart

multipart/mixed with
application/http (complete
incoming requests)


MimeApplicationHttp

application/http (complete
incoming requests)


RequestAsResponse

Incoming request mapped
onto retrieval response.


Response

Service Bus

Receiver

sb://servicebus.windows.net/services
/
solution
/
buf
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

HTTPS

443

NLB

Message Buffer

Renew


<
sb:ProcessAt
>


<
sb:RelayAccessToken
>


Renew Operation

Plain HTTP POST


X
-
Process
-
At


X
-
MS
-
Identity
-
Token

Options


Timeout

Renewal follows WS
-
* patterns


MB expires after <30 minutes


Requires explicit renewal

GetStatus


<
sb:ProcessAt
>


<
sb:RelayAccessToken
>


GetStatus

Operation

Plain HTTP GET


X
-
Process
-
At


X
-
MS
-
Identity
-
Token

Returns


Expiration

Delete


<
sb:ProcessAt
>


<
sb:RelayAccessToken
>


Delete Operation

Plain HTTP DELETE


X
-
Process
-
At


X
-
MS
-
Identity
-
Token



Clemens Vasters


Service Bus Technical Lead


.NET Services















OnewayRelayTransport
-
BindingElement

CompositeDuplexBindingElement

BinaryMessageEncoding
-
BindingElement



Custom Binding

Listener:

SB Internal

Socket Binding

Client Channel:

TcpTransport
-
BindingElement



Clemens
Vasters

Service Bus Technical Lead

.NET Services











Service Bus

Sender

Receiver

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

Ctrl

1

2

3

4

Socket
-
Socket

Forwarder

Ctrl

TCP/SSL
818

Oneway

Rendezvous

Ctrl
Msg

NLB


Preferred







Service Bus

Sender

Receiver

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

Ctrl

Oneway

Rendezvous

Ctrl
Msg

TCP/SSL
818, 819

NAT Traversal Connection













Service Bus

Sender

Receiver

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

Ctrl

1

2

3

4

HTTP
-
Socket

Forwarder

Ctrl

HTTP/S

80/443

Oneway

Rendezvous

Ctrl
Msg

NLB











Service Registry

Naming

Federated
Identity and
Access Control

Messaging Fabric



Clemens
Vasters

Service Bus Technical Lead

.NET Services

Service Bus

sb://servicebus.windows.net/services
/
solution
/
a
/
b
/

Backend

Naming

Routing

Fabric

Frontend

Nodes

How does this part work?











Management & Deployment Fabric




SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

SB

Replication Neighborhood

Unicast
: Point to point

Multicast: Routed along ring

Distributed Hash Table

Names hash to nodes






www.microsoftpdc.com

©
2008 Microsoft
Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademar
ks
and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the
dat
e of this presentation. Because Microsoft must respond to changing market
conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accu
rac
y of any information provided after the date of this presentation.

MICROSOFT
MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.