You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all this is really a great and useful framework.
I would like to raise the question or rather a discussion weather the interfaces are transport agnostic yes or no. If i am right in my conclusion they are not. Why?
The http client client.hpp and iclientconnector.hpp are implemented in a synchronous request/response pattern, therefore offering a Send method with return type std::string
A tcp client is preferably implemented in asynchronous send/receive pattern, therefore client.hpp and iclientconnector.hpp cannot be used 'agnostically' out of the box
For using json-rpc-cxx with a tcp client/server, the iclientconnector.hpp and client.hpp have to be extended by offering, e.g. a Post method without a return value and a MessageHandler, e.g.
I am not sure I fully understood your issue with the synchronous interface. If you actually need async semantics, you can always wrap it into future/promises, right? Just introducing them on the connector level does not really make sense in my opinions, since the calling semantics through the RPC client will be synchronous again.
Could you explain in a bit more detail, maybe even using the TCP connector example what exactly would be easier/better with async interfaces?
First of all this is really a great and useful framework.
I would like to raise the question or rather a discussion weather the interfaces are transport agnostic yes or no. If i am right in my conclusion they are not. Why?
client.hpp
andiclientconnector.hpp
are implemented in a synchronous request/response pattern, therefore offering a Send method with return typestd::string
client.hpp
andiclientconnector.hpp
cannot be used 'agnostically' out of the boxiclientconnector.hpp
andclient.hpp
have to be extended by offering, e.g. a Post method without a return value and a MessageHandler, e.g.iclientconnector.hpp
client.hpp
client.cpp
The text was updated successfully, but these errors were encountered: