SlideShare uma empresa Scribd logo
1 de 17
Java 5 PSM for DDS:
Revised Submission
MARS – Cambridge, MA – September 2010
Presenter: Rick Warren, RTI
Submitting POCs:
 Rick Warren, RTI:
rick.warren@rti.com
 Angelo Corsaro, PrismTech:
angelo.corsaro@prismtech.com
document number: mars/2010-09-05
Agenda
Specification Overview
 Mostly review from last time
Specification changes since Minneapolis
 Full DDS-XTypes support
 Java Type Representation
 Other minor changes
In depth: Java Type Representation
TODO for the next meeting
 Review: This will impact many of us; needs to be right
Copyright © 2010 RTI - All rights Reserved 2
Goals & Design Principles
Improve user experience
 standardNamingConvention
 Standard containers (e.g. java.util.List)
 Standard enumerations
 Error conditions reported with exceptions
 Serializable, Cloneable value types
 Simplified method overloads
Improve type safety
 Generics
Improve performance
 Loanable memory
 No critical-path memory allocation (unlike IDL PSM)
Improve portability
 Build apps against standard interfaces; decide at run time
which impl to use
 Host multiple implementations (or versions) within same JVM
 Dynamic loading and unloading
 Play nicely with containers, e.g. Java EE and OSGi
 Don’t require non-constant static state
Copyright © 2010 RTI - All rights Reserved 3
State of the Proposal
First revised submission
Process moving quickly and efficiently
 Submitters have joined
 All mandatory requirements satisfied
 User vetting process 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:
 Review within submission team and with our customers
 Review with your own stakeholders!
 Next submission will be ready for a vote
Copyright © 2010 RTI - All rights Reserved 4
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 5
Since Initial Submission: DDS-XTypes
Dynamic Language Binding
TypeObject for type propagation
Built-in data types:
 Types: String, KeyedString, Bytes, KeyedBytes
 Added overloads to Publisher, Subscriber to create
statically type-safe readers and writers of these types
New QoS policies
Standard annotations
Copyright © 2010 RTI - All rights Reserved 6
Since Initial Submission: Java Type Rep’n
Publish and subscribe to POJOs without
code generation
Based on Java reflection
More on this later
Copyright © 2010 RTI - All rights Reserved 7
Since Initial Submission: Misc. Details
Improved static type safety of topic creation
Improved static type safety of topic, reader,
and writer listeners
Improved portability of TypeSupport creation
Improved Context loading
Miscellaneous alignments with C++ PSM
“Hello World” code example
Automated generation of binary jar and
source zip files
Copyright © 2010 RTI - All rights Reserved 8
Java Type Representation: Intro
Goal: Write the following code:
public class MyPojo /*extends/implements…*/ {
private int foo;
private Bar[] baz;
public void doStuff() { … }
}
…
Topic<MyPojo> t = dp.createTopic(
"My Topic", MyPojo.class);
Copyright © 2010 RTI - All rights Reserved 9
Java Type Representation: Intro
Does not replace, modify existing
standard Language Bindings
Interoperable at wire level
 …with generated or dynamic types
 …in Java or any other language
Convenience feature for non-real-time
Java systems
 “Representation” is run-time, reflection-based:
no Java source code parsing or code generation
 Implication: Reflection slower than compiled
generated code
 Implication: If other languages are used, type
definitions must be “duplicated”
Copyright © 2010 RTI - All rights Reserved 10
Java Type Representation: Approach
Leverage the knowledge of Java developers
Leverage the code they already have
Observations:
 JRE already provides type definition constructs
 Primitive types, strings, lists (sequences), classes
(structures), enumerations, annotations
 Types to be sent over network already indicate that
 …by implementing java.io.Serializable
 …including which fields should not be sent
 …with the transient keyword
Copyright © 2010 RTI - All rights Reserved 11
Java Type Representation: Approach
What this Representation has to do:
1. Define mappings between JRE concepts and DDS
concepts
 int  Int32 (IDL long)
 double  Float64 (IDL double)
 java.util.List  Sequence
 Serializable class  Structure
