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