can I get the raw protobuf serialization additionally?

36 views
Skip to first unread message

Mario Emmenlauer

unread,
Mar 18, 2017, 11:29:15 AM3/18/17
to grpc.io

I'd like to implement client-side caching in a C++ client, by storing
the request and reply in a map, and answering subsequent requests from
the map it possible. If something like this exists, I'd be happy to know!
If it does not exist, it seems straightforward enough to implement. The
protobuf serialized forms of the messages seem quite ideal for this(?)

My question: is there an example how to use grpc with protobuf, but
perform the serialization "by hand" so it can be cached? Since I use
asynchronous calls, it would also be great to know which response
matches which request.

All the best,

Mario Emmenlauer

Craig Tiller

unread,
Mar 18, 2017, 11:48:10 AM3/18/17
to Mario Emmenlauer, grpc.io

Look to the generic APIs: they're async and perform no serialization.


--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/45431a8d-851c-6773-091b-03a581a21387%40emmenlauer.de.
For more options, visit https://groups.google.com/d/optout.

Mario Emmenlauer

unread,
Mar 20, 2017, 6:53:22 AM3/20/17
to Craig Tiller, grpc.io

Dear Craig,

thanks for the very quick reply! I found it relatively easy to
serialize messages with protobuf's SerializeToString() method. But
how would I send this with grpc? Are there examples of the generic
APIs, or can you point me to whatever corresponds to a "send"
function?

All the best,

Mario
Reply all
Reply to author
Forward
0 new messages