Download presentation
Presentation is loading. Please wait.
1
Cloud Messaging design
06/14/13 06/14/13 [Company Confidential] Distribution of this document is strictly prohibited without the prior written permission of PrismTech Cloud Messaging design 3d Sept. 2013 Julien Enoch Engineering Team Lead PrismTech 1
2
06/14/13 06/14/13 Big Picture 2
3
LAN LAN DS DS DS RS(x) RS(Y) P2 P1 P3 SPDP SEDP SPDP SEDP SEDP(RS)
06/14/13 06/14/13 DS DS DS SPDP SEDP RS(x) RS(Y) SPDP SEDP SEDP(RS) SEDP(RS) R(x) W(x) P2 P1 W(y) R(y) 3 R(x) P3 LAN LAN
4
06/14/13 06/14/13 DDSI over TCP 4
5
Required features TCP connection initiated by default by Reader
06/14/13 06/14/13 TCP connection initiated by default by Reader Writer only initiates connection when he doesn't have a public locator Bi-directional TCP (use connection in both way) Reader/Writer send an EntityID sub-message to “define” the association <Entity, Connection> Use of ACKNACK(base=0) or DATA is not clear enough We need a new independent sub-message : ENTITY_ID In case of TCP disconnection Try to re-connect for MAX_RETRY or MAX_DURATION In case of remote Participant lease expiration Remove only entity proxies with the same GUID prefix Because Discovery Service sends SEDP with 3d-party GUID prefix (Routing Service's) SSL / TLS 5
6
06/14/13 06/14/13 Discovery Service 6
7
Main Features Receives standard DDSI discovery messages (SPDP/SEDP)
06/14/13 06/14/13 Receives standard DDSI discovery messages (SPDP/SEDP) Mainly via TCP, possibly via UDP unicast Stores Entities info Readers/Writers : which topic, which QoS Performs entities matching Sends SEDP messages to Participants for matching entities Either a "real" entity, or a Routing Service's entity acting as a proxy of the "real" entity 7
8
Roadmap: V0.1 Standalone No fault-tolerance, no load-balancing
06/14/13 06/14/13 DS SPDP SEDP SPDP SEDP SEDP(RS) SEDP(RS) add route P1 W RS R P2 Standalone No fault-tolerance, no load-balancing Always use a Routing Service Ignore Participants locators since we always provide RS locators No need of NAT discovery 8
9
Roadmap: V1.0 Federation (fault-tolerance + load-balancing) DS DS P1
06/14/13 06/14/13 DS DS SPDP SEDP SPDP SEDP SEDP(RS) SEDP(RS) add route P1 W RS R P2 Federation (fault-tolerance + load-balancing) Participants can connect any DS (hardware LB can be used) Each DS manages its connected Participants and Entities The DS managing the Writer is in charge of route retrieval/creation FT using cloud's IP failover (same IP set to fallback host) Participants receive SPDP with a new GUID prefix and reply with SEDP Lease of failing DS expires, but no proxies are remove since they don't have the same GUID prefix 9
10
Roadmap: V1.1 NAT detection & direct connections DS DS P1 P2
06/14/13 06/14/13 DS DS SPDP SEDP SPDP SEDP SEDP(P2:R) SEDP(P1:W) P1 W R P2 NAT detection & direct connections Participants can detect NAT type and send public IP DS can assess a IP is reachable DS avoid Routing Service and make Participants to connect directly 10
11
06/14/13 06/14/13 Routing Service 11
12
Main Features A DDSI messages router
06/14/13 06/14/13 A DDSI messages router No SPDP/SEDP (that's DS role) Forward DATA/ACKNACK messages Ideally: expose only 1 Reader/Writer for all entities Advantage: Less memory usage in Participants (only 1 proxy) Less messages to Writers (federates ACKNACKs) Drawback: Participants only see 1 remote entity No match/unmatch messages RS should maintain history for late joiners - which size ? Sum of writers' size ? - state to be transferred to fallback RS ? W1 W2 R1 R2 R3 W3 RS W' R' 12
13
Roadmap: V0.1 Problems it solves Discovery Service
06/14/13 06/14/13 Participant P1 Writer W1 proxy R3 proxy R4 SEDP(R3, R4) with RS' IP SEDP(W1, W2) with RS' IP Participant P3 Reader R3 proxy W1 proxy W2 Discovery Service Add routes: W1->R3, R4 W2->R4 Routing Service Participant P2 Writer W2 proxy R4 Participant P4 Reader R4 proxy W2 Entities Matches Map <WriterID, List(ReaderID)> Sockets Map <EntityID, Socket> Problems it solves Discovery across distinct LANs (connected via WAN or non-multicast router) NAT traversal (TCP connections going out the NAT) 13
14
Roadmap: V0.1 DDSI messages forwarder Discovery Service
06/14/13 06/14/13 Participant P1 Writer W1 proxy R3 proxy R4 SEDP(R3, R4) with RS' IP SEDP(W1, W2) with RS' IP Participant P3 Reader R3 proxy W1 proxy W2 Discovery Service Add routes: W1->R3, R4 W2->R4 Routing Service Participant P2 Writer W2 proxy R4 Participant P4 Reader R4 proxy W2 Entities Matches Map <WriterID, List(ReaderID)> Sockets Map <EntityID, Socket> DDSI messages forwarder Routing Service forwards each sub-message to appropriates entities LB: different Writers can connect to different Routing Services FT: use IP failover or DS send SEDP with the new IP Entities will send ENTITY_ID sub-messages at re-connection, and are added to maps 14
15
Roadmap: V1.0 Discovery Service Problems it solves
06/14/13 06/14/13 Participant P1 Writer W1 proxy R' SEDP(R') with RS' IP SEDP(W1', W2') with RS' IP Participant P3 Reader R3 proxy W1' proxy W2' Discovery Service Add routes: W1->R3, R4 W2->R4 Routing Service Participant P2 Writer W2 proxy R' Participant P4 Reader R4 proxy W1' proxy W2' Pseudo Writer W1' Pseudo Reader R' Pseudo Writer W2' Problems it solves Scalability on Writers side Writers only manage 1 proxy Reader for the RoutingService => less memory usage Optionally, RoutingService can reply directly with ACKNACK => RoutingService bufferize the possible writes bursts, in place of the Writer's queue itself Drawback: possible loss of samples in case RoutingService crash Decouple Writers and slow Readers Optionally, RoutingService can drop samples at destination to slow Readers, avoiding impacts on the rest of the system REMARK: this is a RoutingService deployment option (v0.1 mode still available) 15
16
Roadmap: V1.0 Discovery Service 1 pseudo-Reader / N pseudo-Writers
06/14/13 06/14/13 Participant P1 Writer W1 proxy R' SEDP(R') with RS' IP SEDP(W1', W2') with RS' IP Participant P3 Reader R3 proxy W1' proxy W2' Discovery Service Add routes: W1->R3, R4 W2->R4 Routing Service Participant P2 Writer W2 proxy R' Participant P4 Reader R4 proxy W1' proxy W2' Pseudo Writer W1' Pseudo Reader R' Pseudo Writer W2' 1 pseudo-Reader / N pseudo-Writers Pseudo-writers mimic the original Writers (same seqNum, history cache) Pseudo-writers collect ACKNACK to send only 1 to original Writer FT: no state-transfer required Fallback's pseudo-writers will send HEARTBEAT, readers will send ACKNACK again Fallback's pseudo-reader receives historical data and reconstruct pseudo-writers history 16
17
Roadmap: V1.1 Problems it solves Discovery Service
06/14/13 06/14/13 Participant P1 Writer W1 proxy R' Participant P3 Reader R3 proxy W' SEDP(R') Discovery Service SEDP(W') Add routes: W1->R3, R4 W2->R4 Routing Service Participant P2 Writer W2 proxy R' Participant P3 Reader R3 proxy W' Pseudo Reader R' Pseudo Writer W' Problems it solves Scalability on Readers side Readers only manage 1 proxy Writer for the RoutingService => less memory usage Full decoupling between Writers and Readers DRAWBACK: possibly samples loss, no more publication/subscription matches, possibly impact on liveliness behaviour, ownership... 17
18
Roadmap: V1.1 1 pseudo-Reader / 1 pseudo-Writers
06/14/13 06/14/13 Participant P1 Writer W1 proxy R' Participant P3 Reader R3 proxy W' SEDP(R') Discovery Service SEDP(W') Add routes: W1->R3, R4 W2->R4 Routing Service Participant P2 Writer W2 proxy R' Participant P3 Reader R3 proxy W' Pseudo Reader R' Pseudo Writer W' 1 pseudo-Reader / 1 pseudo-Writers The pseudo-writer must: Do mapping of incoming/outgoing messages' sequence numbers Manage a history for all original writers 18
19
06/14/13 06/14/13 V1.1 Scenario (end 2013) 19
20
V1.1 Scenario: Initial state in Cloud DS DS DS DDS WritersTopic DDS
06/14/13 06/14/13 Initial state in Cloud DS WriterData( GUID, TopicName, TopicType QoS) DDS WritersTopic DDS ReadersTopic ReaderData( GUID, TopicName, TopicType QoS) DS DS DataWriters Topic Partition ReadersTopic DiscoveryServices RoutingService-ID WritersTopic MatchTopic DataReaders RoutingService-* RSLivelinessTopic MatchingData( WriterGUID, ReaderGUID, RoutingServiceID, StatusFlags, RSWriter-GUID, RSWriter-Locator, RSReader-GUID, RSReader-Locator) DDS MatchTopic DDS RSLiveliness Topic RoutingServiceData( RS-ID) For LB (future) DataWriters Topic Partition RSLivelinessTopic DiscoveryServices MatchTopic RoutingService-ID DataReaders WritersTopic ReadersTopic DDS RSStats Topic RS (master) 20 Active replication (same state, but only master receives messages) RS (slave)
21
V1.1 Scenario: First Participant DS DS DS DDS WritersTopic DDS
06/14/13 06/14/13 First Participant DS DDS WritersTopic DDS ReadersTopic DS DS SPDP + SEDP(W1) DDS EntityMatch Topic Participant P Writer W1 RS (master) 21 RS (slave)
22
Read and choose RoutingService
V1.1 Scenario: 06/14/13 06/14/13 Matching DS DDS WritersTopic DDS ReadersTopic DS DS new match(W1,R3) Read and choose RoutingService SPDP + SEDP(R3) DDS RSLiveliness Topic Participant P Participant P DDS EntityMatch Topic Writer W1 Reader R3 RS (master) Pseudo Reader W1' Pseudo Reader R' 22 RS (slave)
23
new match(W1,R3,?) on RSID partition match(W1,R3): wait for QoS
V1.1 Scenario: 06/14/13 06/14/13 Route request DS DDS WritersTopic DDS ReadersTopic DS DS new match(W1,R3,?) on RSID partition DDS EntityMatch Topic Participant P Participant P Writer W1 Reader R3 RS (master) match(W1,R3): wait for QoS 23 RS (slave)
24
Write on Partition RSID Write on Partition RSID
V1.1 Scenario: 06/14/13 06/14/13 QoS re-publication DS DDS WritersTopic DDS ReadersTopic Write on Partition RSID DS DS Write on Partition RSID new match(W1,R3,?) DDS EntityMatch Topic Participant P Participant P Writer W1 Reader R3 proxy W1' proxy R' RS (master) Pseudo Reader W1' Pseudo Reader R' 24 RS (slave)
25
V1.1 Scenario: Route is ready DS DS DS DDS WritersTopic DDS
06/14/13 06/14/13 Route is ready DS DDS WritersTopic DDS ReadersTopic DS DS SEDP(R') ( ) SEDP(R') ( ) SEDP(W1') ( ) DDS EntityMatch Topic Participant P Participant P Writer W1 Reader R3 proxy W1' proxy R' new match(W1,R3,OK) RS (master) Pseudo Reader W1' Pseudo Reader R' 25 RS (slave)
26
TCP connect + ENTITY_ID TCP connect + ENTITY_ID
V1.1 Scenario: 06/14/13 06/14/13 TCP connections to RS DS DDS WritersTopic DDS ReadersTopic DS DS DDS EntityMatch Topic Participant P Participant P Writer W1 Reader R3 proxy W1' proxy R' TCP connect + ENTITY_ID TCP connect + ENTITY_ID RS (master) Pseudo Reader W1' Pseudo Reader R' 26 RS (slave)
27
V1.1 Scenario: Routing of messages DS DS DS DDS WritersTopic DDS
06/14/13 06/14/13 Routing of messages DS DDS WritersTopic DDS ReadersTopic DS DS DDS EntityMatch Topic Participant P Participant P Writer W1 Reader R3 proxy W1' proxy R' DATA DATA RS (master) Pseudo Reader W1' Pseudo Reader R' 27 RS (slave)
28
V1.1 Scenario: 2nd Reader DS DS DS DDS WritersTopic DDS ReadersTopic
06/14/13 06/14/13 2nd Reader DS DDS WritersTopic DDS ReadersTopic DS DS new match(W1,R4) SPDP + SEDP(R4) DDS EntityMatch Topic Participant P Participant P Writer W1 Reader R3 proxy W1' proxy R' RS (master) Participant P Pseudo Reader W1' SEDP(W1') ( ) Pseudo Reader R' Reader R4 proxy W1' 28 RS (slave)
29
V1.1 Scenario: 2nd Writer DS DS DS DDS WritersTopic DDS ReadersTopic
06/14/13 06/14/13 2nd Writer DS DDS WritersTopic DDS ReadersTopic DS DS SPDP + SEDP(W2) new matches (W2,R3) & (W2,R4) Participant P Participant P DDS EntityMatch Topic SEDP(W2') ( ) Writer W1 Reader R3 proxy W1' proxy R' proxy W2' RS (master) Participant P Participant P Pseudo Reader W1' Pseudo Reader R' Writer W2 Reader R4 Pseudo Reader W2' proxy W1' proxy R' 29 RS (slave) proxy W2'
30
V1.1 Scenario: Participant failure DS DS DS DDS WritersTopic DDS
06/14/13 06/14/13 Participant failure DS DDS WritersTopic DDS ReadersTopic DS DS SPDP lease failure dispose(W1,*) SEDP(dispose W1') Participant P Participant P DDS EntityMatch Topic Writer W1 Reader R3 proxy W1' proxy R' proxy W2' RS (master) Participant P Participant P Pseudo Reader W1' Pseudo Reader R' Writer W2 Reader R4 Pseudo Reader W2' proxy W1' proxy R' 30 RS (slave) proxy W2'
31
RoutingServices Topic
V1.1 Scenario: 06/14/13 06/14/13 Routing Service failure DS DDS WritersTopic DDS ReadersTopic DS DS fault detection DDS RoutingServices Topic SEDP(R') ( ) Participant P SEDP(W1') SEDP(W2') ( ) Participant P Writer W1 Reader R3 proxy W1' RS (master) proxy R' Pseudo Reader W1' proxy W2' Pseudo Reader R' Pseudo Reader W2' Participant P Participant P RS (slave) Writer W2 Reader R4 Pseudo Reader W1' proxy W1' proxy R' 31 Pseudo Reader R' proxy W2' Pseudo Reader W2'
32
Check existing matching => nothing to do
V1.1 Scenario: 06/14/13 06/14/13 Discovery Service Failure DS DDS WritersTopic DDS ReadersTopic DS DS SPDP + SEDP(W1) Check existing matching => nothing to do Participant P Participant P DDS EntityMatch Topic Writer W1 Reader R3 SPDP + SEDP(W2) proxy W1' proxy R' proxy W2' RS (master) Participant P Participant P Pseudo Reader W1' Pseudo Reader R' Writer W2 Reader R4 Pseudo Reader W2' proxy W1' proxy R' 32 RS (slave) proxy W2'
33
06/14/13 06/14/13 Discovery Service Architecture 33
34
write/dispose (DS part) write/dispose (RS-ID part)
Discovery Service components 06/14/13 06/14/13 R Discovery Service P SPDP/SEDP write/dispose (DS part) W Participants Mgt DDS ReadersTopic read (DS part) send SEDP to P P is dead Matching Engine write/dispose (RS-ID part) write (RS-ID part) Select RS DDS WritersTopic DDS EntityMatch Topic read (RS-* part) RoutingService Selector List of available RS RS is dead read (DS part) RoutingService Mgt read (DS part) DDS RSStats Topic DDS RSLiveliness Topic 34 For LB (future)
35
06/14/13 06/14/13 Routing Service Architecture 35
36
read/write (RS-ID part)
Routing Service components V0.1 06/14/13 06/14/13 Routing Service P1 W1 R3 P3 Data + AckNack Generic Reader/ Forwarder Generic Writer/ Forwarder Data + AckNack P2 W2 R4 P4 get matches for WriterGUID Matches Mgt read/write (RS-ID part) DDS EntityMatch Topic Stats service Liveliness service write (DS part) write (DS part) DDS RSStats Topic DDS RSLiveliness Topic 36 For LB (future)
37
read/write (RS-ID part)
Routing Service components V1.0 06/14/13 06/14/13 Routing Service Proxy Writer W1 (AckNack Aggregator) R3 P3 P1 W1 Unique Reader Data + AckNack Data + AckNack P2 W2 Proxy Writer W2 (AckNack Aggregator) R4 P4 get matches for WriterGUID DDS ReadersTopic Matches Mgt read/write (RS-ID part) read (RS-ID part) DDS EntityMatch Topic DDS WritersTopic Stats service Liveliness service write (DS part) write (DS part) DDS RSStats Topic DDS RoutingService Topic 37 For LB (future)
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.