SlideShare a Scribd company logo
Java 5 PSM for DDS:
Initial Submission
MARS – Minneapolis, MN – June 2010
Presenter: Rick Warren, RTI
Submitting POCs:
 Rick Warren, RTI:
rick.warren@rti.com
 Angelo Corsaro, PrismTech:
angelo.corsaro@prismtech.com
document number: mars/10-06-09
Agenda
Specification Overview
Specification Highlights
 Bootstrapping
 Generics
 Reading data
 QoS
TODO for the Revised Submission
Copyright © 2010 RTI - All rights Reserved 2
Goal
Improve user experience
 standardNamingConvention
 Standard containers (e.g. java.util.List)
 Standard enumerations
 Serializable value types
Improve type safety
 Generics
Improve performance
 Loanable memory
 No critical-path memory allocation
Copyright © 2010 RTI - All rights Reserved 3
State of the Proposal
Process moving quickly and efficiently
 Submitters have already joined
 Most mandatory requirements already satisfied
 User vetting process already begun
 Private conversations with Java power users
 Publicly available code repository at
http://code.google.com/p/datadistrib4j/
 So far, reviewers enthusiastic
Still to go:
 DDS-XTypes APIs
 Java Type Representation: avoid code generation
 JavaDoc?
Copyright © 2010 RTI - All rights Reserved 4
Design Principles
Ease of Use
 Align with standard Java technologies and conventions
 Conventional camelCase names
 Error conditions reported with exceptions
 Value types are cloneable, serializable
 Provide simplified method overloads
Performance
 Avoid critical-path memory allocation, unlike IDL PSM
Runtime Portability
 Build apps against standard interfaces; decide at runtime which
implementation to use
 Host multiple implementations (or versions) within same JVM
Dynamic Loading and Unloading
 Play nicely with containers, e.g. Java EE or OSGi
 Don’t require non-constant static state
Copyright © 2010 RTI - All rights Reserved 5
Hello, World
import org.omg.dds.*;
Topic<Foo> t = …;
DataWriter<Foo> dw =
myPub.createDataWriter(t);
Foo data = …;
dw.write(data);
dw.close();
DataReader<Foo> dr =
mySub.createDataReader(t);
Sample.Iterator<Foo> it =
dr.take();
Foo data2 = it.next().
getData();
it.returnLoan();
dr.close();
 OMG package
 Typical naming
convention
 Overloaded
methods
 Generics for type
safety
 Close like JMS,
I/O stream
 Standard
collections
Copyright © 2010 RTI - All rights Reserved 6
Highlight: Bootstrapping
Design pattern: Everything is an interface (if
possible) or abstract class (if not).
Challenge: How do you create the first object?
JMS answer: JNDI
import javax.naming.*;
import javax.jms.*;
Context ctx = new InitialContext();
Topic t = (Topic) ctx.lookup("My Topic");
Copyright © 2010 RTI - All rights Reserved 7
Highlight: Bootstrapping
DDS complications with lookup:
 Lots of “top-level” objects
 DomainParticipantFactory
 WaitSet, GuardCondition
 Statuses
 Time, duration
 …
 DDS is more dynamic
 Create topics on the fly
 WaitSet is not logically an “administered object”
Copyright © 2010 RTI - All rights Reserved 8
Highlight: Bootstrapping
Solution: JNDI-like DDS Context
Create reflectively based on system property:
 org.omg.dds.core.Context ctx =
Context.getInstance(
/* "org.omg.dds.serviceClassName" */);
Create everything else from here:
 DomainParticipantFactory dpf =
ctx.getParticipantFactory();
 Duration duration = ctx.createDuration();
Get back here from anywhere:
 Context ctx = duration.getContext();
