SlideShare a Scribd company logo
1 of 25
The Real-Time
Middleware Experts
Mapping the RESTful Programming Model
to the DDS Data-Centric Model
Rick Warren, Principal Engineer rick.warren@rti.com
Conclusion
 REST is architecture of the web, works great for the web
 RESTful view of DDS object model is very powerful
– Network effect makes hyperlink-able DDS data more valuable
– Single data model can support clients with variety of needs
– RESTful DDS compatible with strict per-user access control
 (Many ways to create such a view; we’ll consider a few)
 Sorry, no demo in this talk—see
http://www.youtube.com/user/RealTimeInnovations
© 2009 Real-Time Innovations, Inc. 2
What is REST?
 REpresentational State Transfer
– Coined by Roy Fielding, co-inventor of HTTP, URIs, Apache
web server, fire, and the wheel
 A system architecture
– Designed for large distributed systems like the web
– Emphasizes statelessness, interface simplicity and uniformity
 Misuse: a technique of sending messages with HTTP
– Frequently contrasted with SOAP
 I will both use and misuse this term in this talk.
© 2009 Real-Time Innovations, Inc. 3
What is REST/HTTP?
© 2009 Real-Time Innovations, Inc. 4
Server
URI  Resource
URI  Resource
URI  Resource
…Response
Message
Resource
Representation
Client
Request Message
URI
Action
Actions as HTTP methods:
 POST (“Create”)
 GET (“Read”)
 PUT (“Update”)
 ELETE
What is REST/HTTP? Example (Web Browser)
© 2009 Real-Time Innovations, Inc. 5
Server
URI  Resource
URI  Resource
URI  Resource
…Response
Message
<html>
…
</html>
Client
Request Message
www.google.com/
GET
What is REST/HTTP? Example (DDS)
© 2009 Real-Time Innovations, Inc. 6
Server
URI  Resource
URI  Resource
URI  Resource
…Response
Message
<MyDataType>
…
</MyDataType>
Client
Request Message
my/dds/topic
GET
Specified by
DDS-XTypes
Why Is DDS-REST Integration Promising?
 Vision of the web:
– All information everywhere could be accessible by anyone
– …if only they knew where it is and how to get it.
– BTW: “where it is” = URI; “how get it” = HTTP
 Why should information inside DDS be different?
– Approach #1: Convince everyone to replace HTTP with DDS
– Approach #2: Allow poor misguided HTTP users to get DDS
data anyway
– Web-Enabled DDS standard initiative at OMG will help us
capitalize on this vision
 “Give me a URI and a protocol to dereference it and I
shall download the world.”
– Archimedes, 250 B.C.
© 2009 Real-Time Innovations, Inc. 7
DDS-REST Integration Teaser
 myReader.read()
 myWriter.write()
 Any web page can be
a DDS application
 GET
http://…/myTopic
 POST
http://…/myTopic
© 2009 Real-Time Innovations, Inc. 8
Implementing Web Services: SOAP vs. REST
SOAP/WSDL
 Technology
 Define domain-specific
nouns (services) and verbs
(operations)
– Meaning is explicit
– Can lead to wheel
reinvention
 Only service itself is
linkable
 Standard message
envelope
– Layer metadata onto any
service
• e.g. for governance
– Complicates processing
REST
 Architecture/design pattern
 Universal syntax for nouns
(URIs) and verbs (e.g.
HTTP methods)
– Polymorphism allows broad
reuse
– Ad hoc def’ns vary widely
 Whole resource tree is
linkable: network effect
 Each service defines own
formats, soup to nuts
– Get exactly what you need
in user-friendly format (e.g.
JSON)
– Difficult to apply metadata
across services
© 2009 Real-Time Innovations, Inc. 9
Procedural REST: a “Hybrid” Approach
 Some REST services embed custom verbs in URI
 Example: Amazon Simple Queue Service
http://queue.amazonaws.com/namespace/myQu
eueName
?Action=ReceiveMessage&...
 Pro: Obvious mapping to/from SOAP for easy skills xfer
