Download - DDS Everywhere

Transcript
Page 1: DDS Everywhere

OpenSplice

DDS

Angelo CORSARO, Ph.D.Chief Technology Officer OMG DDS Sig Co-Chair

[email protected]

DDS EverywhereOpenSplice

Page 2: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

DDS Everywhere Platform☐ A DDS-based, interoperable

product family addressing systems needs from Embedded and Mobile to Enterprise and Cloud

☐ An Open Source core providing free access to the OpenSplice Ecosystem, security of supply and a vibrant, innovative community

OpenSpliceCommunity

OpenSpliceCloud

OpenSpliceEmbedded

OpenSplice

OpenSpliceEnterprise

Page 3: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

DDS Everywhere Platform

☐ RTOS (VxWorks, QNX, etc.)

☐ FPGA☐ BSP / No-OS☐ IP + Exotic

Transports

Industrial Platforms

☐ OS (Linux, Windows, etc)

☐ Cloud☐ DBMS☐ No-SQL☐ InfiniBand + IP

Transports

IT Platforms

☐ Browser / HTML5☐ iOS☐ Android☐ Cloud☐ No-SQL☐ Mobile/WiFi IP

Transp.

Consumer Platforms

OpenSpliceCommunity

OpenSpliceCloud

OpenSpliceEmbedded

OpenSplice

OpenSpliceEnterprise

Page 4: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

DDS Everywhere Platform

☐ Determinism☐ Latency☐ Footprint

☐ Fault-Tolerance☐ Throughput☐ Scalability☐ Latency☐ Security☐ Integration

☐ Mobility☐ Elasticity☐ Cloud☐ Integration

OpenSpliceCommunity

OpenSpliceCloud

OpenSpliceEmbedded

OpenSplice

OpenSpliceEnterprise

Page 5: DDS Everywhere

OpenSplice

DDS

OpenSplice Enterprise

Page 6: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Key Highlights☐ The best middleware

infrastructure to Simplify Distributed System Development

☐ Reduce complexity of building, testing, integrating, and deploying high-performance, scalable, and fault-tolerant distributed systems OpenSplice

DDS

OpenSplice

Tools

OpenSpliceCommunity

OpenSpliceCloud

OpenSpliceEmbedded

OpenSplice

OpenSpliceEnterprise

Page 7: DDS Everywhere

OpenSplice

DDS

New in v6.3

Page 8: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

OpenSplice DDSI2EEnhanced version of the Interoperable wire protocol DDSI v2.1

Discovery☐ Standardized discovery (locators)☐ Dynamic unicast/multicast selection☐ Optional static discovery

Real-Time☐ independently scheduled priority-lanes ☐ Support for Logical and Physical Partitioning ☐ Traffic-Shaping

Security

☐ Encrypted network-Partitions

Page 9: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Record and Replay☐ Dynamic recording of any topic-

data in a DDS system

☐ Selective replay with variable speed

☐ Distributed control by topic-based API (‘command’ & ‘status’ topics)

☐ Seamless integration with OpenSplice Tester (topic-based API)

☐ Dedicated RnR-Manager graphical GUI for scenario-definition and data import/analysis

RnRService

OpenSplice DDS

RnRService(s)

Any topic Record/Replay command & status topics

RnRManager

Record/Replay command & status topics

Page 10: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Record and Replay Tool

Page 11: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

New DDS APIs

☐ The original DDS API introduces some unnecessary accidental complexity

☐ We’ve been working hard to standardize new C++/Java API for DDS that makes using it as simple as possible

Page 12: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Statistics

☐ The new API reduces the number of lines of code from 3x to 5x when compared to the original DDS API!

☐ Less code means less bugs

0

4

8

11

15

SLOC

DDS v1.2 C++ API ISO C++ API

Simple DataWriter with default QoS

Page 13: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

ISO C++ DDS API

☐ Simple, Compact and Elegant

☐ Type-safe

☐ Orthogonal

☐ Efficient

☐ QoS DSL

struct ShapeType { string color; long x; long y; long shapesize;};#pragma keylist ShapeType color

