web interface service questions

3 posts / 0 new
Last post
Offline
Last seen: 1 month 1 week ago
Joined: 02/07/2020
Posts: 10
web interface service questions

Instead of using the rtiddsconnext-connector, I am looking into using the WIS.  I have a couple of questions that I don't see answers to in the documentation:

1. When POSTing keyed instances to a datawriter, does the datawriter maintain all of the indvidual instances?  A corrolary question would be: how does the WIS handle registering/unregistering keyed instances?

2. How do you dispose keyed instances?

3. What is the maximum value allowed for maxWait when performing a GET on a datareader?

(side note: The datareader GET documenation indicates that a 204 is returned, but that should be a 200.)

Fernando Garcia's picture
Offline
Last seen: 3 weeks 4 days ago
Joined: 05/18/2011
Posts: 198

Hi Seairth,


1. When POSTing keyed instances to a datawriter, does the datawriter maintain all of the indvidual instances?  A corrolary question would be: how does the WIS handle registering/unregistering keyed instances?

2. How do you dispose keyed instances?

The current implementation of Web Integration Service does not offer a mechanism to register, unregister, or disponse instances on the DataWriter side. While the OMG Web-Enabled DDS specification mentions such operations as part of the Platform-Independent Model, it does not provide a mapping to REST interfaces. I am going to file a feature request for such functionality, both for the standard and for RTI's implementation, because we think it's a valid use case.

When you POST a sample, Web Integration Service calls  DataWriter::write() passing a  NIL instance handle. Then, the underlying DataWriter analyzes the key fields of the sample to figure out to which instance it belongs. The result is the same: the underlying Web Integration Service DataWriter will store individual instances in its queue. The only difference is that it does not provide you with a mechanism to pass the instance handle as part of the  write() operation -- which may be a more efficient if you're constantly writing samples of the same instance. Having said that, this limitation may not add significant delays in in a scenario that mixes HTTP and DDS.

On the DataReader side, you have the means to detect disposed and unregistered instances, looking at the instance state of the samples you read.

3. What is the maximum value allowed for maxWait when performing a GET on a datareader?

The maximum value allowed for maxWait is DDS_DURATION_INFINITE_SEC, which represents an "infinite second period of time" and is defined as 0x7fffffff (i.e., 2147483647, the maximum value of a 32-bit signed integer).

Best regards.

Fernando

Offline
Last seen: 1 month 1 week ago
Joined: 02/07/2020
Posts: 10

Thanks for that information, and I am glad you are submitting a feature request for this, as it seems like a large gap in the spec.

So, taking this a little further...

If I were to create one DataWriter per keyed instance, what would happen to the instance when I delete the DataWriter? Does this delete the actual internal DataWriter and perform a dispose (assuming autodispose_unregistered_instances is true)?

(note: the use case is a RPC-like mechanism, which will be used infrequently.  I'm not in control of the specification/definitions, so I'm trying to figure out how to make it work as-is.  Because of the infrequent use, I am not concernt about short-term resource impacts.)