2. Allow customizability to support non-Java DDS concepts
 e.g. unsigned primitives, narrow vs. wide strings, unions
 Mechanism: @SerializeAs annotation
Copyright © 2010 RTI - All rights Reserved 12
Java Type Representation: Example
Java
package com.acme;
class Foo
implements Serializable {
@Key int theInt;
transient float theFlt;
String theStr;
@SerializeAs(UINT_64)
BigInteger theUInt;
String[] theArr;
}
IDL
module com { module acme {
@Extensibility(MUTABLE)str
uct Foo {
@Key long theInt;
string theStr;
unsigned long theUInt;
sequence<string> theArr;
};
}}
Copyright © 2010 RTI - All rights Reserved 13
Still TO DO
We will ask for a vote at the December meeting
Review the PSM with your stakeholders
 API
 Implementation: Context.createInstance
(only non-trivial implementation in the PSM)
 Specification document
Review the code license, copyrights
 (Will want AB, SMC guidance too)
 OMG and submitters (RTI, PrismTech) have joint copyright
 OMG-standard Java source files have BSD-style license
 Does not constrain licenses or biz models of impl’s
 Vendors redistributing these files must:
 Document license terms
 Acknowledge copyright holders
Will be further alignment within submission team,
including consideration of C++ PSM
Copyright © 2010 RTI - All rights Reserved 14
Still TO DO
Copy specification into JavaDoc?
 Friendly for IDE users
 myWriter.setQos|
More examples? (non-normative)
 e.g. Application code examples
 e.g. No-op reference implementation
You tell us!
Copyright © 2010 RTI - All rights Reserved 15
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 16
Q & A
Copyright © 2010 RTI - All rights Reserved 17

Mais conteúdo relacionado

Destaque

Twittervention study
Twittervention studyTwittervention study
Twittervention study
xobo
 
Unis n soutěž toyota aygo
Unis n soutěž toyota aygoUnis n soutěž toyota aygo
Unis n soutěž toyota aygo
UnisN
 
Revolution storybook
Revolution storybookRevolution storybook
Revolution storybook
spazz567
 
ProductCamp RTP 2010 - Depends & should work - Brett Cooper
ProductCamp RTP 2010 - Depends & should work - Brett CooperProductCamp RTP 2010 - Depends & should work - Brett Cooper
ProductCamp RTP 2010 - Depends & should work - Brett Cooper
Arik Abel
 

Destaque (20)

Twittervention study
Twittervention studyTwittervention study
Twittervention study
 
Unis n soutěž toyota aygo
Unis n soutěž toyota aygoUnis n soutěž toyota aygo
Unis n soutěž toyota aygo
 
La loteria2
La loteria2La loteria2
La loteria2
 
Revolution storybook
Revolution storybookRevolution storybook
Revolution storybook
 
ProductCamp RTP 2010 - Depends & should work - Brett Cooper
ProductCamp RTP 2010 - Depends & should work - Brett CooperProductCamp RTP 2010 - Depends & should work - Brett Cooper
ProductCamp RTP 2010 - Depends & should work - Brett Cooper
 
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)
 
Web-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised SubmissionWeb-Enabled DDS: Revised Submission
Web-Enabled DDS: Revised Submission
 
From the Tactical Edge to the Enterprise: Integrating DDS and JMS
From the Tactical Edge to the Enterprise: Integrating DDS and JMSFrom the Tactical Edge to the Enterprise: Integrating DDS and JMS
From the Tactical Edge to the Enterprise: Integrating DDS and JMS
 
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)
 
DDS in a Nutshell
DDS in a NutshellDDS in a Nutshell
DDS in a Nutshell
 
Engineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsEngineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable Systems
 
Introduction to Robotic Technology Components (RTC), Robotics DTF
Introduction to Robotic Technology Components (RTC), Robotics DTFIntroduction to Robotic Technology Components (RTC), Robotics DTF
Introduction to Robotic Technology Components (RTC), Robotics DTF
 
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
 
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
 
Data-centric Invocable Services
Data-centric Invocable ServicesData-centric Invocable Services
Data-centric Invocable Services
 
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
 
Robotic Technology Component (RTC) Specification
Robotic Technology Component (RTC) SpecificationRobotic Technology Component (RTC) Specification
Robotic Technology Component (RTC) Specification
 
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
 
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
 
Introduction to Robotic Technology Components (RTC), MARS PTF
Introduction to Robotic Technology Components (RTC), MARS PTFIntroduction to Robotic Technology Components (RTC), MARS PTF
Introduction to Robotic Technology Components (RTC), MARS PTF
 

Semelhante a Java 5 PSM for DDS: Revised Submission (out of date)

Real Time Java DDS
Real Time Java DDSReal Time Java DDS
Real Time Java DDS
kerush
 
16 implementation techniques
16 implementation techniques16 implementation techniques
16 implementation techniques
Majong DevJfu
 

Semelhante a Java 5 PSM for DDS: Revised Submission (out of date) (20)

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)
 
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
 
Java 5 PSM for DDS: Initial Submission (out of date)
Java 5 PSM for DDS: Initial Submission (out of date)Java 5 PSM for DDS: Initial Submission (out of date)
Java 5 PSM for DDS: Initial Submission (out of date)
 
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
 
DDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardDDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing Standard
 
Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
ODF Mashups
ODF MashupsODF Mashups
ODF Mashups
 
Real Time Java DDS
Real Time Java DDSReal Time Java DDS
Real Time Java DDS
 
Code Documentation. That ugly thing...
Code Documentation. That ugly thing...Code Documentation. That ugly thing...
Code Documentation. That ugly thing...
 
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMot
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMotDelphi ORM SOA MVC SQL NoSQL JSON REST mORMot
Delphi ORM SOA MVC SQL NoSQL JSON REST mORMot
 
16 implementation techniques
16 implementation techniques16 implementation techniques
16 implementation techniques
 
Distributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applicationsDistributed Systems: How to connect your real-time applications
Distributed Systems: How to connect your real-time applications
 
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é
 
KIRANKUMAR_MV
KIRANKUMAR_MVKIRANKUMAR_MV
KIRANKUMAR_MV
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
 
Rest overview briefing
Rest  overview briefingRest  overview briefing
Rest overview briefing
 

Mais de Rick Warren

Mais de Rick Warren (8)

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
 
Patterns of Data Distribution
Patterns of Data DistributionPatterns of Data Distribution
Patterns of Data Distribution
 