Copyright © 2010 RTI - All rights Reserved 9
Highlight: Generics
Design pattern: Use generic types wherever they
help polymorphic type safety
Obvious:
DataWriter<Foo> dw = …;
Non-obvious:
interface Entity<SELF extends Entity,
LISTENER extends
EventListener,
QOS extends Qos> {
LISTENER getListener();
QOS getQos();
StatusCondition<SELF> getStatusCondition();
}
Copyright © 2010 RTI - All rights Reserved 10
Highlight: Generics
Example type:
interface DataWriter<TYPE>
extends Entity<DataWriter<TYPE>,
DataWriterListener<TYPE>,
DataWriterQos>
Example uses:
void closeTheEntity(Entity<?, ?, ?> e) {
e.close();
}
<LS> void setTheListener(Entity<?, LS, ?> e, LS ln) {
e.setListener(ln);
}
Copyright © 2010 RTI - All rights Reserved 11
Highlight: Reading Data
Take a loan:
Sample.Iterator<Foo> it = reader.take();
try {
while (it.hasNext()) {
Sample<Foo> spl = it.next();
InstanceHandle hdl = spl.getInstanceHandle();
Foo data = spl.getData();
if (data != null) {
// ...
}
}
} finally {
it.returnLoan();
}
Copyright © 2010 RTI - All rights Reserved 12
Highlight: Reading Data
Take a copy:
List<Sample<Foo>> dataList =
new ArrayList<Sample<Foo>>();
reader.take(dataList);
for (Iterator<Sample<Foo>> it = dataList.iterator();
it.hasNext();) {
Sample<Foo> spl = it.next();
InstanceHandle hdl = spl.getInstanceHandle();
Foo data = spl.getData();
if (data != null) {
// ...
}
}
Copyright © 2010 RTI - All rights Reserved 13
Highlight: QoS
Typical Bean property:
 Qos getQos();
 void setQos(Qos q);
By default, QoS are immutable
 Getters: myQos.getReliability();
 No setters: myQos.setReliability(…);
QoS are also Maps:
 java.util.Map<QosPolicy.Id, QosPolicy> map = myQos;
 ReliabilityQosPolicy p = (ReliabilityQosPolicy) map.get(
QosPolicy.Id.RELIABILITY);
Modify explicitly:
 ModifiableQos mod = myQos.modify(); // new obj
 mod.setReliability(myReliability);
 myEntity.setQos(mod); // mod interface extends unmod
Copyright © 2010 RTI - All rights Reserved 14
Highlight: QoS
Why the modifiable/unmodifiable pattern?
 Easy to use: Bean property
 Conventional, intuitive
 Works as expected with introspection
 Good for concurrency: immutable object freely shared
 “Get” is fast: just return pointer
 No memory allocation needed
 No deep copy needed
Cost: “Set” must allocate new object (for next “get”)
 …but “set” is slow anyway:
 Deeply copies QoS
 Sends update on built-in topic
 …and setQos is not typically a critical-path operation
 RTSJ users must be aware
Copyright © 2010 RTI - All rights Reserved 15
Highlight: QoS
Alternative (discarded) design
with modifiable QoS (à la IDL PSM):
DataWriterQos qos =
ctx.createDataWriterQos();
 Requires additional factory methods
ReliabilityQosPolicy.Kind k =
qos.getReliability().getKind();
 Value of “k” is undefined
myWriter.getQos(qos);
 Unintuitive signature
qos.getReliability().setKind(…);
 Object “qos” can’t be safely stored, shared
Copyright © 2010 RTI - All rights Reserved 16
Revised Submission TODO
New DDS-XTypes APIs
 Built-in types: String, Bytes, KeyedString, KeyedBytes
 Dynamic Language Binding: DynamicType, DynamicData
 TypeObject Type Representation
 New QoS policies
Java Type Representation
@DdsType interface Employee {
@Key int getEmployeeIdNumber();
}
Copyright © 2010 RTI - All rights Reserved 17
Revised Submission TODO
Copy specification into JavaDoc?
 Friendly for IDE users
 myWriter.setQos|
Examples (non-normative)
 Application code example
 No-op reference implementation
Further community review
Copyright © 2010 RTI - All rights Reserved 18
void setQos(DataWriterQos q)
Set the QoS of this DataWriter. The result
of subsequent calls to getQos will be
equal to the value set by this method.
Summary
DDS will have a first-class
Java API.
 That looks and behaves like a
typical Java API.
 That performs well.
 Soon.
Copyright © 2010 RTI - All rights Reserved 19
Q & A
Copyright © 2010 RTI - All rights Reserved 20

More Related Content

What's hot

MongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with MorphiaMongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with Morphia
Scott Hernandez
 
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
Uniface
 