– Base URI is the service endpoint
– Operations and args are parameters
 Con: Encourages thinking “invoke this operation”
instead of “access this resource”
 Why is this bad? Encourages GET-only interfaces
– Style: like a language with only one word; don’t discard rest
of HTTP
– Substance: GET must be safe, idempotent
– Best practice: resources nouns; verbs come from HTTP—
don’t reinvent things HTTP already provides
© 2009 Real-Time Innovations, Inc. 10
RESTful DDS: It’s All About the Resources
 Resources (w/ URIs)
– Data
• Application data
• Discovery data
• Natural hierarchy is
<domain>/<topic>
[/<instance>]
– Metadata
• Entities (participants,
readers, writers,
topics…)
• Data types
• QoS
• Status
 Non-resources
– Conditions and
WaitSets:
concurrency is
server’s business
– Listeners: status is a
resource; access like
any other
 Other concerns
– Access control
– Session management
© 2009 Real-Time Innovations, Inc. 11
RESTful DDS Entities: Open Questions
 Q: DDS object model or simplified model?
If DDS, are all entities useful to web clients?
 Q: Publish/subscribe to single topic in multiple ways?
(e.g. multiple readers w/ different QoS)
 Q: Require explicit client entity management?
(e.g. POST to /datareader before GET from /topic)
 Trade-off:
– Simplicity for the user, flexibility for the implementation
vs.
Power for the user, constrained implementation
– Can we have it both ways?
© 2009 Real-Time Innovations, Inc. 12
RESTful DDS Resource Proposal: Data View
 /dds/<domain ID>
– /topic/<topic name>
• /data
– ?sample_state=<value>&filter_expression=<expr>&…
– /<preconfigured instance name>
• /qos
• /status
– /inconsistent_topic
• /type
• /datareader
– /qos
– /status
 /requested_deadline_missed
 /requested_incompatible_qos
 /…
• /datawriter
– /…
© 2009 Real-Time Innovations, Inc. 13
RESTful DDS Resource Proposal: Entity View
 /dds/<domain ID>
– /participant/<entity name>
• /qos
• /topic/<entity name>
– /…
• /subscriber/<entity name>
– /qos
– /datareader/<entity name>
 /data
 /qos
 /status
• /publisher/<entity name>
– /…
© 2009 Real-Time Innovations, Inc. 14
RESTful DDS Resource Proposal: Examples
Data View
 POST
http://…/dds/0/topic
/MyTopic/data
<MyType>
Hello
</MyType>
– Response: 200 OK
 GET
http://…/dds/0/topic
/MyTopic/data
– Response:
<MyType>
Hello
</MyType>
Entity View
 PUT
http://…/dds/0/participant
/MyParticipant …
 PUT
http://…/dds/0/participant
/MyParticipant/topic/MyTop
ic …
 PUT
http://…/dds/0/participant
/MyParticipant/publisher/M
yPub …
 PUT
http://…/dds/0/participant
/MyParticipant/publisher/M
yPub/datawriter/MyWriter
<datawriter>
<topic>MyTopic</topic>
<qos>…</qos>
…
</datawriter>
 …
© 2009 Real-Time Innovations, Inc. 15
RESTful DDS Resource Proposal: Examples
 Create entire tree of entities:
– Request:
PUT http://www.example.com/dds/0/participant/
MyNewParticipant
<participant name="MyNewParticipant">
<qos>…</qos>
<subscribers>
<subscriber name="MyNewSubscriber">
<datareader>…</datareader>
</subscriber>
</subscribers>
…
</participant>
– Response: 200 OK
© 2009 Real-Time Innovations, Inc. 16
Access Control
 Requirement: Control access by each principal
– Publish, subscribe on certain topics
• …with certain contents
• …with certain QoS
 Implication: Principals’ pub/sub entities must
