beyond discovery

38
Beyond Discovery Shaun Foley Principal Applications Engineer, RTI

Upload: maggie-brown

Post on 30-Dec-2015

67 views

Category:

Documents


0 download

DESCRIPTION

Beyond Discovery. Shaun Foley Principal Applications Engineer, RTI. Topics. Unicast Discovery How can applications discover each other when multicast is unavailable or undesirable? Static Endpoint Discovery - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Beyond Discovery

Beyond Discovery

Shaun FoleyPrincipal Applications Engineer, RTI

Page 2: Beyond Discovery

Topics

• Unicast Discovery– How can applications discover each other when

multicast is unavailable or undesirable?• Static Endpoint Discovery

– How can I minimize the configuration burden when using RTI Limited Bandwidth Static Discovery Plugins?

• User Discovery– How does DDS discovery fit into the broader

picture of system architecture?

Page 3: Beyond Discovery

Topics

• Unicast Discovery– How can applications discover each other when

multicast is unavailable or undesirable?• Static Endpoint Discovery• User Discovery

Page 4: Beyond Discovery
Page 5: Beyond Discovery

Tell Nathan I am in room 205

AngelaHotel

Reception

Track guests and room numbers.

Nathan

Where is Angela?

Communication established: decide where to meet for beer

Angela : room 205

Call room 205

Page 6: Beyond Discovery

Tell everyone I am address 205

Application ADiscovery

Proxy

A: 205 B: 408 …

Application B

Where is everyone?

Contact 205Contact 202Contact 408…

Communication established:Begin app biz-logic

Track applications and addresses

Page 7: Beyond Discovery

Tell everyone I am address 205

Application ADiscovery

Proxy

A: 205 B: 408 …

Application B

Where is everyone?

Contact 205Contact 202Contact 408…

Track applications and addresses

Contact proxy at well-known address

Communication established:Begin app biz-logic

Contact proxy at well-known address

Call add_peer() on received addresses

Page 8: Beyond Discovery

athena

Domain Participant 0

Domain Participant 1

Domain Participant 2

Domain Participant 3

Domain Participant 4

Remote Participant

Remote Participant

peer list: 3@athena

peer list: 1@athena

discovery announcements

An Implementation Aside:Peer Indices and Addresses

Page 9: Beyond Discovery

