3. Standards Compared
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
DDS Standard v1.2 2004
JMS Standard v1.1 2001
¨ Programming Language ¨ Java Messaging API (Pub/
Independent API for Data- Sub + PTP) portable across
Centric Pub/Sub messaging implementations
¨ Interoperable Wire-
Protocol (DDSI/RTPS)
4. Standards Compared
DDS ensures portability and JMS focuses only on application
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ ¨
interoperability across portability across
implementation of the standard implementation of the standard
Application Application
DDS API JMS API Standard
Standard
DDSI JMS Provider
5. Standards Compared
DDS Standard
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
JMS Standard
¨ Promotes Fully Distributed ¨ Promotes Hub and Spoke
Architectures Architectures
¨ Provides mechanisms for ¨ Fully distributed
transparently using Brokers/ architectures are possible
Routers but complicated by some
use cases
7. JMS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ The JMS standard has not been evolving after the
v1.1 released in 2002
8. DDS Standard Evolution
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
App Standard API
2004
DDS § Standard API for Data-
Centric Real-Time Pub/Sub
§ Automatic fail-over
§ Persistence
§ Dynamic Discovery
§ Content Filtering / Queries
9. DDS Standard Evolution
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
App App
Standard API
2004 2004
DDS DDS
2006 2006
DDSI/RTPS network DDSI/RTPS
Interoperable
Wire Protocol
§ High Performance
§ Interoperable Wire Protocol
10. DDS Standard Evolution
2008 2008
UML4DDS § UML-Based Modeling of UML4DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
DDS applications
App App
Standard API
2004 2004
DDS DDS
2006 2006
DDSI/RTPS network DDSI/RTPS
Interoperable
Wire Protocol
11. DDS Standard Evolution
2008 2008
UML4DDS UML4DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
App App
Standard API
2004 2004
2010
2010
DDS DDS
X-Types
X-Types
2006 2006
DDSI/RTPS network DDSI/RTPS
§ Extensible/Evolvable Type Interoperable
System Wire Protocol
§ Dynamic Topic Types, Data
Readers & Writers
§ Encoding Negotiation
12. DDS Standard Evolution
2008 § ISO C++ DDS PSM 2008
§ Simple, Safe, Efficient,
UML4DDS UML4DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Elegant and Ergonomic API
App App
Standard API
2004 2010 2004
ISO-C++ PSM
2010
2010
DDS DDS
X-Types
X-Types
2006 2006
DDSI/RTPS network DDSI/RTPS
Interoperable
Wire Protocol
13. DDS Standard Evolution
2008 § Java 5 DDS PSM 2008
§ Simple, Safe, Efficient,
UML4DDS UML4DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Elegant and Ergonomic API
App App
Standard API
2004 2010 2010 2004
ISO-C++ PSM Java5 PSM
2010
2010
DDS DDS
X-Types
X-Types
2006 2006
DDSI/RTPS network DDSI/RTPS
Interoperable
Wire Protocol
14. DDS Standard Evolution
2008 2008
UML4DDS UML4DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
App App
Standard API
2004 2010 2010 2004
2011
2011
Web-DDS
Web-DDS
ISO-C++ PSM Java5 PSM
2010
2010
DDS DDS
X-Types
X-Types
2006 2006
DDSI/RTPS network DDSI/RTPS
Interoperable
§ Standardized way of
Wire Protocol accessing DDS from Web
Technologies
§ REST, W3C WS-*, RSS, etc.
15. DDS Standard Evolution
2008 2008
UML4DDS UML4DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
App App
Standard API
2004 2010 2010 2004
2011
2011
Web-DDS
Web-DDS
ISO-C++ PSM Java5 PSM
2010
2010
DDS DDS
X-Types
X-Types
2011 2011
ULS-DDSI network ULS-DDSI
§ Ultra-Large Scale Extensions Interoperable
to the DDSI/RTPS wire- Wire Protocol
protocol
§ New Discovery
§ Support for TCP, etc.
16. DDS Standard Evolution
2008 2008
UML4DDS UML4DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
App App
Standard API
2004 2010 2010 2004
2012
2011
2011
2012
Web-DDS
Web-DDS
ISO-C++ PSM Java5 PSM
Security
Security
2010
2010
DDS DDS
X-Types
X-Types
2011 2011
ULS-DDSI network ULS-DDSI
Interoperable § Interoperable Security
Wire Protocol Architecture
§ Pluggable Policy / Labeling
and Tagging
17. DDS Standard Evolution
2008 2008
UML4DDS § Remote Method UML4DDS
Invocations over DDS
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
§ Synchronous, Asynchronous
App and one ways RMI App
2012 2012
Standard API
DDS-RMI DDS-RMI
2004 2010 2010 2004
2012
2011
2011
2012
Web-DDS
Web-DDS
ISO-C++ PSM Java5 PSM
Security
Security
2010
2010
DDS DDS
X-Types
X-Types
2011 2011
ULS-DDSI network ULS-DDSI
Interoperable
Wire Protocol
19. JMS DDS
Connection
Connection Domain
Participant
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session Session Publisher Subscriber
Establishes
connection with Gives access to a
the Broker DDS Domain
Pub/Sub Producer Destination Consumer DataWriter Topic DataReader
20. JMS DDS
Connection
Connection Domain
Participant
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session
Session Publisher Subscriber
Pub/Sub Producer Destination Consumer DataWriter Manage publishers
Topic DataReader
Establishes a JMS and subscribers
Session sessions
21. JMS DDS
Connection
Connection Domain
Participant
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session
Session Publisher Subscriber
Pub/Sub
Producer Destination Consumer DataWriter Topic DataReader
Reader/Writer for
Messaging Abstractions.
application
A Destination can be a
defined Topic
Topic or a Queue
Types
22. Note: Topics are the kind of
JMS Destination associated
with the Pub/Sub Domain
Pub/Sub & Topics
23. JMS Topics
¨ A Topic defines the subject of
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
publications and subscriptions
¨ The topic name has a weakly
defined semantics w.r.t. the
subscription matching
¨ Topics are Administered
Objects and should preferably
be defined outside the
application. API for local
definition also exist
24. DDS Topics
[1/2]
“com.myco.VPos”
¨ A Topic defines the subject of
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
publications and subscriptions
¨ A Topic has associated a user
defined extensible type and
QoS
¨ The Topic name, type and
QoS have a well defined role
in matching subscriptions
¨ Topics can be discovered or
locally defined struct VehiclePosition{!
string plate; @Key!
DURABILITY,
DEADLINE,
long x;!
PRIORITY,
longy;!
}! …
25. DDS Topics
[2/2]
“com.myco.VPos”
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ DDS Topic types can have
associated keys
¨ Each unique key-value
identify a Topic Instance –
a specific stream of values
struct VehiclePosition{! DURABILITY,
string plate; @Key! DEADLINE,
long x;!
PRIORITY,
longy;!
}! …
27. JMS
Connection
// Get connectionFactory from JNDI!
Connection Connection c = !
connectionFactory.createConnection();!
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session Session
Domain
Establishes Participant
connection with
the Broker
Pub/Sub Producer Topic Consumer Publisher Topic Subscriber
Reader/Writers
DataWrter DataReader
User Defined for Types
28. JMS
Connection
// Get connectionFactory from JNDI!
Connection Connection c = !
connectionFactory.createConnection();!
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session
Session s = !
Session c.createSession(false, !
Session.AUTO_ACKNOWLDEGE);!
Pub/Sub Producer Topic Consumer
Establishes a JMS
Session
Reader/Writers
User Defined for Types
29. JMS
Connection
// Get connectionFactory from JNDI!
Connection Connection c = !
connectionFactory.createConnection();!
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session
Session s = !
Session c.createSession(false, !
Session.AUTO_ACKNOWLDEGE);!
Pub/Sub // Look-up destination from JNDI!
Destination d = !
Producer Destination Consumer (Destination )jndi.lookup(destName);!
!
// Create a Producer!
MessageProducer mp = s.createProducer(d);!
!
// Create a Consumer!
Reader/Writers MessageConsumer mc = s.createConsumer(d);!
Messaging Abstractions.
User Defined for Types be a
A Destination can
Topic or a Queue
30. DDS
Connection
Domain
DomainParticipant dp = !
theDomainParticipantFactory().create_participant(0);! Participant
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session
Publisher Subscriber
Gives access to a
DDS Domain
Pub/Sub DataWriter Topic DataReader
31. DDS
Connection
Domain
DomainParticipant dp = !
theDomainParticipantFactory().create_participant(0);! Participant
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session // Create a Publisher / Subscriber!
Publisher p = dp.create_publisher();!
Subscriber s = dp.create_subscriber();! Publisher Subscriber
// Create a Topic!
Topic<Foo> t = dp.create_topic<Foo>(name)!
Pub/Sub DataWriter Manage publishers
Topic DataReader
and subscribers
sessions
32. DDS
Connection
Domain
DomainParticipant dp = !
theDomainParticipantFactory().create_participant(0);! Participant
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Session // Create a Publisher / Subscriber!
Publisher p = dp.create_publisher();!
Subscriber s = dp.create_subscriber();! Publisher Subscriber
// Create a Topic!
Topic<Foo> t = dp.create_topic<Foo>(name)!
Pub/Sub
// Create a DataWriter/DataWriter!
DataWriter<Foo> dw = pub.create_datawriter(t);! DataWriter Topic DataReader
DataReader<Foo> dr = sub.create_datareader(t);!
Reader/Writer for
application
defined Topic
Types
33. ¨ JMS allows to distribute Messages
¨ DDS allows to share Data
¨ Both DDS and JMS provide a
Topic-Based Pub/Sub abstraction
to match interests
Messages & Data
34. JMS Message
Text
Map Object
JMS Messages are
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨
composed by
¨ Header – Used for routing Stream Body Byte
Body
¨ Property – Filtering, etc.
¨ Body – Data
5 Different Body types
Message
¨
are supported Header Properties
35. Topic Types
struct VehiclePosition{!
string plate; //@Key!
¨ Topic types can be defined long x;!
in IDL, UML, XML, Java
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
long y;!
}!
¨ Topics types are extensible
and evolvable
¨ Rich set of annotations to Topic TrakCo.VehiclePosition
deal with fields that might be
optional, shared, etc. Topic Type VehiclePosition
Topic Key plate x y
¨ Each unique key value
identifies a Topic Instance “A123” 101 202
Topic Instances “B456” 303 202
¨ Topic Instance, can be
Created, Read, Updated, “C789” 101 606
and Disposed (CRUD)
36. In Summary
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
DDS JMS
¨ Topics have associated ¨ Topics represent a kind
user defined Types of Destination for
Messages
¨ These user defined types ¨ User-Types have to be
are used to read/write mapped into one of the
topic instances 5 message bodies
defined by JMS
38. Sending Message
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ JMS provides 5 // Create a Text Message!
TextMessage tm = s.createTextMessage(“Hello”);!
message body types // Send the Text Message!
mp.send(tm);!
!
¨ Messages are sent
through the Producer
39. Sending Message
class VehiclePosition !
implements java.io.Serializable {!
private String plate;!
private long x;!
private long y;!
!
// Ctors / Setters / Getters!
}!
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ JMS provides 5 !
VehiclePosition vp = !
message body types !
new VehiclePosition(“Hello”, 10, 20);!
// Create an Object Message!
ObjectMessage om = s.createObjectMessage(vp);!
¨ Messages are sent // Send the Object Message!
mp.send(om);!
through the Producer
!
40. Receiving Messages
¨ JMS Application receive
generic Message and
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
have to understand
what the type is (usually // Receive Message…!
TextMessage tm = (TextMessage)ms.receive();!
via down-casts) String str = tm.getText();!
!
¨ Messages can be read
proactively or listener
can be registered
¨ Messages are retrieved
one at the time
41. Receiving Messages
¨ JMS Application receive
generic Message and
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
have to understand
what the type is (usually !
ObjectMessage om = (ObjectMessage)ms.receive();!
via down-casts) VehiclePosition vp = (VehiclePosition)om.getObject();!
!
// Notice that any of the casts above could fail !
¨ Messages can be read // at runtime…!
proactively or listener
can be registered
¨ Messages are retrieved
one at the time
43. class VehiclePosition {!
Writing Data
public:!
const std::string& plate() const;!
void plate(const std::string& s);!
int32_t x() const;!
void x(int32_t i);!
int32_t y() const;!
void y(int32_t i);!
¨ DDS allows // Encapsulated State Representation!
};!
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
applications to define
their own data types VehiclePosition vp(“Hello”, 10, 20);!
dw << vp;!
and associate them !
// Alternative Syntax!
with Topics dw.write(vp);!
!
!
¨ Topic updates are
written through the
DataWriter
44. Reading Data
¨ DDS provide a strongly
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
typed API for reading data
that relies on DataReaders
// Read Data!
!
¨ Messages can be read std::vector<VehiclePosition> data(size);!
proactively or listener can std::vector<SampleInfo> info(size);!
!
be registered dr.read(data.begin(), info.begin(), size);!
¨ DDS provides A very
flexible selection
mechanism for topic
samples
45. DDS vs. JMS
¨ DDS provides an end-to- ¨ JMS requires user to “guess
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
end type-safe abstraction types” this introduce
for distributing publications potential for runtime errors
of user defined topic types
// Receive Message…!
TextMessage tm = (TextMessage)ms.receive();!
String str = tm.getText();!
// Read Data! !
! // =============================================!
std::vector<VehiclePosition> data(size);! !
std::vector<SampleInfo> info(size);! ObjectMessage om = (ObjectMessage)ms.receive();!
! VehiclePosition vp = (VehiclePosition)om.getObject();!
dr.read(data.begin(), info.begin(), size);! !
// Notice that any of the casts above could fail !
// at runtime…!
47. Instance/History Management
¨ An Instance per unique key value
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ An update for a Topic Instance is called Sample
¨ DDS can maintain a configurable history of samples per Topic Instance
48. com.myco.VPos
com.myco.VPos
DDS
JMS
Topic Instances vs. Messages
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
49. Topic Instances vs. Messages
DDS
New
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
“A01” 100 200
com.myco.VPos
JMS
“A01” 100 200
com.myco.VPos
50. Topic Instances vs. Messages
DDS
New
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
“A01” 100 200
New
“B41” 57 31
com.myco.VPos
JMS
“B41” 57 31 “A01” 100 200
com.myco.VPos
51. Topic Instances vs. Messages
DDS
New
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
“A01” 110 210 “A01” 100 200
New
“B41” 57 31
com.myco.VPos
JMS
“A01” 110 210 “B41” 57 31 “A01” 100 200
com.myco.VPos
52. Topic Instances vs. Messages
DDS
New
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
“A01” 120 220 “A01” 110 210 “A01” 100 200
New
“B41” 57 31
com.myco.VPos
JMS
“A01” 120 220 “A01” 110 210 “B41” 57 31 “A01” 100 200
com.myco.VPos
53. Topic Instances vs. Messages
DDS
New
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
“A01” 120 220 “A01” 110 210 “A01” 100 200
New
“B41” 47 19 “B41” 57 31
com.myco.VPos
JMS
“B41” 47 19 “A01” 120 220 “A01” 110 210 “B41” 57 31 “A01” 100 200
com.myco.VPos
54. Topic Instances vs. Messages
DDS
New
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
“A01” 120 220 “A01” 110 210 “A01” 100 200
New
“B41” Dis- osed
p - “B41” 47 19 “B41” 57 31
com.myco.VPos
JMS
“B41” 47 19 “A01” 120 220 “A01” 110 210 “B41” 57 31 “A01” 100 200
com.myco.VPos
55. Dynamic Discovery
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ DDS dynamically discovers publishers, subscribers as
well as Topics
¨ Dynamic Discovery has a key role in subscriptions
matching
¨ No global configuration is required
56. QoS Framework
¨ DDS provides a
mechanism for
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
Type Matching
end-to-end QoS
QoS matching
matching
QoS QoS QoS QoS QoS QoS QoS
Topic
Name
Publisher Subscriber
Communication is
... DataWriter writes Type reads DataReader
...
¨ ...
established iff the DomainParticipant DataWriter writes Type reads DataReader DomainParticipant
QoS offered by the
Name
Topic
publisher QoS QoS QoS
matches/exceeds
that requested by
the subscriber
57. QoS Policies
QoS Policy Applicability RxO Modifiable
DURABILITY T, DR, DW Y N
DURABILITY T, DW N N
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
SERVICE Data
Availability
LIFESPAN T, DW N/A Y QoS Policy Applicability RxO Modifiable
HISTORY T, DR, DW N N TIME BASED DR N/A Y
PRESENTATION P, S Y N FILTER
Resources
RESOURCE T, DR, DW N N
RELIABILITY T, DR, DW Y N LIMITS
PARTITION P, S N Y ENTITY
Data FACTORY
DESTINATION T, DR, DW Y N
Delivery USER DATA DP, DR, DW N Y
ORDER
T N Y
Configuration
OWNERSHIP T, DR, DW Y N TOPIC DATA
OWNERSHIP DW N/A Y GROUP DATA P, S N Y
STRENGTH LIVELINESS T, DR, DW Y N
DEADLINE T, DR, DW Y Y WRITER DATA DW N/A Y
LATENCY T, DR, DW Y Y LIFECYCLE
Data Lifecycle
BUDGET READER DATA DR N/A Y
Timeliness
TRANSPORT T, DW N/A Y LIFECYCLE
PRIORITY
58. Content Awareness
¨ DDS make it possible struct VehiclePosition{!
string plate; @Key!
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
express filters and long x;!
long y;!
queries on the whole }!
content of a topic type
¨ Filters can be used to Filter Examples:
establish content filtered
subscriptions “x < %0 AND y < %1”
“y BETWEEN (10 AND 20)”
¨ Queries can be used to
create local views of
available data
59. High Performance
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ OpenSplice DDS is
2.5x-3x faster than
high performance
JMS implementations
60. High Performance
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ OpenSplice DDS
delivers very low and
predictable latencies
Latency (usec)
¨ No other Pub/Sub
technology can
approach similar level
of performance!
Size (bytes)
62. Integrating JMS with DDS
OpenSplice DDS Connector
Existing JMS systems can be
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
¨ Custom Connectors
easily integrated with DDS
today using Apache Camel
OpenSplice DDS Custom
ULS DDSI
High Performance, High BLEND-Box
WS-*
¨
Availability Integration of
DDSI REST JMS
DDS with JMS will also
available through the Blend-
Box (available later this year) DDS Connectors
Web Connectors compliant with
the Web-Enabled DDS Specificaiton
65. Concluding Remarks
¨ DDS is a powerful lively standard for publish/
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
subscribe
¨ DDS provides some very useful abstractions not
available in JMS, such as user-defined types,
instances, history, etc.
¨ DDS can be as simple to use as JMS, but when
required provides far more knobs for tuning
scalability, performance and QoS
66. OpenSplice DDS
Delivering Performance, Openness, and Freedom
http://www.opensplice.com/
http://www.opensplice.org/ http://www.slideshare.net/angelo.corsaro
emailto:opensplicedds@prismtech.com
Copyright
2010,
PrismTech
–
All
Rights
Reserved.
http://bit.ly/1Sreg
http://twitter.com/acorsaro/
http://www.youtube.com/OpenSpliceTube http://opensplice.blogspot.com