rticonnextdds-examples icon indicating copy to clipboard operation
rticonnextdds-examples copied to clipboard

Request-Reply DynamicData Application

Open sagmua opened this issue 5 years ago • 6 comments

Summary

Request-Reply with Dynamic data example that shows how to establish a Request-Reply communication pattern using the Request-Reply API based on Dynamic data types.

sagmua avatar May 18 '20 11:05 sagmua

Why did we use the traditional C++ API?

The request-reply API for traditional C++ is not something we should be promoting. It's a hybrid between traditional and modern and should only be used when a customer is already using the traditional C++ API for DDS and can't use modern C++ for request-reply.

alexcamposruiz avatar Jun 08 '20 15:06 alexcamposruiz

Please, fix the format errors raised by Travis.

iblancasa avatar Jun 09 '20 09:06 iblancasa

Why did we use the traditional C++ API?

The request-reply API for traditional C++ is not something we should be promoting. It's a hybrid between traditional and modern and should only be used when a customer is already using the traditional C++ API for DDS and can't use modern C++ for request-reply.

Everything started from a Support case. The customer was using C++ API for his application and was interested in a Request/Reply example with DynamicData. I created the example and decided to share it with the community.

sagmua avatar Jun 09 '20 14:06 sagmua

If this isn't a best practice for most customers to use the traditional c++ request/reply, I would strongly recommend against adding this.

I understand that we want to provide examples for all of our users, but this looks like it will involve too many caveats.

rosemwahlin avatar Jun 09 '20 18:06 rosemwahlin

If we are not recommending our users to use the Classic C++ API I think that we should deprecate this API somehow. This sort of deprecation may fall into different approaches like adding a note in our documentation (and examples) about a strong recommendation of using Modern C++ API.

I think that as long as we fully support the Classic C++ API, it's ok to have examples in the community with it, although I agree that probably we should add the same example using the Modern C++ API.

I've been talking to @alexcamposruiz about the plans for that API. I also agree that if we don't recommend people use it, we need a plan for deprecating it and replacing it.

It would also be cleaner if we add the Modern C++ example – then we could point to it as a recommended pattern.

rosemwahlin avatar Jun 09 '20 19:06 rosemwahlin

As Alex mentioned maybe posting both examples, C++ and modern C++, is the best approach (I can work on this little by little). If this is the case, how do you want me to proceed? Should I continue working on this PR and once it's complete, keep it on hold and create a new one for modernC++? Or should I include both C++ and modernC++ in this same PR? @alexcamposruiz @angelrti

sagmua avatar Jun 11 '20 17:06 sagmua