be separate
– To avoid data “leakage”
– To avoid contention/concurrency coupling
– To manage entity lifecycles: DDS is not stateless
© 2009 Real-Time Innovations, Inc. 17
Access Control  Session Management
 Approach: Associate request w/ principal’s session
– Client requests new session, providing identity and credential
• Service responds with access token on success (“session ID”)
– Client includes session ID in subsequent requests
• Service authorizes request; proceeds or fails
– Client requests session end, or service cancels session
1. Q#1: How to get session identifier?
2. Q#2: How to send session ID back again? Options:
a) Query parameter
b) Resource URI
c) Request body
d) Cookie
© 2009 Real-Time Innovations, Inc. 18
Getting a Session ID (“Logging In”)
 Possible approaches:
– /dds/log_in
• No: Doesn’t imply how to use it (GET? POST?)
• Remember: Resources are nouns. Verbs are CRUD.
– /dds/session_id (GET)
• OK, so now it’s a noun.
• We want to “get” a new session ID, right?
• …But still No: need to provide credential, but GET can’t have body
• …and logging in is not “safe” operation, nor idempotent
– /dds/session (POST)
• Now we’re talking: Want to create new session in a collection—
that’s what POST does.
• Request body contains credential(s)
• Implies administrative GET /dds/session: list all current sessions
© 2009 Real-Time Innovations, Inc. 19
Handing Back Session ID: #1, Query Param
 Example:
GET /dds/0/topic/MyTopic/data?session=123
 Good
– Simple, explicit
– Works when GETting resources (very common)
 Bad
– May not work well when POSTing resource
(e.g. HTML forms don’t allow POST with query)
– URIs not shareable
• Bob: “Get my data from here: http://bob.com/dds/…?session=Bob.”
• Fred: “Ooh, look at this…” ::takes actions with Bob’s credentials::
© 2009 Real-Time Innovations, Inc. 20
Handing Back Session ID: #2, Resource URI
 Example:
GET /dds/MySession/0/topic/MyTopic/data
 Good
– Simple, explicit
– Works equally well with all HTTP methods
 Bad
– URIs still not shareable
• Even harder to “cleanse” URI than with query parameter
© 2009 Real-Time Innovations, Inc. 21
Handing Back Session ID: #3, Request Body
 Example:
POST /dds/0/topic/MyTopic/data
(body: session=123)
 Good
– URLs shareable without editing
– Works well with POST, PUT, DELETE
 Bad
– Doesn’t work when GETting resources (very common)
© 2009 Real-Time Innovations, Inc. 22
Handing Back Session ID: #4, Cookie
 Example:
GET /dds/0/topic/MyTopic/data
Cookie: session=123
 Good
– URLs shareable without editing
– Works equally well with all HTTP methods
– Time-out built in
– Proven approach
 Bad
– Cookie stored with client’s user agent (e.g. web browser)
• Harder to share across agents
– …or maybe Good: forces re-authentication
• Shared across users that share agent
– Separate user accounts of multi-user platforms work around this
 This is the recommendation
© 2009 Real-Time Innovations, Inc. 23
Conclusion
 REST works best when taking full advantage of HTTP
– Think in resources
– Use GET, POST, PUT, DELETE as intended
– Respect safety, idempotency expectations
 DDS and REST are a powerful combination
– Network effect makes hyperlink-able DDS data more valuable
• Single DDS data set available via DDS network—
or from any browser
– DDS resource model supports clients with various needs
• Simplified basic data access
• Complete control over DDS entities and their configurations
– RESTful DDS can provide strict per-user access control
© 2009 Real-Time Innovations, Inc. 24
Thank You
© 2009 Real-Time Innovations, Inc. 25

More Related Content

What's hot

ROS 2 deployment in K8s: DDS Router as WAN comms enabler
ROS 2 deployment in K8s: DDS Router as WAN comms enablerROS 2 deployment in K8s: DDS Router as WAN comms enabler
ROS 2 deployment in K8s: DDS Router as WAN comms enablereProsima
 
DDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardDDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardAngelo Corsaro
 
Sysplex in a Nutshell
Sysplex in a NutshellSysplex in a Nutshell
Sysplex in a NutshellzOSCommserver
 
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo Hirose
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo HirosePGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo Hirose
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo HiroseEqunix Business Solutions
 
Multi-Tenancy and Virtualization in Cloud Computing
Multi-Tenancy and Virtualization in Cloud ComputingMulti-Tenancy and Virtualization in Cloud Computing
Multi-Tenancy and Virtualization in Cloud ComputingAlexandru Iosup
 
Introduction to Node-RED
Introduction to Node-REDIntroduction to Node-RED
Introduction to Node-REDnodered_ug_jp
 
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)Netflix: From Zero to Production-Ready in Minutes (QCon 2017)
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)Tim Bozarth
 
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0Cory Forsyth
 
Mavenir network function virtualisation
Mavenir network function virtualisationMavenir network function virtualisation
Mavenir network function virtualisationMyles Freedman
 
Cloudera Customer Success Story
Cloudera Customer Success StoryCloudera Customer Success Story
Cloudera Customer Success StoryXpand IT
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeReal-Time Innovations (RTI)
 
DDS in Action -- Part I
DDS in Action -- Part IDDS in Action -- Part I
DDS in Action -- Part IAngelo Corsaro
 
Cisco Unified Wireless Network and Converged access – Design session
Cisco Unified Wireless Network and Converged access – Design sessionCisco Unified Wireless Network and Converged access – Design session
Cisco Unified Wireless Network and Converged access – Design sessionCisco Russia
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDSRick Warren
 
Hadoop at aadhaar
Hadoop at aadhaarHadoop at aadhaar
Hadoop at aadhaarRegunath B
 

What's hot (20)

ROS 2 deployment in K8s: DDS Router as WAN comms enabler
ROS 2 deployment in K8s: DDS Router as WAN comms enablerROS 2 deployment in K8s: DDS Router as WAN comms enabler
ROS 2 deployment in K8s: DDS Router as WAN comms enabler
 
DDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing StandardDDS: The IoT Data Sharing Standard
DDS: The IoT Data Sharing Standard
 
Sysplex in a Nutshell
Sysplex in a NutshellSysplex in a Nutshell
Sysplex in a Nutshell
 
Securing your data with Azure SQL DB
Securing your data with Azure SQL DBSecuring your data with Azure SQL DB
Securing your data with Azure SQL DB
 
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo Hirose
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo HirosePGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo Hirose
PGConf.ASIA 2019 - PGSpider High Performance Cluster Engine - Shigeo Hirose
 
Multi-Tenancy and Virtualization in Cloud Computing
Multi-Tenancy and Virtualization in Cloud ComputingMulti-Tenancy and Virtualization in Cloud Computing
Multi-Tenancy and Virtualization in Cloud Computing
 
Why Scala?
Why Scala?Why Scala?
Why Scala?
 
Introduction to Node-RED
Introduction to Node-REDIntroduction to Node-RED
Introduction to Node-RED
 
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)Netflix: From Zero to Production-Ready in Minutes (QCon 2017)
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)
 
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
 
UML Profile for DDS
UML Profile for DDSUML Profile for DDS
UML Profile for DDS
 
Mavenir network function virtualisation
Mavenir network function virtualisationMavenir network function virtualisation
Mavenir network function virtualisation
 
Cloudera Customer Success Story
Cloudera Customer Success StoryCloudera Customer Success Story
Cloudera Customer Success Story
 
Introduction to RTI DDS
Introduction to RTI DDSIntroduction to RTI DDS
Introduction to RTI DDS
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/Subscribe
 
DDS In Action Part II
DDS In Action Part IIDDS In Action Part II
DDS In Action Part II
 
DDS in Action -- Part I
DDS in Action -- Part IDDS in Action -- Part I
DDS in Action -- Part I
 