C++ PSM for DDS: Revised Submission
C++ PSM for DDS: Revised SubmissionC++ PSM for DDS: Revised Submission
C++ PSM for 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
 
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
 
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
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDS
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

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?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

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

  • 1. Java 5 PSM for DDS: Revised Submission MARS – Cambridge, MA – September 2010 Presenter: Rick Warren, RTI Submitting POCs:  Rick Warren, RTI: rick.warren@rti.com  Angelo Corsaro, PrismTech: angelo.corsaro@prismtech.com document number: mars/2010-09-05
  • 2. Agenda Specification Overview  Mostly review from last time Specification changes since Minneapolis  Full DDS-XTypes support  Java Type Representation  Other minor changes In depth: Java Type Representation TODO for the next meeting  Review: This will impact many of us; needs to be right Copyright © 2010 RTI - All rights Reserved 2
  • 3. Goals & Design Principles Improve user experience  standardNamingConvention  Standard containers (e.g. java.util.List)  Standard enumerations  Error conditions reported with exceptions  Serializable, Cloneable value types  Simplified method overloads Improve type safety  Generics Improve performance  Loanable memory  No critical-path memory allocation (unlike IDL PSM) Improve portability  Build apps against standard interfaces; decide at run time which impl to use  Host multiple implementations (or versions) within same JVM  Dynamic loading and unloading  Play nicely with containers, e.g. Java EE and OSGi  Don’t require non-constant static state Copyright © 2010 RTI - All rights Reserved 3
  • 4. State of the Proposal First revised submission Process moving quickly and efficiently  Submitters have joined  All mandatory requirements satisfied  User vetting process 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:  Review within submission team and with our customers  Review with your own stakeholders!  Next submission will be ready for a vote Copyright © 2010 RTI - All rights Reserved 4
  • 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 5
  • 6. Since Initial Submission: DDS-XTypes Dynamic Language Binding TypeObject for type propagation Built-in data types:  Types: String, KeyedString, Bytes, KeyedBytes  Added overloads to Publisher, Subscriber to create statically type-safe readers and writers of these types New QoS policies Standard annotations Copyright © 2010 RTI - All rights Reserved 6
  • 7. Since Initial Submission: Java Type Rep’n Publish and subscribe to POJOs without code generation Based on Java reflection More on this later Copyright © 2010 RTI - All rights Reserved 7
  • 8. Since Initial Submission: Misc. Details Improved static type safety of topic creation Improved static type safety of topic, reader, and writer listeners Improved portability of TypeSupport creation Improved Context loading Miscellaneous alignments with C++ PSM “Hello World” code example Automated generation of binary jar and source zip files Copyright © 2010 RTI - All rights Reserved 8
  • 9. Java Type Representation: Intro Goal: Write the following code: public class MyPojo /*extends/implements…*/ { private int foo; private Bar[] baz; public void doStuff() { … } } … Topic<MyPojo> t = dp.createTopic( "My Topic", MyPojo.class); Copyright © 2010 RTI - All rights Reserved 9
  • 10. Java Type Representation: Intro Does not replace, modify existing standard Language Bindings Interoperable at wire level  …with generated or dynamic types  …in Java or any other language Convenience feature for non-real-time Java systems  “Representation” is run-time, reflection-based: no Java source code parsing or code generation  Implication: Reflection slower than compiled generated code  Implication: If other languages are used, type definitions must be “duplicated” Copyright © 2010 RTI - All rights Reserved 10
  • 11. Java Type Representation: Approach Leverage the knowledge of Java developers Leverage the code they already have Observations:  JRE already provides type definition constructs  Primitive types, strings, lists (sequences), classes (structures), enumerations, annotations  Types to be sent over network already indicate that  …by implementing java.io.Serializable  …including which fields should not be sent  …with the transient keyword Copyright © 2010 RTI - All rights Reserved 11
  • 12. Java Type Representation: Approach What this Representation has to do: 1. Define mappings between JRE concepts and DDS concepts  int  Int32 (IDL long)  double  Float64 (IDL double)  java.util.List  Sequence  Serializable class  Structure 2. Allow customizability to support non-Java DDS concepts  e.g. unsigned primitives, narrow vs. wide strings, unions  Mechanism: @SerializeAs annotation Copyright © 2010 RTI - All rights Reserved 12
  • 13. Java Type Representation: Example Java package com.acme; class Foo implements Serializable { @Key int theInt; transient float theFlt; String theStr; @SerializeAs(UINT_64) BigInteger theUInt; String[] theArr; } IDL module com { module acme { @Extensibility(MUTABLE)str uct Foo { @Key long theInt; string theStr; unsigned long theUInt; sequence<string> theArr; }; }} Copyright © 2010 RTI - All rights Reserved 13
  • 14. Still TO DO We will ask for a vote at the December meeting Review the PSM with your stakeholders  API  Implementation: Context.createInstance (only non-trivial implementation in the PSM)  Specification document Review the code license, copyrights  (Will want AB, SMC guidance too)  OMG and submitters (RTI, PrismTech) have joint copyright  OMG-standard Java source files have BSD-style license  Does not constrain licenses or biz models of impl’s  Vendors redistributing these files must:  Document license terms  Acknowledge copyright holders Will be further alignment within submission team, including consideration of C++ PSM Copyright © 2010 RTI - All rights Reserved 14
  • 15. Still TO DO Copy specification into JavaDoc?  Friendly for IDE users  myWriter.setQos| More examples? (non-normative)  e.g. Application code examples  e.g. No-op reference implementation You tell us! Copyright © 2010 RTI - All rights Reserved 15 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.
  • 16. 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 16
  • 17. Q & A Copyright © 2010 RTI - All rights Reserved 17

Notas do 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. Write a normal-looking Java class with no DDS dependencies, then use it to pub and sub
  3. Decision matrix: * Need maximum performance? Want to share type definitions across languages? Generate code. * Want maximum convenience? Working mostly in Java? Use this new Representation.