DDS Everywhere

Post on 10-May-2015

905 views 4 download

Tags:

description

An increasing number of applications, such as smart cities, mobile-health and smart grids, require to ubiquitously distribute and access real-time information from, and across, a vast variety of devices, ranging from embedded sensors to mobile devices. While the problem of ubiquity is solved at a computing and network connectivity level, it is by no means solved with respect to (1) real-time, and (2) resource efficient (e.g. battery life and network), data distribution. This webcast will unveil PrismTech’s “DDS Everywhere” product strategy and will introduces a series of Innovations that have extended the OpenSplice ecosystem to seamlessly share data between embedded devices, traditional IT infrastructures, cloud applications and mobile devices.

Transcript of DDS Everywhere

OpenSplice

DDS

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

PrismTechangelo.corsaro@prismtech.com

DDS EverywhereOpenSplice

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

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

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

OpenSplice

DDS

OpenSplice Enterprise

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

OpenSplice

DDS

New in v6.3

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

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

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Record and Replay Tool

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

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

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;}

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

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;}

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;}

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:

OpenSplice

DDS

OpenSplice Cloud

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

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)

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

OpenSplice Mobile

Copyrig

ht  2011,  PrismTech  –    A

ll  Rights  Reserved.

OpenSplice

DDS

Demo

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

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());

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();        }}

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());

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);                }        }}

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

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

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

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");

OpenSplice

DDS

OpenSplice Embedded

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

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

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

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

OpenSplice

DDS

Putting it all Together

OpenSplice

DDS

DDS Everywhere!OpenSpliceMobile

Embedded OS

OpenSpliceLite

Embedded JVM

OpenSpliceMobile

Enterprise OS

OpenSpliceEnterprise

OpenSpliceGatewayMQTT, AMQP,

JMS, REST,....

DDS

RTOS

OpenSpliceRTE

OpenSplice

DDS

Final Remarks

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!

OpenSplice

DDS