Cisco Unified Wireless Network and Converged access – Design session
Cisco Unified Wireless Network and Converged access – Design sessionCisco Unified Wireless Network and Converged access – Design session
Cisco Unified Wireless Network and Converged access – Design session
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDS
 
Hadoop at aadhaar
Hadoop at aadhaarHadoop at aadhaar
Hadoop at aadhaar
 

Similar to Mapping the RESTful Programming Model to the DDS Data-Centric Model

Restful web-services
Restful web-servicesRestful web-services
Restful web-servicesrporwal
 
Web Enabled DDS - London Connext DDS Conference
Web Enabled DDS - London Connext DDS ConferenceWeb Enabled DDS - London Connext DDS Conference
Web Enabled DDS - London Connext DDS ConferenceGerardo Pardo-Castellote
 
DDS tutorial with connector
DDS tutorial with connectorDDS tutorial with connector
DDS tutorial with connectorJavier Povedano
 
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...StreamNative
 
Introduction to Web Programming - first course
Introduction to Web Programming - first courseIntroduction to Web Programming - first course
Introduction to Web Programming - first courseVlad Posea
 
Restful webservice
Restful webserviceRestful webservice
Restful webserviceDong Ngoc
 
JavaOne2013 Leveraging Linked Data and OSLC
JavaOne2013 Leveraging Linked Data and OSLCJavaOne2013 Leveraging Linked Data and OSLC
JavaOne2013 Leveraging Linked Data and OSLCSteve Speicher
 
REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulnessDavid Waite
 
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...Dave Delay
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)webhostingguy
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)webhostingguy
 
Mtn view sql server nov 2014
Mtn view sql server nov 2014Mtn view sql server nov 2014
Mtn view sql server nov 2014EspressoLogic
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocratlinoj
 
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
 
HTTP/2 and a Faster Web
HTTP/2 and a Faster WebHTTP/2 and a Faster Web
HTTP/2 and a Faster WebC4Media
 

Similar to Mapping the RESTful Programming Model to the DDS Data-Centric Model (20)

Restful web-services
Restful web-servicesRestful web-services
Restful web-services
 
Web Enabled DDS - London Connext DDS Conference
Web Enabled DDS - London Connext DDS ConferenceWeb Enabled DDS - London Connext DDS Conference
Web Enabled DDS - London Connext DDS Conference
 
DDS tutorial with connector
DDS tutorial with connectorDDS tutorial with connector
DDS tutorial with connector
 
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
 
Modified REST Presentation
Modified REST PresentationModified REST Presentation
Modified REST Presentation
 
Introduction to Web Programming - first course
Introduction to Web Programming - first courseIntroduction to Web Programming - first course
Introduction to Web Programming - first course
 
MediaMosa and webservices
MediaMosa and webservicesMediaMosa and webservices
MediaMosa and webservices
 
DDS Web Enabled
DDS Web EnabledDDS Web Enabled
DDS Web Enabled
 
Restful webservice
Restful webserviceRestful webservice
Restful webservice
 
JavaOne2013 Leveraging Linked Data and OSLC
JavaOne2013 Leveraging Linked Data and OSLCJavaOne2013 Leveraging Linked Data and OSLC
JavaOne2013 Leveraging Linked Data and OSLC
 
REST and REST-fulness
REST and REST-fulnessREST and REST-fulness
REST and REST-fulness
 
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)
 
Presentation (PowerPoint File)
Presentation (PowerPoint File)Presentation (PowerPoint File)
Presentation (PowerPoint File)
 
Mtn view sql server nov 2014
Mtn view sql server nov 2014Mtn view sql server nov 2014
Mtn view sql server nov 2014
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
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é
 
HTTP/2 and a Faster Web
HTTP/2 and a Faster WebHTTP/2 and a Faster Web
HTTP/2 and a Faster Web
 

More from 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
 
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
 
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
 
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)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 1Rick 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
 
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
 
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
 
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 (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
 

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
 
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)
 
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
 
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, 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
 
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
 
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)
 
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 (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)
 

