SlideShare una empresa de Scribd logo
1 de 20
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

Más contenido relacionado

La actualidad más candente

MongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with MorphiaMongoDB: Easy Java Persistence with Morphia
MongoDB: Easy Java Persistence with MorphiaScott 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 PairsSchubert Zhang
 
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 ProofAchim D. Brucker
 
The Format of new HFile 2
The Format of new HFile 2The Format of new HFile 2
The Format of new HFile 2Anty Rao
 
XML Technologies for RESTful Services Development
XML Technologies for RESTful Services DevelopmentXML Technologies for RESTful Services Development
XML Technologies for RESTful Services Developmentruyalarcon
 
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 sideMichael Caruso
 
DDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxDDS-PSM-Cxx and simd-cxx
DDS-PSM-Cxx and simd-cxxAngelo Corsaro
 
Difference between rdf, odata and gdata
Difference between rdf, odata and gdataDifference between rdf, odata and gdata
Difference between rdf, odata and gdataUmar 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 MartinHackito Ergo Sum
 
Hibernate for Beginners
Hibernate for BeginnersHibernate for Beginners
Hibernate for BeginnersRamesh Kumar
 
NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020NoSQL Endgame JCON Conference 2020
NoSQL Endgame JCON Conference 2020Thodoris Bais
 

La actualidad más candente (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
 

Destacado

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 worldAlastair Smith
 
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 DDSRick 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 DDSRick Warren
 
Vortex Tutorial -- Part I
Vortex Tutorial -- Part IVortex Tutorial -- Part I
Vortex Tutorial -- Part IAngelo Corsaro
 
Advanced OpenSplice Programming - Part I
Advanced OpenSplice Programming - Part IAdvanced OpenSplice Programming - Part I
Advanced OpenSplice Programming - Part IAngelo Corsaro
 
Advanced OpenSplice Programming - Part II
Advanced OpenSplice Programming - Part IIAdvanced OpenSplice Programming - Part II
Advanced OpenSplice Programming - Part IIAngelo 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 CarsLinkedIn
 

Destacado (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 a 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
 
REST made simple with Java
REST made simple with JavaREST made simple with Java
REST made simple with Javaelliando dias
 
DDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardDDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardAngelo Corsaro
 
Hibernate
Hibernate Hibernate
Hibernate Sunil OS
 
Muduo network library
Muduo network libraryMuduo network library
Muduo network libraryShuo Chen
 
IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013IPTC News in JSON Spring 2013
IPTC News in JSON Spring 2013Stuart 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'15Murat Yener
 
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 CafeADLINK Technology IoT
 
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
 
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 ModuleKatie 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 BuffersMatt 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
 
define_xml_tutorial .ppt
define_xml_tutorial .pptdefine_xml_tutorial .ppt
define_xml_tutorial .pptssuser660bb1
 
Configuration with Apache Tamaya
Configuration with Apache TamayaConfiguration with Apache Tamaya
Configuration with Apache TamayaAnatole Tresch
 
Accelerated data access
Accelerated data accessAccelerated data access
Accelerated data accessgordonyorke
 

Similar a 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 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
 
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é
 
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
 

Más de Rick Warren

Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaRick 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 ProductionRick Warren
 
Patterns of Data Distribution
Patterns of Data DistributionPatterns of Data Distribution
Patterns of Data DistributionRick Warren
 
Data-centric Invocable Services
Data-centric Invocable ServicesData-centric Invocable Services
Data-centric Invocable ServicesRick Warren
 
Engineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsEngineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsRick 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 DevicesRick Warren
 
DDS in a Nutshell
DDS in a NutshellDDS in a Nutshell
DDS in a NutshellRick 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 SubmissionRick Warren
 
C++ PSM for DDS: Revised Submission
C++ PSM for DDS: Revised SubmissionC++ PSM for DDS: Revised Submission
C++ PSM for DDS: Revised SubmissionRick Warren
 
Web-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised SubmissionWeb-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised SubmissionRick 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 1Rick 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 ModelRick 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 FinanceRick 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 ArchitectureRick 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 DDSRick 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 DDSRick 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
 

Más de 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)
 

Último

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 

Último (20)

Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

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

Notas del editor

  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.