Request-Reply DynamicData Application
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.
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.
Please, fix the format errors raised by Travis.
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.
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.
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.
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