Interoperable Discovery with WCF 4

Report 3 Downloads 58 Views
Interoperable Discovery with WCF 4 Rick G. Garibay [email protected] http://rickgaribay.net Twitter: @rickggaribay

About Me • • • •

Solutions Architect at Neudesic Microsoft MVP, Connected Systems Microsoft Connected Technology Advisor President, Co-Founder Phoenix Connected Systems User Group (PCSUG) • Nearly 12 years professional experience developing Microsoft solutions across industry verticals

Other Conference Sessions • WCF 4: File, New Project, Code, F5 • Routing Patterns Made Easy with WCF 4 • Making Software + Services Tenable with the Windows Azure AppFabric Service Bus • Much More!

• http://www.vconferenceonline.com/shows/spring10/uvc/sess ions.asp

Agenda • • • •

Introduction to Discovery Understanding Discovery Endpoints Ad-Hoc Discovery Support in WCF Managed Discovery Support in WCF

What is WS-Discovery • An Oasis standard for discovering web services. • An interoperable Oasis standard for discovering services including web services. • An interoperable Oasis standard for discovering services (including web services) by multicasting announcements. • An interoperable Oasis standard for discovering services (including web services) by multicasting announcements as well as probes.

Probe Messages • Probe messages are sent from a client (or service) searching for services that match some criteria. • Services that support discovery receive probe requests, and if the probe matches the criteria, respond with a probe match message. • Supports ad-hoc and managed mode.

Probes Service

Client probe

What services are available?

probe

Service

probe match

Service

Configuring Probing • Service is configured for discovery by adding a discovery endpoint and discovery behavior. – This enables the service to respond to probe requests over UDP.

• Client is configured for discovery by adding a discovery endpoint and configuring scopes. – This enables the client to make probe requests over UDP.

Service Configuration

Client Configuration

Configuring a Service for Discovery Probing for available services Consuming a discovered service

DEMO

Scopes • Probes are based on criteria to find • This criteria is grouped into scopes • Scopes take the form of a URI – – – –

http://Prod1/HR/HRService.svc http://localhost/HR/HRService.svc http://Stage1/HR/HRService.svc/1.1 http://Stage1/HR/HRService.svc/beta

Service Configuration

Client Configuration

Probing with Scopes

DEMO

Announcements • Services can send UDP announcements when they start up and shut down • Hello on start up • Bye on shut down • Supports either ad-hoc or managed mode

Announcements Service Client Client Client Client

Hello Bye

Configuring Announcements • Service is configured for discovery by adding a discovery endpoint and discovery behavior, including behavior config for announcements. – This enables the service to respond to probe requests over UDP as well as provide announcements.

• An announcement service must be hosted to listen for announcements and respond to online and offline announcements.

Service Configuration

Announcement Service

Announcing when services enter and leave the network Listening for services entering and leaving the network

DEMO

Managed Discovery • Ad-hoc discovery can result in network saturation. • Only local subnet is supported. • Managed Discovery uses a Discovery Proxy – Subscribes to announcements – Responds to probes

• Can span multiple subnets • Much less chatty because all clients probe the Discovery proxy

Managed Discovery Service

Hello

Discovery Proxy What services are available?

Client

Client Client Client

Thank You • WCF Discovery on MSDN: http://msdn.microsoft.com/enus/library/dd456782(VS.100).aspx • A Developer's Introduction to Windows Communication Foundation 4: http://msdn.microsoft.com/enus/library/ee354381.aspx • Join me for a live chat on Wed, 4/7 at 10:30 am • The conversation continues on twitter: @rickggaribay #sswug10wcf4

Interoperable Discovery with WCF 4 Rick G. Garibay [email protected] http://rickgaribay.net Twitter: @rickggaribay