applying dds to large scale mission critical distributed systems … · 2015. 11. 19. · ☐...

28
OpenSplice DDS Applying DDS to Large Scale Mission Critical Distributed Systems An experience report Niels Kortstee Technical lead PrismTech [email protected]

Upload: others

Post on 20-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Applying DDS to Large Scale Mission Critical Distributed Systems!An experience report

Niels Kortstee Technical lead

PrismTech [email protected]

Page 2: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Agenda ☐  Common challenges in Large Scale Mission Critical Distributed

Systems

☐  DDS use case: Grand Coulee Dam ☐  Introduction/system overview ☐  Challenges and solutions

☐  DDS use case: Coflight ☐  Introduction/system overview ☐  Challenges and solutions

☐  Conclusion

☐  Questions

Page 3: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Common!Challenges

Page 4: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Common challenges ☐  Scalability

☐  Increasing number of communication endpoints

☐  Increasing data volume

☐  Increasing update frequency

☐  Limited resources / asymmetrical systems

☐  Complexity ☐  Large number of components with high number of

dependencies

☐  Fault-tolerance ☐  Robust against failures (No single point of failure)

Page 5: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Common challenges ☐  Evolvability

☐  Ability to adapt to future changes and extensions ☐  Upgrades typically go step-by-step due to the complexity and size of

these systems

☐  Security ☐  Protection against unauthorised access

☐  Safety ☐  Protection against unintended usage

Page 6: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Use case: !Grand Coulee Dam

Page 7: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Introduction ☐  Gravity Dam on the Columbia River in the U.S. state of Washington

☐  Built to produce hydroelectric power and provide irrigation

☐  Reservoir supplies water for the irrigation of 671,000 acres (2,700 km2)

☐  Largest electric power-producing facility in the US (6,809 MW)

☐  One of the largest concrete structures in the world (11,975,520 cu yd/9,155,942 m3)

☐  DDS applied in Generic Data Acquisition and Control System (GDACS) ☐  Large scale control system for Grand Coulee Dam

(4 power plants, 33 generators)

☐  Over 150 computing nodes

☐  Network cables over a mile long

☐  Tens of thousands of sensors

Page 8: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

System overview ☐  Sensors with PLC’s

☐  Measure physical quantities in the system (data acquisition)

☐  Remote Terminal Units (RTU’s) ☐  Interface sensors with the distributed system using DDS (data

communication) ☐  Process and execute incoming operator commands ☐  Make quantities available to interested parties ☐  Monitor quantities and issue alarms based on alarm conditions

☐  Master stations ☐  Aggregate and summarize quantities (data presentation) ☐  Control equipment remotely (control)

Page 9: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

System overview ☐  Data volume: over 500,000 quantities updated

up to 100 times per second and potentially even more alarms

☐  Limited amount of memory and CPU on RTU’s

☐  Only unicast communication allowed in part of the system due to security regulations (Critical Infrastructure Protection standard)

☐  New types of sensors as well as RTU’s and master stations may be introduced in the future

☐  Recovery from software failure within a couple of seconds or faster if possible

☐  No possibility to switch off the system for upgrade or maintenance

multicast

unicast unicast

Page 10: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Data model

☐  One generic Quantity Topic (evolvability, complexity) ☐  Model struct with a union that holds all primitive types to allow any type of data

☐  One instance per physical location per update frequency (scalability) ☐  Model unbounded sequence of Quantity

☐  Batch Quantities with the same update frequency in one sample

struct quantities {��� string location;��� long freq;��� sequence<quantity> values;���};���#pragma keylist quantities location, freq

typedef enum prim { INT, STR, BYTE } PRIM_TYPE;

typedef union value switch(PRIM_TYPE){��� case INT:��� long intValue;��� case STR:��� string strValue; ��� case BYTE:��� octet octValue; ���} qvalue;

struct quantity {��� long id;��� qvalue value;���};

Page 11: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Scalability: bandwidth usage

