Hello,
Imagine you are tasked with writing a C++ library to be used both as a DLL for an application your company ships and also as the core of a backend cloud service.
The library API relies on many structs and the overhead of using protobuffers is deemed justifiable to obtain easily serializable traces and APIs that remain stable as structs change.
Using gRPC on the cloud backend service is a brainer, but could it also be used to define the library API for the application to use? I'm talking about generating dummy client/server stubs which don't do any networking, IPC (client and server are on the same process) or even make syscalls. From what I understand the DLL would only be exporting read/write calls.
The main benefit would be maintaining a single API IDL schema. In this case it's also desirable to obfuscate the API of the DLL being shipped to the end user (by not exporting any library APIs).
Maybe a different tool like FIDL (by the Fuchsia project) could be a better fit to handle the DLL use case, but I will need the gRPC API for the cloud service anyway so it would be great gRPC could cover both use cases.
Any ideas?
Thanks,
Pablo