struct PeerEntry { string addr; //@key ulong pidx; //@key};

struct PeerEntry { string addr; //@key sequence<ulong> pidxs;};

struct PeerEntry { string addr; //@key ulong max_pidx;};

Data Types

Publishes unneeded data.Resource limits depend on # of expected DPs on node.

Must choose arbitrary sequence bound.

Last value cache.Relies on idempotent add_peer().Only removes peer when last DP on machine dies.

Apps only care about the highest participant index at a given address:add_peer(“[email protected]”);remove_peer(“[email protected]”);

Page 10: Beyond Discovery

Discovery Proxy

Address 128Participant Idx 0

Peer Map – published durably

Initial peers: 0@128Multicast rx addrs: empty

Addr

PIdx

Page 11: Beyond Discovery

Application

Discovery Proxy

Address 128Participant Idx 1

Address 128Participant Idx 0

Peer Map – published durably

Initial peers: 0@128Multicast rx addrs: empty

128 1

Addr 128

PIdx 1

Page 12: Beyond Discovery

Application

Discovery Proxy

Address 128Participant Idx 1

Application

Address 128Participant Idx 2

Address 128Participant Idx 0

Peer Map – published durably

Initial peers: 0@128Multicast rx addrs: empty

128 1

128 2

Addr 128 128

PIdx 1 2

Page 13: Beyond Discovery

ApplicationDiscovery

Proxy

Normal application functions

Contact proxy at well-known address

When proxy tells us about new applications, call add_peer()

proxy_client.h

Three lines of code to change normal application to use unicast discovery proxy

Page 14: Beyond Discovery

Application

Discovery Proxy

Address 128Participant Idx 1

Application

Address 128Participant Idx 2

Address 128Participant Idx 0

Peer Map – published durably

Initial peers: 0@128Multicast rx addrs: empty

128 1

128 2

Addr 128 128

PIdx 1 2

Page 15: Beyond Discovery

Application

Discovery Proxy

Address 128Participant Idx 1

Application

Address 128Participant Idx 2

rtiddsspy

Address 1Participant Idx 0

Address 128Participant Idx 0

Peer Map – published durably

Initial peers: 0@128Multicast rx addrs: empty

128 1

10

128 2

Addr 128 128 1

PIdx 1 2 0

Page 16: Beyond Discovery

Topics

• Unicast Discovery• Static Endpoint Discovery

– How can I minimize the configuration burden when using RTI Limited Bandwidth Static Discovery Plugins?

• User Discovery

Page 17: Beyond Discovery

Why Static Discovery?

• Unicast Discovery• Static Endpoint Discovery

– How can I minimize the configuration burden when using RTI Limited Bandwidth Static Discovery Plugins?

• User Discovery

Page 18: Beyond Discovery

A Participant A sends to initial peers

Participant B respondsB

~400 bytes, but varies from…- Propagated properties- Entity name- # of Locators

RWExchange DW/DR info

Participant A Participant B

~800 bytes, but varies from…- Propagated properties- Entity name- Type description

Participant Announcement

Endpoint Announcement

Why Static Discovery?

Page 19: Beyond Discovery

Federation with Routing Service

Routing Service

Fully meshed discovery within cluster

Routing Service

Routing Services act as gateways for cluster

• May be difficult to choose meaningful clusters• All cross-cluster traffic passes through Routing Services

Page 20: Beyond Discovery

A Participant A sends to initial peers

Participant B respondsB

Participant A Participant B

Endpoint Discovery with Limited Bandwidth Plugins

Read LBED configuration to learn about remote participant’s datareaders and datawriters

R

RW

No endpoint data sent on the wire!

Page 21: Beyond Discovery

Participant X

DW Aroid 1

X

DW Broid 2

LBED Configurationparticipant name = “Y” reader rtps_object_id = 3 topic_name = A qos = ... reader rtps_object_id = 4 topic_name = B qos = ... participant name = “X” writer rtps_object_id = 1 topic_name = A qos = ... writer rtps_object_id = 2 topic_name = B qos = ...

Participant Y

DR Aroid 3

DR Broid 4

Look up participant by name “X”

B

AAssert X’s endpointsinto discovery database

Discovery data: QoS, Type description, … User samples

Page 22: Beyond Discovery

Configuration Challenges

• Applications do not use the LBED configuration to create DDS entities

• Actual configuration and LBED configuration must remain synchronized

• DDS relies on each datawriter or datareader to have a unique object ID

• Object ID assignment must be deterministic– If created serially: maintain DW/DR count– If created in parallel: hash topic name

Page 23: Beyond Discovery

Participant X

DW Aroid 10

X

DW Broid 20

LBED Misconfigurationparticipant name = “Y” reader rtps_object_id = 3 topic_name = A qos = ... reader rtps_object_id = 4 topic_name = B qos = ... participant name = “X” writer rtps_object_id = 1 topic_name = A qos = ... writer rtps_object_id = 2 topic_name = B qos = ...

Participant Y

DR Aroid 3

DR Broid 4

Look up participant by name “X”

B

AAssert X’s endpointsinto discovery database

Discovery data: QoS, Type description, … User samples

Who is ROID 10 and 20???

X

Page 24: Beyond Discovery

Participant XDiscovery Monitor

Endpoint A XEndpoint B

Participant Y

Endpoint C Endpoint D

Y Collect Builtin Topic data and save to XML file

BA

CD

Discovery data: QoS, Type description, …

Generating LBED Configuration

Page 25: Beyond Discovery

Two Steps to Use LBED Configuration

• Tell applications to use load LB plugins• Select previously generated LBED

configuration

• These can be set in participant QoS section via XML

Page 26: Beyond Discovery

Topics

• Unicast Discovery• Static Endpoint Discovery• User Discovery

– How does DDS discovery fit into the broader picture of system architecture?

Page 27: Beyond Discovery

Selective Discovery

• DDS participants communicate with and store data about all endpoints, even those they do not match.

• How can we avoid this?

Page 28: Beyond Discovery

Participant X

Discovery Proxy

Endpoint A

X

User data

Discovery metadata: Address, DP index, Topic name, …

Discovery data: QoS, Type description, …

C

Endpoint B

Participant Y

Endpoint C Endpoint D

Y

B

A

Y

X

Y

D

process data

process metadata

process metadata

Proxied Participant Location

normal communication

X

Page 29: Beyond Discovery

Participant X

Discovery Proxy

Endpoint A

X

Endpoint B

Participant Y

Endpoint C Endpoint D

f(A,B)

Y

process data

process metadata

process metadata

Proxied Topic Data- no match scenario

BA

C

D

f(C,D)

User data

Discovery metadata: Address, DP index, Topic name, …

Discovery data: QoS, Type description, …

X

Y

Page 30: Beyond Discovery

Participant X

Discovery Proxy

Endpoint A

X

Endpoint B

Participant Y

Endpoint C Endpoint D

f(A,B)

Y

process data

process metadata

process metadata

Proxied Topic Data- match scenario

BA

C

D

f(C,D)

normal communication

User data

Discovery metadata: Address, DP index, Topic name, …

Discovery data: QoS, Type description, …

A

C

X

Y

Page 31: Beyond Discovery

Participant X

Discovery Proxy

Endpoint A

X

Endpoint B

Participant Y

Endpoint C Endpoint D

Y

X

Y

process data

process metadata

process metadata

BA

C

Dnormal communication

User data

Discovery metadata: Address, DP index, Topic name, …

Discovery data: QoS, Type description, …

A

B

A

Control

Data

Page 32: Beyond Discovery

Discovery Control

• Control information need not be distributed the same way as data– LBED plugin uses files to describe endpoints, DDS

to communicate– WSDL to describe services, SOAP to communicate– DNS to find, {HTTP, DDS, … } to communicate

• How can we maximize control plane flexibility?

Page 33: Beyond Discovery

Discovery Data

• Fixed data type– Necessary for DDS interoperability

• Uses [internal] DDS writers and readers• Has associated QoS

Participant Built-inData Reader

PublicationBuilt-inData Writer

SubscriptionBuilt-inData Reader

ParticipantBuilt-in Data Writer

SubscriptionBuilt-inData Writer

PublicationBuilt-inData Reader

ParticipantBuilt-inData Reader

PublicationBuilt-inData Writer

SubscriptionBuilt-inData Reader

Participant Built-inData Writer

SubscriptionBuilt-inData Writer

PublicationBuilt-inData Reader

Best Effort Reliable

Page 34: Beyond Discovery

Application participant

Plugin

Userdisc Plugin participant

PublicationDataWriter

Subscription DataWriter

PublicationDataReader

Subscription DataReader

Discovery database

Bridging Discovery Data to Normal DDS Topics

Page 35: Beyond Discovery

Application participant

Hello Writer

Plugin

Userdisc Plugin participant

PublicationDataWriter

Subscription DataWriter

PublicationDataReader

Subscription DataReader

core calls…afterLocalWriterEnabled

Topic: “Hello”keyparticipant_key...

Topic: “Hello”keyparticipant_key...

call into core…assertRemoteReader

Page 36: Beyond Discovery

• Routing Service– System federation and bridging– Interacting with non-DDS data– Mediation and transformation

• Recording and Replay Services• Persistence Service

– Implement DDS durability– Build more complex messagine on top of DDS

• User code– Infrastructure frameworks, programmer familiarity

“Inherit, not to reuse, but to be reused” 1

1: Sutter and Alexandrescu, C++ Coding Standards

Page 37: Beyond Discovery

Endpoint DescriptionKeyTopic nameType nameQoSType description

Does not change for static discovery

Unused by 95% of applications

Endpoint HeaderKeyTopic nameType name

Endpoint QoSKeyQoS reference or data

Endpoint TypeKeyType description

Published separately

Accessible via pub-sub or request-reply

Easily reconstructed on other side

Today’s way

The Right Way

Page 38: Beyond Discovery

Fin