☐  RTU à Master station ☐  One unicast per DataReader

☐  Bandwidth required: Data volume * #DataReaders

Router

☐  RTU à Router à Master station ☐  One unicast followed by one

multicast

☐  Bandwidth required: Data volume

Bandwidth usage: not scalable

Page 12: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Partition:RTU3 Partition:Station2

Challenges & Solutions

Topic: ���Quantity

Topic: ���QuantityRef

Topic: ���Quantity

Topic: ���QuantityRef

☐  Scalability: Data Partitioning ☐  One partition per physical location

☐  Scalability: Content-based re-batching & routing ☐  Re-batch and forward quantities based on expressed interest in partitions

Router RTU3 Station2

Page 13: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions

Router1

RTU2 Station2

Router2

Topic: ���Quantity

RTU1 Station1

RTU3

RTU4

RTU6

RTU5

RTU7

RTU8 Partition: Router

Station3

Station4

Station6

Station5

Station7

Station8

☐  Scalability: Prevent router bottleneck ☐  Introduce generic “Router”

partition and forward any quantity there

☐  Example: RTU2 à All stations ☐  RTU2 unicast to Router1

☐  Router1 unicast to Router2

☐  Router1 multicast to Station1-4

☐  Router2 multicast to Station5-8

☐  Example: RTU6 à RTU3 ☐  RTU6 unicast to Router2

☐  Router2 unicast to Router1

☐  Router1 unicast to RTU3

Page 14: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Fault-tolerance: Replicate components and arbitrate using

DDS built-in capabilities ☐  DeadlineQosPolicy ☐  OwnershipQosPolicy ☐  OwnershipStrengthQosPolicy

☐  Maintenance/upgrade is possible without switching off entire system

Data ���Writer

Data ���Reader

Topic: ���Arbitration

RTU6_A RTU6_B

Ownership = Exclusive

Deadline = 1.0 s

Ownership = Exclusive

Deadline = 0.5 s

OwnershipStrength = 2

Data ���Writer

Data ���Reader

Ownership = Exclusive

Deadline = 1.0 s

Ownership = Exclusive

Deadline = 0.5 s

OwnershipStrength = 1

RTU6_B RTU6_A

Partition: Arbiter

Router2_A Router2_B

RTU6

Page 15: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Use case:!Coflight

Page 16: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Introduction ☐  The next generation air traffic control system for France, Italy and Switzerland

☐  5 centers in France

☐  4 centers in Italy

☐  2 centers in Switzerland

☐  DDS applied for Flight Data Processing ☐  Performance

☐  Reliability

☐  Persistency

☐  High availability

☐  CORBA cohabitation

☐  Long-term upgradability and scalability

Page 17: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

System overview ☐  Up to 8,000 concurrently managed flight plans

☐  Internal flight-plans: 350 KB ☐  External flight-plans: 160 KB

☐  Up to 100 updates per second ☐  Also persisted to disk for fault-tolerance

☐  Mixed CORBA/DDS and C++/Java environment

☐  Part of the system only has a 10 Mbit network connection

☐  System may suffer from temporary network disconnections

Page 18: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Fault-tolerance: Reliability on publisher crash:

☐  Published sample is multicasted to all subscribing nodes

☐  Sample is received by one or more, but not all nodes

☐  Publishing node crashes before resend could be performed ☐  Result: Inconsistent view on data between subscribers

☐  Recovery from such an inconsistency required within 1 second

Page 19: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Solution: Nodes that did receive data are made responsible for re-sending

☐  Nodes maintain a timed buffer of received data from all nodes

☐  Nodes detect crash of publishing node

☐  Still alive nodes exchange last received sequence number from crashed node

☐  If inconsistencies are detected, the node with the highest sequence number will perform re-send(s) to any node that misses data

S9 S8 S7

S9 S8 S7

S9 S8 S7

S9 S7

S8

Page 20: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Fault-tolerance: publishing application needs to be able to

synchronise on reception of a written sample by a (set of) DataReader(s)