Recently uploaded

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 

Recently uploaded (20)

Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 

Mapping the RESTful Programming Model to the DDS Data-Centric Model

  • 1. The Real-Time Middleware Experts Mapping the RESTful Programming Model to the DDS Data-Centric Model Rick Warren, Principal Engineer rick.warren@rti.com
  • 2. Conclusion  REST is architecture of the web, works great for the web  RESTful view of DDS object model is very powerful – Network effect makes hyperlink-able DDS data more valuable – Single data model can support clients with variety of needs – RESTful DDS compatible with strict per-user access control  (Many ways to create such a view; we’ll consider a few)  Sorry, no demo in this talk—see http://www.youtube.com/user/RealTimeInnovations © 2009 Real-Time Innovations, Inc. 2
  • 3. What is REST?  REpresentational State Transfer – Coined by Roy Fielding, co-inventor of HTTP, URIs, Apache web server, fire, and the wheel  A system architecture – Designed for large distributed systems like the web – Emphasizes statelessness, interface simplicity and uniformity  Misuse: a technique of sending messages with HTTP – Frequently contrasted with SOAP  I will both use and misuse this term in this talk. © 2009 Real-Time Innovations, Inc. 3
  • 4. What is REST/HTTP? © 2009 Real-Time Innovations, Inc. 4 Server URI  Resource URI  Resource URI  Resource …Response Message Resource Representation Client Request Message URI Action Actions as HTTP methods:  POST (“Create”)  GET (“Read”)  PUT (“Update”)  ELETE
  • 5. What is REST/HTTP? Example (Web Browser) © 2009 Real-Time Innovations, Inc. 5 Server URI  Resource URI  Resource URI  Resource …Response Message <html> … </html> Client Request Message www.google.com/ GET
  • 6. What is REST/HTTP? Example (DDS) © 2009 Real-Time Innovations, Inc. 6 Server URI  Resource URI  Resource URI  Resource …Response Message <MyDataType> … </MyDataType> Client Request Message my/dds/topic GET Specified by DDS-XTypes
  • 7. Why Is DDS-REST Integration Promising?  Vision of the web: – All information everywhere could be accessible by anyone – …if only they knew where it is and how to get it. – BTW: “where it is” = URI; “how get it” = HTTP  Why should information inside DDS be different? – Approach #1: Convince everyone to replace HTTP with DDS – Approach #2: Allow poor misguided HTTP users to get DDS data anyway – Web-Enabled DDS standard initiative at OMG will help us capitalize on this vision  “Give me a URI and a protocol to dereference it and I shall download the world.” – Archimedes, 250 B.C. © 2009 Real-Time Innovations, Inc. 7
  • 8. DDS-REST Integration Teaser  myReader.read()  myWriter.write()  Any web page can be a DDS application  GET http://…/myTopic  POST http://…/myTopic © 2009 Real-Time Innovations, Inc. 8
  • 9. Implementing Web Services: SOAP vs. REST SOAP/WSDL  Technology  Define domain-specific nouns (services) and verbs (operations) – Meaning is explicit – Can lead to wheel reinvention  Only service itself is linkable  Standard message envelope – Layer metadata onto any service • e.g. for governance – Complicates processing REST  Architecture/design pattern  Universal syntax for nouns (URIs) and verbs (e.g. HTTP methods) – Polymorphism allows broad reuse – Ad hoc def’ns vary widely  Whole resource tree is linkable: network effect  Each service defines own formats, soup to nuts – Get exactly what you need in user-friendly format (e.g. JSON) – Difficult to apply metadata across services © 2009 Real-Time Innovations, Inc. 9
  • 10. Procedural REST: a “Hybrid” Approach  Some REST services embed custom verbs in URI  Example: Amazon Simple Queue Service http://queue.amazonaws.com/namespace/myQu eueName ?Action=ReceiveMessage&...  Pro: Obvious mapping to/from SOAP for easy skills xfer – Base URI is the service endpoint – Operations and args are parameters  Con: Encourages thinking “invoke this operation” instead of “access this resource”  Why is this bad? Encourages GET-only interfaces – Style: like a language with only one word; don’t discard rest of HTTP – Substance: GET must be safe, idempotent – Best practice: resources nouns; verbs come from HTTP— don’t reinvent things HTTP already provides © 2009 Real-Time Innovations, Inc. 10
  • 11. RESTful DDS: It’s All About the Resources  Resources (w/ URIs) – Data • Application data • Discovery data • Natural hierarchy is <domain>/<topic> [/<instance>] – Metadata • Entities (participants, readers, writers, topics…) • Data types • QoS • Status  Non-resources – Conditions and WaitSets: concurrency is server’s business – Listeners: status is a resource; access like any other  Other concerns – Access control – Session management © 2009 Real-Time Innovations, Inc. 11
  • 12. RESTful DDS Entities: Open Questions  Q: DDS object model or simplified model? If DDS, are all entities useful to web clients?  Q: Publish/subscribe to single topic in multiple ways? (e.g. multiple readers w/ different QoS)  Q: Require explicit client entity management? (e.g. POST to /datareader before GET from /topic)  Trade-off: – Simplicity for the user, flexibility for the implementation vs. Power for the user, constrained implementation – Can we have it both ways? © 2009 Real-Time Innovations, Inc. 12
  • 13. RESTful DDS Resource Proposal: Data View  /dds/<domain ID> – /topic/<topic name> • /data – ?sample_state=<value>&filter_expression=<expr>&… – /<preconfigured instance name> • /qos • /status – /inconsistent_topic • /type • /datareader – /qos – /status  /requested_deadline_missed  /requested_incompatible_qos  /… • /datawriter – /… © 2009 Real-Time Innovations, Inc. 13
  • 14. RESTful DDS Resource Proposal: Entity View  /dds/<domain ID> – /participant/<entity name> • /qos • /topic/<entity name> – /… • /subscriber/<entity name> – /qos – /datareader/<entity name>  /data  /qos  /status • /publisher/<entity name> – /… © 2009 Real-Time Innovations, Inc. 14
  • 15. RESTful DDS Resource Proposal: Examples Data View  POST http://…/dds/0/topic /MyTopic/data <MyType> Hello </MyType> – Response: 200 OK  GET http://…/dds/0/topic /MyTopic/data – Response: <MyType> Hello </MyType> Entity View  PUT http://…/dds/0/participant /MyParticipant …  PUT http://…/dds/0/participant /MyParticipant/topic/MyTop ic …  PUT http://…/dds/0/participant /MyParticipant/publisher/M yPub …  PUT http://…/dds/0/participant /MyParticipant/publisher/M yPub/datawriter/MyWriter <datawriter> <topic>MyTopic</topic> <qos>…</qos> … </datawriter>  … © 2009 Real-Time Innovations, Inc. 15
  • 16. RESTful DDS Resource Proposal: Examples  Create entire tree of entities: – Request: PUT http://www.example.com/dds/0/participant/ MyNewParticipant <participant name="MyNewParticipant"> <qos>…</qos> <subscribers> <subscriber name="MyNewSubscriber"> <datareader>…</datareader> </subscriber> </subscribers> … </participant> – Response: 200 OK © 2009 Real-Time Innovations, Inc. 16
  • 17. Access Control  Requirement: Control access by each principal – Publish, subscribe on certain topics • …with certain contents • …with certain QoS  Implication: Principals’ pub/sub entities must be separate – To avoid data “leakage” – To avoid contention/concurrency coupling – To manage entity lifecycles: DDS is not stateless © 2009 Real-Time Innovations, Inc. 17
  • 18. Access Control  Session Management  Approach: Associate request w/ principal’s session – Client requests new session, providing identity and credential • Service responds with access token on success (“session ID”) – Client includes session ID in subsequent requests • Service authorizes request; proceeds or fails – Client requests session end, or service cancels session 1. Q#1: How to get session identifier? 2. Q#2: How to send session ID back again? Options: a) Query parameter b) Resource URI c) Request body d) Cookie © 2009 Real-Time Innovations, Inc. 18
  • 19. Getting a Session ID (“Logging In”)  Possible approaches: – /dds/log_in • No: Doesn’t imply how to use it (GET? POST?) • Remember: Resources are nouns. Verbs are CRUD. – /dds/session_id (GET) • OK, so now it’s a noun. • We want to “get” a new session ID, right? • …But still No: need to provide credential, but GET can’t have body • …and logging in is not “safe” operation, nor idempotent – /dds/session (POST) • Now we’re talking: Want to create new session in a collection— that’s what POST does. • Request body contains credential(s) • Implies administrative GET /dds/session: list all current sessions © 2009 Real-Time Innovations, Inc. 19
  • 20. Handing Back Session ID: #1, Query Param  Example: GET /dds/0/topic/MyTopic/data?session=123  Good – Simple, explicit – Works when GETting resources (very common)  Bad – May not work well when POSTing resource (e.g. HTML forms don’t allow POST with query) – URIs not shareable • Bob: “Get my data from here: http://bob.com/dds/…?session=Bob.” • Fred: “Ooh, look at this…” ::takes actions with Bob’s credentials:: © 2009 Real-Time Innovations, Inc. 20
  • 21. Handing Back Session ID: #2, Resource URI  Example: GET /dds/MySession/0/topic/MyTopic/data  Good – Simple, explicit – Works equally well with all HTTP methods  Bad – URIs still not shareable • Even harder to “cleanse” URI than with query parameter © 2009 Real-Time Innovations, Inc. 21
  • 22. Handing Back Session ID: #3, Request Body  Example: POST /dds/0/topic/MyTopic/data (body: session=123)  Good – URLs shareable without editing – Works well with POST, PUT, DELETE  Bad – Doesn’t work when GETting resources (very common) © 2009 Real-Time Innovations, Inc. 22
  • 23. Handing Back Session ID: #4, Cookie  Example: GET /dds/0/topic/MyTopic/data Cookie: session=123  Good – URLs shareable without editing – Works equally well with all HTTP methods – Time-out built in – Proven approach  Bad – Cookie stored with client’s user agent (e.g. web browser) • Harder to share across agents – …or maybe Good: forces re-authentication • Shared across users that share agent – Separate user accounts of multi-user platforms work around this  This is the recommendation © 2009 Real-Time Innovations, Inc. 23
  • 24. Conclusion  REST works best when taking full advantage of HTTP – Think in resources – Use GET, POST, PUT, DELETE as intended – Respect safety, idempotency expectations  DDS and REST are a powerful combination – Network effect makes hyperlink-able DDS data more valuable • Single DDS data set available via DDS network— or from any browser – DDS resource model supports clients with various needs • Simplified basic data access • Complete control over DDS entities and their configurations – RESTful DDS can provide strict per-user access control © 2009 Real-Time Innovations, Inc. 24
  • 25. Thank You © 2009 Real-Time Innovations, Inc. 25

Editor's Notes

  1. This is how your web browser works. The difference is that a browser just GETs (or in a form, maybe POSTs); other applications can use more of HTTP. HTTP methods mirror common “CRUD” interaction pattern. (Some subtleties around POST vs. PUT; won’t go into them now.)
  2. “Procedural REST” is not a recognized industry term; we just coined it. Like when someone learning a foreign language says something that’s grammatically correct, but somehow not the way a native speaker would say it.
  3. REST architecture already defines verbs and syntax of nouns. Remaining piece is to decide what the resources are. Note: Not everything in DDS is relevant for the web.
  4. No need to create entities explicitly. The data is what’s important; address it directly. Let the server worry about the entities.
  5. …But maybe you want to manage all of your entities explicitly. That’s also possible. Could implement data view, entities view, or both.