int main(int argc, char* argv[]) { try { // Create DomainParticipant! ! DomainParticipant dp = DomainParticipant(0); // Create Topic! ! Topic<ShapeType> topic(dp, "Circle"); // Create Publisher! ! Publisher pub(dp); // Create DataWriter QoS DataWriterQos dwqos = pub.default_datawriter_qos() << Durability::Transient() << History::KeepLast(10); // Create DataWriter! ! DataWriter<ShapeType> dw(pub, topic, dwqos); // Write ShapeType s = {"RED", 50, 70, 90}; dw << s; // - or - dw.write(s); ! ! ! } catch (const dds::core::Exception& e) {! ! std::cout << e.what() << std::endl;! }! return 0;}

Page 14: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

ISO C++ DDS API

☐ Unified and composable data selection API

std::vector<std::string> p;p.push_back("100");p.push_back("200");Query q("x < %0 AND y < %1", p);

auto data = reader ! .select() .instance(handle) // -- Select Instance ! ! .state(status::DataState::new_data()) // -- Filter on State ! ! .content(q) // -- Filter on Content .read(); // -- Execute the selection and read the data

Page 15: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

Ope

nSpl

ice

DD

S

Example: DataWriterint main(int argc, char* argv[]) {try {! ! DomainParticipant dp(0);! ! Topic<ShapeType> topic(dp, "Circle");! ! Publisher pub(dp); ! ! DataWriter<ShapeType> dw(pub, topic); ! ! uint32_t pos = 0;! ! const uint32_t N = 300;! ! for (int i = 0; i < N; ++i) {! ! ! ShapeType bc = {"RED", i, i, 60};! ! ! ShapeType rc = {"BLUE", N-i, N-i, 60};! ! ! dw << rc;! ! ! usleep(10000);! ! }

! } catch (const dds::core::Exception& e) {! ! std::cout << e.what() << std::endl;! }! return 0;}

Page 16: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

Ope

nSpl

ice

DD

S

Example: DataReaderint main(int argc, char* argv[]) { try { DomainParticipant dp(0); Topic<ShapeType> topic(dp, "Circle"); Subscriber sub(dp); DataReader<ShapeType> dr(sub, topic); uint32_t pos = 0; const uint32_t N = 300; uint32_t max_size = 10; const uint32_t sleepTime = 500000; while (true) { LoanedSamples<ShapeType> samples =

dr.read(); std::cout << "-----------" << std::endl; for_each(samples.begin(), samples.end(), printShapeSample); usleep(sleepTime); } } catch (const dds::core::Exception& e) { std::cout << e.what() << std::endl; } return 0;}

Page 17: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Full C++ Shapes Application

github.com/kydos/dds-psm-cxx/tree/master/examples/ishapes-driver

see:

Page 18: DDS Everywhere

OpenSplice

DDS

OpenSplice Cloud

Page 19: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Key Highlights

☐ Brings DDS on mobile devices powered by Android/iOS

☐ Enables DDS-based Cloud Messaging for higher scalability, throughout and minimal cost per message

OpenSpliceCommunity

OpenSpliceCloud

OpenSpliceEmbedded

OpenSplice

OpenSpliceEnterprise

OpenSpliceMobile

OpenSpliceGateway

Page 20: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

OpenSplice Mobile

☐ Pure Java version of OpenSplice targeting the JVM

☐ DDSI Protocol Stack optimized for mobility and Android OS

☐ Only DDS on the market designed and Engineered for Android and the JVM

DCPS Java 5 / Scala API

DDSI (Optimized for Mobility)

Page 21: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

OpenSplice Mobile

Page 22: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Demo

Page 23: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Java 5 PSM

☐ Idiomatic and ergonomic DDS API for Java

☐ Guaranteed code portability through clean separation of standard API (in an OMG provided JAR) and vendor implementation

☐ QoS and Selector DSL simplify programming and make code more readable

☐ QoS Provider allows to “externalize” the QoS configuration

Page 24: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Java Shapes -- Readerpackage  org.omg.demo.dds.shapes;

import  ...;

/**  *  This  class  provides  a  simple  example  of  a  DDS  data  reader  using  the  new  Java  API.  */public  class  ShapesReader  {        public  static  void  main(String  args[])  throws  Exception  {

               if  (args.length  <  1)  {                        System.out.println("USAGE:\n\tShapesWriter  <topic>");                        System.out.println("\n\ttopic  =  [Circle,  Square,  Triangle]");                        System.exit(1);                }

               final  String  shape  =                                args[1].substring(0,1).toUpperCase()  +  args[1].substring(1,args[1].length()).toLowerCase();

               final  ServiceEnvironment  env  =                                ServiceEnvironment.createInstance(ShapesWriter.class.getClassLoader());

Page 25: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Java Shapes -- Reader                DomainParticipantFactory  factory  =                                DomainParticipantFactory.getInstance(env);                DomainParticipant  dp  =  factory.createParticipant();

               final  PolicyFactory  pf  =  env.getSPI().getPolicyFactory();                TopicQos  tqos  =  dp.getDefaultTopicQos();

               tqos.withPolicies(pf.Durability().withTransient(),                                                        pf.Reliability().withReliable());                Topic<ShapeType>  topic  =  dp.createTopic(shape,  ShapeType.class);

               Subscriber  sub  =  dp.createSubscriber();                DataReaderQos  drqos  =                                sub.getDefaultDataReaderQos().withPolicies(                                                pf.Reliability().withBestEffort(),                                                pf.Durability().withTransient()                                );

               DataReader<ShapeType>  dr  =                                sub.createDataReader(topic,  drqos,  new  ShapeTypeListener(),  Status.allStatuses(env));

               Thread.currentThread().join();        }}

Page 26: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Java Shapes -- Writerpublic  class  ShapesWriter  {        public  static  void  main(String  args[])  throws  Exception  {

               if  (args.length  <  4)  {                        System.out.println("USAGE:\n\tShapesWriter  <topic>  <circle>  <samples>  <period  ms>");                        System.out.println("\n\ttopic  =  [Circle,  Square,  Triangle]");                        System.out.println("\tcolor  =  [Red,  Blue,  Green,  Magenta,  Cyan]");                        System.exit(1);                }

               final  String  shape  =                                args[1].substring(0,1).toUpperCase()  +  args[1].substring(1,args[1].length()).toLowerCase();                final  String  color  =  args[1].toUpperCase();

               final  int  samples  =  Integer.parseInt(args[2]);

               final  int  period  =  Integer.parseInt(args[3]);

               final  int  bound  =  100;

               final  ServiceEnvironment  env  =                                ServiceEnvironment.createInstance(ShapesWriter.class.getClassLoader());

Page 27: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Java Shapes -- Writer                final  PolicyFactory  pf  =  env.getSPI().getPolicyFactory();                DomainParticipantFactory  factory  =                                DomainParticipantFactory.getInstance(env);

               DomainParticipant  dp  =  factory.createParticipant();                Topic<ShapeType>  topic  =  dp.createTopic(shape,  ShapeType.class);

               Publisher  pub  =dp.createPublisher();                DataWriterQos  dwqos  =                                pub.getDefaultDataWriterQos().withPolicies(                                                pf.Reliability().withBestEffort(),                                                pf.Durability().withTransient());

               DataWriter<ShapeType>  dw  =  pub.createDataWriter(topic);

               final  ShapeType  sample  =  new  ShapeType(color,  0,  0,  0);                for  (int  i  =  0;  i  <  samples;  ++i)  {                        sample                                .setX(((int)Math.random()%bound))                                .setY(((int)Math.random()%bound))                                .setShapesize(((int)Math.random()%bound));                        dw.write(sample);                        Thread.sleep(period);                }        }}

Page 28: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Performance

☐ OpenSplice Mobile v1.0 beta features already very good performance

☐ Latency is low and pretty stable ~3usec of difference from 32 to 1024 bytes

Page 29: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

OpenSplice Gateway☐ Integration technology providing

connectivity from DDS to over 80 technologies, including WebSockets and REST

☐ Java-based and easily deployable on the cloud

☐ Key building block for OpenSplice Based Cloud Messaging Solutions

Supported Connectors Include:- JMS- REST- CometD- CFX-WebSockets- TCP, UDP Sockets

- HTTP- AMQP- XMPP- Hibernate-HBase- Custom

OpenSplice

Gateway

DDSI-RTPS

Custom

REST

JMS

XMPP

AMQP

Page 30: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

Ope

nSpl

ice

DD

S

1 // Define endpoints 2 val inEndpoint = 3 "ddsi:"+ inTopic +":"+ inDomain +"/" + shapeType 4 val outEndpoint = 5 "websocket://"+inTopic.toLowerCase + "?sendToAll=true" 6 7 // Define a Route using the Scala DSL 8 val shapesRoute = new RouteBuilder { 9 override def configure() =10 from(inEndpoint) unmarshal("cdr") marshal() json() to(outEndpoint)11 }

WebSocket Integration

DDSDomain 0

Topic“Circle”

To JSON

☐ This example requires Camel 2.10

Page 31: DDS Everywhere

Ope

nSpl

ice

DD

S

☐ Integrate different DDS Domains via TCP (or UDP) tunnel☐ Per Topic bridging☐ Unidirectional or bidirectional☐ Possibly adding SSL/TLS

DDSDomain 0

DDSDomain 0

Topic“Circle”

Topic“Circle”

GW 1

TCP

GW 2

TCP/UDP Tunneling

1 // on GW1:2 from("ddsi:Circle:0/ShapeType")3 to("netty:tcp://localhost:6789?sync=false");

1 // on GW2:2 from("netty:tcp://localhost:6789?sync=false")3 to("ddsi:Circle:0/ShapeType");

Page 32: DDS Everywhere

OpenSplice

DDS

OpenSplice Embedded

Page 33: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Key Highlights

☐ The OpenSplice Embedded Product family brings DDS connectivity to devices and resource constrained real-time embedded systems

OpenSpliceIntegrator

OpenSplice

Lite

OpenSplice

RTE

OpenSpliceCommunity

OpenSpliceCloud

OpenSpliceEmbedded

OpenSplice

OpenSpliceEnterprise

Page 34: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

FPGA Integrator

☐ ‘Out-of-the-box’ solution for integrating FPGA’s withDDS based systems ☐ Bridges the device-data (via GIOP) to the DDS-based system using a software

‘gateway’ providing full DDS QoS support to maintain & distribute the device-data☐ Bridge-technology is be based either:

☐ OpenSplice Gateway (if a Java platform is available) or☐ A small OpenSplice bridge application or pluggable-service

FPGAICO

GIOPGIOP DDSI

GIOP/DDSIBridge

DDS

DDS Global Data Space

...

TopicA

TopicBTopicC

TopicD

Data Writer

Data Writer

Data Writer

Data Writer

Data Reader

Data Reader

Data Reader

Data Reader

Page 35: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

OpenSplice Lite☐ Bring software-based DDS

implementation to a range of resource constrained devices

☐ Allow for variability on functionalities, transport and support of underlying OS/BSP

☐ Provides very low footprint and very high performance

☐ Footprint as low as 100/200 KB

☐ Latency as low as 35-45 usec (on Gigabit network)

Native C API

DDSI / DDSI-E

OS Abstraction

Transport Abstraction

RTOS

GPPDSP

uController

ISO C++ API

Page 36: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

OpenSplice RTE☐ Bring the full power of DDS to real-

time embedded systems

☐ Provides low footprint, superlative scalability and and high performance

☐ Footprint 2MB

☐ Latency 75/80 usec (on Gigabit network)

DCPS API (C/C++/RT-Java)

DDSI-E / RT-NET

OS Abstraction

RTOS

GPP

Page 37: DDS Everywhere

OpenSplice

DDS

Putting it all Together

Page 38: DDS Everywhere

OpenSplice

DDS

DDS Everywhere!OpenSpliceMobile

Embedded OS

OpenSpliceLite

Embedded JVM

OpenSpliceMobile

Enterprise OS

OpenSpliceEnterprise

OpenSpliceGatewayMQTT, AMQP,

JMS, REST,....

DDS

RTOS

OpenSpliceRTE

Page 39: DDS Everywhere

OpenSplice

DDS

Final Remarks

Page 40: DDS Everywhere

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Concluding Remarks

☐ With the DDS Everywhere platform we are making DDS available on any device

☐ That means that:☐ You can get DDS data from your system to anywhere☐ You can exploit the power of DDS across devices and technologies☐ You have a single technology end-to-end that provides optimal efficiency,

scalability, performance and more importantly data-centricity!

Page 41: DDS Everywhere

OpenSplice

DDS


Top Related