☐  Solution: New boolean attribute “synchronous” introduced for the already existing ReliabilityQosPolicy ☐  Synchronous DataWriter

☐  Block until all “synchronous” DataReaders have acknowledged reception for maximally “max_blocking_time”

☐  Synchronous DataReader ☐  Acknowledge reception of every sample to DataWriter

Page 21: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Synchronous DataWriter:

☐  DataWriter blocks until synchronous DataReader acknowledgement has been received.

Data ���Reader

kind = Reliable

synchronous = True

ReliabilityQosPolicy

Data ���Reader

kind = Reliable

synchronous = False

ReliabilityQosPolicy

Data ���Writer

kind = Reliable

max_blocking_time=5ms

synchronous = True

ReliabilityQosPolicy

Data ���Writer

kind = Reliable

max_blocking_time=5ms

synchronous = False

ReliabilityQosPolicy

☐  Non-synchronous DataWriter: ☐  Synchronous DataReader will acknowledge reception

☐  DataWriter does not block for any acknowledgement

Page 22: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Fault-tolerance: recover from temporary network

disconnections after re-connection

☐  Split-brain syndrome ☐  Two (sets of) nodes have a different perception on (part of) the

historical data ☐  Application-level decisions may be based on different input, so

potentially dangerous to (re-)connect nodes

☐  Causes ☐  Seperately running (set of) nodes suddenly get connected to each

other ☐  Nodes get re-connected after being disconnected for a while

Page 23: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Required behaviour is different for every use case and

therefore needs to be configurable ☐  No (re-)connection allowed – Prevent communication on network-

level ☐  Nodal configurable ‘ReconnectionAllowed’ option for networking

☐  (Re-)connection allowed – Nodal configurable ‘merge policies’ for non-volatile data ☐  Ignore – Allow (re-)connection and take no corrective measures

☐  Merge – Allow (re-)connection and perform two-way merge of historical data ☐  Replace – Allow (re-)connection and perform one-way merge of historical data

☐  Delete – Allow (re-)connection and delete all historical data

Page 24: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Merge policy example

☐  Deployment ☐  Node N1 with DataWriter X ☐  Node N2 with DataWriter Y ☐  Allow reconnection ☐  Perform 2-way merge after re-connect

☐  Scenario ☐  X on N1 writes sample X1 ☐  N1 and N2 disconnect ☐  X on N1 writes sample X2 ☐  Y on N2 writes sample Y1 ☐  N1 and N2 reconnect ☐  A two-way merge is performed

Y2

X2

X1 X1

X2

Y2

N1 N2

Page 25: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Challenges & Solutions ☐  Scalability: Part of the system only has a 10 Mbit connection

(data volume > available bandwidth)

☐  Solution: Compress data that is sent over the network (using zlib) ☐  Serialized data is compressed before sending on the network

☐  Compressed data is decompressed after receiving from the network

☐  Security: Part of the system requires secure communication ☐  Solution: Encrypt data that is sent over the network using SSL

☐  Safety: The system should be protected against accidental application read and/or write access to data ☐  Solution: Allow configuration of read/write access configuration per

partition-topic combination on nodal level

Page 26: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Conclusion

Page 27: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Conclusion ☐  DDS already provides most of the required capabilities to build large

scale mission critical distributed systems ☐  Data-centric approach

☐  Extensive collection of Quality of Services ☐  Standard API and network protocol

☐  Based on our experience with these systems, some specification extensions could be made: ☐  Extended reliability

☐  Compression ☐  Encryption ☐  Merge policies

☐  Read/Write access

☐  Content-based routing facilities are necessary to satisfy scalability challenges for systems-of-systems and uni-cast only environments

Page 28: Applying DDS to Large Scale Mission Critical Distributed Systems … · 2015. 11. 19. · ☐ Largest electric power-producing facility in the US (6,809 MW) ☐ One of the largest

Ope

nSpl

ice

DD

S

Questions?