HFile: A Block-Indexed File Format to Store Sorted Key-Value Pairs
HFile: A Block-Indexed File Format to Store Sorted Key-Value PairsHFile: A Block-Indexed File Format to Store Sorted Key-Value Pairs
HFile: A Block-Indexed File Format to Store Sorted Key-Value Pairs
Schubert Zhang
 
Hfile
HfileHfile
Formalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and ProofFormalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and Proof
Achim D. Brucker
 
The Format of new HFile 2
The Format of new HFile 2The Format of new HFile 2
The Format of new HFile 2
Anty Rao
 
XML Technologies for RESTful Services Development
XML Technologies for RESTful Services DevelopmentXML Technologies for RESTful Services Development
XML Technologies for RESTful Services Development
ruyalarcon
 
Dom
DomDom
Objects arent records with byte codes on the side
Objects arent records with byte codes on the sideObjects arent records with byte codes on the side
Objects arent records with byte codes on the side
Michael Caruso
 
DDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxDDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxx
Angelo Corsaro
 
Hfile格式详细介绍
Hfile格式详细介绍Hfile格式详细介绍
Difference between rdf, odata and gdata
Difference between rdf, odata and gdataDifference between rdf, odata and gdata
Difference between rdf, odata and gdata
Umar Ali
 
Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...
Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...
Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...
Neo4j
 
[HES2013] Nifty stuff that you can still do with android by Xavier Martin
[HES2013] Nifty stuff that you can still do with android by Xavier Martin[HES2013] Nifty stuff that you can still do with android by Xavier Martin
[HES2013] Nifty stuff that you can still do with android by Xavier Martin
Hackito Ergo Sum
 
Hibernate for Beginners
Hibernate for BeginnersHibernate for Beginners
Hibernate for Beginners
Ramesh Kumar
 
NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020
Thodoris Bais
 

What's hot (16)

MongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with MorphiaMongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with Morphia
 
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
Uniface Lectures Webinar - Application & Infrastructure Security - JSON Web T...
 
HFile: A Block-Indexed File Format to Store Sorted Key-Value Pairs
HFile: A Block-Indexed File Format to Store Sorted Key-Value PairsHFile: A Block-Indexed File Format to Store Sorted Key-Value Pairs
HFile: A Block-Indexed File Format to Store Sorted Key-Value Pairs
 
Hfile
HfileHfile
Hfile
 
Formalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and ProofFormalizing (Web) Standards: An Application of Test and Proof
Formalizing (Web) Standards: An Application of Test and Proof
 
The Format of new HFile 2
The Format of new HFile 2The Format of new HFile 2
The Format of new HFile 2
 
XML Technologies for RESTful Services Development
XML Technologies for RESTful Services DevelopmentXML Technologies for RESTful Services Development
XML Technologies for RESTful Services Development
 
Dom
DomDom
Dom
 
Objects arent records with byte codes on the side
Objects arent records with byte codes on the sideObjects arent records with byte codes on the side
Objects arent records with byte codes on the side
 
DDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxDDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxx
 
Hfile格式详细介绍
Hfile格式详细介绍Hfile格式详细介绍
Hfile格式详细介绍
 
Difference between rdf, odata and gdata
Difference between rdf, odata and gdataDifference between rdf, odata and gdata
Difference between rdf, odata and gdata
 
Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...
Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...
Object Graph Mapping with Spring Data Neo4j 3 - Nicki Watt & Michael Hunger @...
 
[HES2013] Nifty stuff that you can still do with android by Xavier Martin
[HES2013] Nifty stuff that you can still do with android by Xavier Martin[HES2013] Nifty stuff that you can still do with android by Xavier Martin
[HES2013] Nifty stuff that you can still do with android by Xavier Martin
 
Hibernate for Beginners
Hibernate for BeginnersHibernate for Beginners
Hibernate for Beginners
 
NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020
 

Viewers also liked

Social Media Revolutions: How to communicate in the web 2.0 world
Social Media Revolutions: How to communicate in the web 2.0 worldSocial Media Revolutions: How to communicate in the web 2.0 world
Social Media Revolutions: How to communicate in the web 2.0 world
Alastair Smith
 
American Legion Navy Social Media Brief Final
American Legion   Navy Social Media Brief FinalAmerican Legion   Navy Social Media Brief Final
American Legion Navy Social Media Brief Final
Navy Public Affairs Emerging Media
 
Extensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDSExtensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDS
Rick Warren
 
Extensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDSExtensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDS
Rick Warren
 
Vortex Tutorial -- Part I
Vortex Tutorial -- Part IVortex Tutorial -- Part I
Vortex Tutorial -- Part I
Angelo Corsaro
 
Advanced OpenSplice Programming - Part I
Advanced OpenSplice Programming - Part IAdvanced OpenSplice Programming - Part I
Advanced OpenSplice Programming - Part I
Angelo Corsaro
 
Advanced OpenSplice Programming - Part II
Advanced OpenSplice Programming - Part IIAdvanced OpenSplice Programming - Part II
Advanced OpenSplice Programming - Part II
Angelo Corsaro
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
LinkedIn
 

Viewers also liked (8)

Social Media Revolutions: How to communicate in the web 2.0 world
Social Media Revolutions: How to communicate in the web 2.0 worldSocial Media Revolutions: How to communicate in the web 2.0 world
Social Media Revolutions: How to communicate in the web 2.0 world
 
American Legion Navy Social Media Brief Final
American Legion   Navy Social Media Brief FinalAmerican Legion   Navy Social Media Brief Final
American Legion Navy Social Media Brief Final
 
Extensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDSExtensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDS
 
Extensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDSExtensible and Dynamic Topic Types for DDS
Extensible and Dynamic Topic Types for DDS
 
Vortex Tutorial -- Part I
Vortex Tutorial -- Part IVortex Tutorial -- Part I
Vortex Tutorial -- Part I
 
Advanced OpenSplice Programming - Part I
Advanced OpenSplice Programming - Part IAdvanced OpenSplice Programming - Part I
Advanced OpenSplice Programming - Part I
 
Advanced OpenSplice Programming - Part II
Advanced OpenSplice Programming - Part IIAdvanced OpenSplice Programming - Part II
Advanced OpenSplice Programming - Part II
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar to Java 5 PSM for DDS: Initial Submission (out of date)

Java 5 PSM for DDS: Revised Submission (out of date)
Java 5 PSM for DDS: Revised Submission (out of date)Java 5 PSM for DDS: Revised Submission (out of date)
Java 5 PSM for DDS: Revised Submission (out of date)
Rick Warren
 
Green dao
Green daoGreen dao
Green dao
Droidcon Berlin
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
elliando dias
 
Oredev 2009 JAX-RS
Oredev 2009 JAX-RSOredev 2009 JAX-RS
Oredev 2009 JAX-RS
Niklas Gustavsson
 
DDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardDDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing Standard
Angelo Corsaro
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
Kumaraswamy M
 
Practical OData
Practical ODataPractical OData
Practical OData
Vagif Abilov
 
Hibernate
Hibernate Hibernate
Hibernate
Sunil OS
 
Muduo network library
Muduo network libraryMuduo network library
Muduo network library
Shuo Chen
 
IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013
Stuart Myles
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
Murat Yener
 
Desktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex CaféDesktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex Café
Angelo Corsaro
 
Desktop, Embedded and Mobile Apps with PrismTech Vortex Cafe
Desktop, Embedded and Mobile Apps with PrismTech Vortex CafeDesktop, Embedded and Mobile Apps with PrismTech Vortex Cafe
Desktop, Embedded and Mobile Apps with PrismTech Vortex Cafe
ADLINK Technology IoT
 
Questions On The Code And Core Module
Questions On The Code And Core ModuleQuestions On The Code And Core Module
Questions On The Code And Core Module
Katie Gulley
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
Matt O'Keefe
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
Play 2.0
Play 2.0Play 2.0
Play 2.0
elizhender
 
define_xml_tutorial .ppt
define_xml_tutorial .pptdefine_xml_tutorial .ppt
define_xml_tutorial .ppt
ssuser660bb1
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
Anatole Tresch
 
Accelerated data access
Accelerated data accessAccelerated data access
Accelerated data access
gordonyorke
 

Similar to Java 5 PSM for DDS: Initial Submission (out of date) (20)

Java 5 PSM for DDS: Revised Submission (out of date)
Java 5 PSM for DDS: Revised Submission (out of date)Java 5 PSM for DDS: Revised Submission (out of date)
Java 5 PSM for DDS: Revised Submission (out of date)
 
Green dao
Green daoGreen dao
Green dao
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Java
 
Oredev 2009 JAX-RS
Oredev 2009 JAX-RSOredev 2009 JAX-RS
Oredev 2009 JAX-RS
 
DDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardDDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing Standard
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
 
Practical OData
Practical ODataPractical OData
Practical OData
 
Hibernate
Hibernate Hibernate
Hibernate
 
Muduo network library
Muduo network libraryMuduo network library
Muduo network library
 
IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013
 
Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15Android and the Seven Dwarfs from Devox'15
Android and the Seven Dwarfs from Devox'15
 
Desktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex CaféDesktop, Embedded and Mobile Apps with Vortex Café
Desktop, Embedded and Mobile Apps with Vortex Café
 
Desktop, Embedded and Mobile Apps with PrismTech Vortex Cafe
Desktop, Embedded and Mobile Apps with PrismTech Vortex CafeDesktop, Embedded and Mobile Apps with PrismTech Vortex Cafe
Desktop, Embedded and Mobile Apps with PrismTech Vortex Cafe
 
Questions On The Code And Core Module
Questions On The Code And Core ModuleQuestions On The Code And Core Module
Questions On The Code And Core Module
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
Play 2.0
Play 2.0Play 2.0
Play 2.0
 
define_xml_tutorial .ppt
define_xml_tutorial .pptdefine_xml_tutorial .ppt
define_xml_tutorial .ppt
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache Tamaya
 
Accelerated data access
Accelerated data accessAccelerated data access
Accelerated data access
 

More from Rick Warren

Real-World Git
Real-World GitReal-World Git
Real-World Git
Rick Warren
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
Rick Warren
 
Letters from the Trenches: Lessons Learned Taking MongoDB to Production
Letters from the Trenches: Lessons Learned Taking MongoDB to ProductionLetters from the Trenches: Lessons Learned Taking MongoDB to Production
Letters from the Trenches: Lessons Learned Taking MongoDB to Production
Rick Warren
 
Patterns of Data Distribution
Patterns of Data DistributionPatterns of Data Distribution
Patterns of Data Distribution
Rick Warren
 
Data-centric Invocable Services
Data-centric Invocable ServicesData-centric Invocable Services
Data-centric Invocable Services
Rick Warren
 
Engineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsEngineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable Systems
Rick Warren
 
Scaling DDS to Millions of Computers and Devices
Scaling DDS to Millions of Computers and DevicesScaling DDS to Millions of Computers and Devices
Scaling DDS to Millions of Computers and Devices
Rick Warren
 
DDS in a Nutshell
DDS in a NutshellDDS in a Nutshell
DDS in a Nutshell
Rick Warren
 
Java 5 Language PSM for DDS: Final Submission
Java 5 Language PSM for DDS: Final SubmissionJava 5 Language PSM for DDS: Final Submission
Java 5 Language PSM for DDS: Final Submission
Rick Warren
 
C++ PSM for DDS: Revised Submission
C++ PSM for DDS: Revised SubmissionC++ PSM for DDS: Revised Submission
C++ PSM for DDS: Revised Submission
Rick Warren
 
Web-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised SubmissionWeb-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised Submission
Rick Warren
 
Extensible and Dynamic Topic Types for DDS, Beta 1
Extensible and Dynamic Topic Types for DDS, Beta 1Extensible and Dynamic Topic Types for DDS, Beta 1
Extensible and Dynamic Topic Types for DDS, Beta 1
Rick Warren
 
Mapping the RESTful Programming Model to the DDS Data-Centric Model
Mapping the RESTful Programming Model to the DDS Data-Centric ModelMapping the RESTful Programming Model to the DDS Data-Centric Model
Mapping the RESTful Programming Model to the DDS Data-Centric Model
Rick Warren
 
Large-Scale System Integration with DDS for SCADA, C2, and Finance
Large-Scale System Integration with DDS for SCADA, C2, and FinanceLarge-Scale System Integration with DDS for SCADA, C2, and Finance
Large-Scale System Integration with DDS for SCADA, C2, and Finance
Rick Warren
 
Data-Centric and Message-Centric System Architecture
Data-Centric and Message-Centric System ArchitectureData-Centric and Message-Centric System Architecture
Data-Centric and Message-Centric System Architecture
Rick Warren
 
Easing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDSEasing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDS
Rick Warren
 
Java 5 API for DDS RFP (out of date)
Java 5 API for DDS RFP (out of date)Java 5 API for DDS RFP (out of date)
Java 5 API for DDS RFP (out of date)
Rick Warren
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDS
Rick Warren
 
Extensible and Dynamic Topic Types For DDS (out of date)
Extensible and Dynamic Topic Types For DDS (out of date)Extensible and Dynamic Topic Types For DDS (out of date)
Extensible and Dynamic Topic Types For DDS (out of date)
Rick Warren
 
Proposed Java 5 API for DDS (out of date)
Proposed Java 5 API for DDS (out of date)Proposed Java 5 API for DDS (out of date)
Proposed Java 5 API for DDS (out of date)
Rick Warren
 

More from Rick Warren (20)

Real-World Git
Real-World GitReal-World Git
Real-World Git
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
Letters from the Trenches: Lessons Learned Taking MongoDB to Production
Letters from the Trenches: Lessons Learned Taking MongoDB to ProductionLetters from the Trenches: Lessons Learned Taking MongoDB to Production
Letters from the Trenches: Lessons Learned Taking MongoDB to Production
 
Patterns of Data Distribution
Patterns of Data DistributionPatterns of Data Distribution
Patterns of Data Distribution
 
Data-centric Invocable Services
Data-centric Invocable ServicesData-centric Invocable Services
Data-centric Invocable Services
 
Engineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsEngineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable Systems
 
Scaling DDS to Millions of Computers and Devices
Scaling DDS to Millions of Computers and DevicesScaling DDS to Millions of Computers and Devices
Scaling DDS to Millions of Computers and Devices
 
DDS in a Nutshell
DDS in a NutshellDDS in a Nutshell
DDS in a Nutshell
 
Java 5 Language PSM for DDS: Final Submission
Java 5 Language PSM for DDS: Final SubmissionJava 5 Language PSM for DDS: Final Submission
Java 5 Language PSM for DDS: Final Submission
 
C++ PSM for DDS: Revised Submission
C++ PSM for DDS: Revised SubmissionC++ PSM for DDS: Revised Submission
C++ PSM for DDS: Revised Submission
 
Web-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised SubmissionWeb-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised Submission
 
Extensible and Dynamic Topic Types for DDS, Beta 1
Extensible and Dynamic Topic Types for DDS, Beta 1Extensible and Dynamic Topic Types for DDS, Beta 1
Extensible and Dynamic Topic Types for DDS, Beta 1
 
Mapping the RESTful Programming Model to the DDS Data-Centric Model
Mapping the RESTful Programming Model to the DDS Data-Centric ModelMapping the RESTful Programming Model to the DDS Data-Centric Model
Mapping the RESTful Programming Model to the DDS Data-Centric Model
 
Large-Scale System Integration with DDS for SCADA, C2, and Finance
Large-Scale System Integration with DDS for SCADA, C2, and FinanceLarge-Scale System Integration with DDS for SCADA, C2, and Finance
Large-Scale System Integration with DDS for SCADA, C2, and Finance
 
Data-Centric and Message-Centric System Architecture
Data-Centric and Message-Centric System ArchitectureData-Centric and Message-Centric System Architecture
Data-Centric and Message-Centric System Architecture
 
Easing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDSEasing Integration of Large-Scale Real-Time Systems with DDS
Easing Integration of Large-Scale Real-Time Systems with DDS
 
Java 5 API for DDS RFP (out of date)
Java 5 API for DDS RFP (out of date)Java 5 API for DDS RFP (out of date)
Java 5 API for DDS RFP (out of date)
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDS
 
Extensible and Dynamic Topic Types For DDS (out of date)
Extensible and Dynamic Topic Types For DDS (out of date)Extensible and Dynamic Topic Types For DDS (out of date)
Extensible and Dynamic Topic Types For DDS (out of date)
 
Proposed Java 5 API for DDS (out of date)
Proposed Java 5 API for DDS (out of date)Proposed Java 5 API for DDS (out of date)
Proposed Java 5 API for DDS (out of date)
 

Recently uploaded

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 

Recently uploaded (20)

Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 

Java 5 PSM for DDS: Initial Submission (out of date)

  • 1. Java 5 PSM for DDS: Initial Submission MARS – Minneapolis, MN – June 2010 Presenter: Rick Warren, RTI Submitting POCs:  Rick Warren, RTI: rick.warren@rti.com  Angelo Corsaro, PrismTech: angelo.corsaro@prismtech.com document number: mars/10-06-09
  • 2. Agenda Specification Overview Specification Highlights  Bootstrapping  Generics  Reading data  QoS TODO for the Revised Submission Copyright © 2010 RTI - All rights Reserved 2
  • 3. Goal Improve user experience  standardNamingConvention  Standard containers (e.g. java.util.List)  Standard enumerations  Serializable value types Improve type safety  Generics Improve performance  Loanable memory  No critical-path memory allocation Copyright © 2010 RTI - All rights Reserved 3
  • 4. State of the Proposal Process moving quickly and efficiently  Submitters have already joined  Most mandatory requirements already satisfied  User vetting process already begun  Private conversations with Java power users  Publicly available code repository at http://code.google.com/p/datadistrib4j/  So far, reviewers enthusiastic Still to go:  DDS-XTypes APIs  Java Type Representation: avoid code generation  JavaDoc? Copyright © 2010 RTI - All rights Reserved 4
  • 5. Design Principles Ease of Use  Align with standard Java technologies and conventions  Conventional camelCase names  Error conditions reported with exceptions  Value types are cloneable, serializable  Provide simplified method overloads Performance  Avoid critical-path memory allocation, unlike IDL PSM Runtime Portability  Build apps against standard interfaces; decide at runtime which implementation to use  Host multiple implementations (or versions) within same JVM Dynamic Loading and Unloading  Play nicely with containers, e.g. Java EE or OSGi  Don’t require non-constant static state Copyright © 2010 RTI - All rights Reserved 5
  • 6. Hello, World import org.omg.dds.*; Topic<Foo> t = …; DataWriter<Foo> dw = myPub.createDataWriter(t); Foo data = …; dw.write(data); dw.close(); DataReader<Foo> dr = mySub.createDataReader(t); Sample.Iterator<Foo> it = dr.take(); Foo data2 = it.next(). getData(); it.returnLoan(); dr.close();  OMG package  Typical naming convention  Overloaded methods  Generics for type safety  Close like JMS, I/O stream  Standard collections Copyright © 2010 RTI - All rights Reserved 6
  • 7. Highlight: Bootstrapping Design pattern: Everything is an interface (if possible) or abstract class (if not). Challenge: How do you create the first object? JMS answer: JNDI import javax.naming.*; import javax.jms.*; Context ctx = new InitialContext(); Topic t = (Topic) ctx.lookup("My Topic"); Copyright © 2010 RTI - All rights Reserved 7
  • 8. Highlight: Bootstrapping DDS complications with lookup:  Lots of “top-level” objects  DomainParticipantFactory  WaitSet, GuardCondition  Statuses  Time, duration  …  DDS is more dynamic  Create topics on the fly  WaitSet is not logically an “administered object” Copyright © 2010 RTI - All rights Reserved 8
  • 9. Highlight: Bootstrapping Solution: JNDI-like DDS Context Create reflectively based on system property:  org.omg.dds.core.Context ctx = Context.getInstance( /* "org.omg.dds.serviceClassName" */); Create everything else from here:  DomainParticipantFactory dpf = ctx.getParticipantFactory();  Duration duration = ctx.createDuration(); Get back here from anywhere:  Context ctx = duration.getContext(); Copyright © 2010 RTI - All rights Reserved 9
  • 10. Highlight: Generics Design pattern: Use generic types wherever they help polymorphic type safety Obvious: DataWriter<Foo> dw = …; Non-obvious: interface Entity<SELF extends Entity, LISTENER extends EventListener, QOS extends Qos> { LISTENER getListener(); QOS getQos(); StatusCondition<SELF> getStatusCondition(); } Copyright © 2010 RTI - All rights Reserved 10
  • 11. Highlight: Generics Example type: interface DataWriter<TYPE> extends Entity<DataWriter<TYPE>, DataWriterListener<TYPE>, DataWriterQos> Example uses: void closeTheEntity(Entity<?, ?, ?> e) { e.close(); } <LS> void setTheListener(Entity<?, LS, ?> e, LS ln) { e.setListener(ln); } Copyright © 2010 RTI - All rights Reserved 11
  • 12. Highlight: Reading Data Take a loan: Sample.Iterator<Foo> it = reader.take(); try { while (it.hasNext()) { Sample<Foo> spl = it.next(); InstanceHandle hdl = spl.getInstanceHandle(); Foo data = spl.getData(); if (data != null) { // ... } } } finally { it.returnLoan(); } Copyright © 2010 RTI - All rights Reserved 12
  • 13. Highlight: Reading Data Take a copy: List<Sample<Foo>> dataList = new ArrayList<Sample<Foo>>(); reader.take(dataList); for (Iterator<Sample<Foo>> it = dataList.iterator(); it.hasNext();) { Sample<Foo> spl = it.next(); InstanceHandle hdl = spl.getInstanceHandle(); Foo data = spl.getData(); if (data != null) { // ... } } Copyright © 2010 RTI - All rights Reserved 13
  • 14. Highlight: QoS Typical Bean property:  Qos getQos();  void setQos(Qos q); By default, QoS are immutable  Getters: myQos.getReliability();  No setters: myQos.setReliability(…); QoS are also Maps:  java.util.Map<QosPolicy.Id, QosPolicy> map = myQos;  ReliabilityQosPolicy p = (ReliabilityQosPolicy) map.get( QosPolicy.Id.RELIABILITY); Modify explicitly:  ModifiableQos mod = myQos.modify(); // new obj  mod.setReliability(myReliability);  myEntity.setQos(mod); // mod interface extends unmod Copyright © 2010 RTI - All rights Reserved 14
  • 15. Highlight: QoS Why the modifiable/unmodifiable pattern?  Easy to use: Bean property  Conventional, intuitive  Works as expected with introspection  Good for concurrency: immutable object freely shared  “Get” is fast: just return pointer  No memory allocation needed  No deep copy needed Cost: “Set” must allocate new object (for next “get”)  …but “set” is slow anyway:  Deeply copies QoS  Sends update on built-in topic  …and setQos is not typically a critical-path operation  RTSJ users must be aware Copyright © 2010 RTI - All rights Reserved 15
  • 16. Highlight: QoS Alternative (discarded) design with modifiable QoS (à la IDL PSM): DataWriterQos qos = ctx.createDataWriterQos();  Requires additional factory methods ReliabilityQosPolicy.Kind k = qos.getReliability().getKind();  Value of “k” is undefined myWriter.getQos(qos);  Unintuitive signature qos.getReliability().setKind(…);  Object “qos” can’t be safely stored, shared Copyright © 2010 RTI - All rights Reserved 16
  • 17. Revised Submission TODO New DDS-XTypes APIs  Built-in types: String, Bytes, KeyedString, KeyedBytes  Dynamic Language Binding: DynamicType, DynamicData  TypeObject Type Representation  New QoS policies Java Type Representation @DdsType interface Employee { @Key int getEmployeeIdNumber(); } Copyright © 2010 RTI - All rights Reserved 17
  • 18. Revised Submission TODO Copy specification into JavaDoc?  Friendly for IDE users  myWriter.setQos| Examples (non-normative)  Application code example  No-op reference implementation Further community review Copyright © 2010 RTI - All rights Reserved 18 void setQos(DataWriterQos q) Set the QoS of this DataWriter. The result of subsequent calls to getQos will be equal to the value set by this method.
  • 19. Summary DDS will have a first-class Java API.  That looks and behaves like a typical Java API.  That performs well.  Soon. Copyright © 2010 RTI - All rights Reserved 19
  • 20. Q & A Copyright © 2010 RTI - All rights Reserved 20

Editor's Notes

  1. Benefits of “close” instead of factory method: Familiar from java.io, javax.jms Can’t get it wrong by using wrong factory
  2. Important to keep everything as interface or stateless abstract class: Don’t constrain implementations Don’t risk bugs
  3. Context allows multiple DDS implementations (including multiple versions of the same impl.) to coexist. Also allows implementations to be transparently unloaded when no longer used.
  4. If you don’t care about the parameters, just use wildcard—less hassle than in C++. If you do care, you can bind them to preserve type safety.
  5. First, show how it works. Then, show why it works that way.