Is the serialised form of a message cached when sending to multiple clients?
18 views
Skip to first unread message
Mark Nuttall-Smith
unread,
Aug 14, 2019, 11:58:47 PM8/14/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
I have a streaming service that sends the same message to multiple connected clients. I'm wondering if grpc (or protobuf itself) is smart enough to cache the serialised form of a message, so that the serialisation cost is not incurred once per connected client? Otherwise, what is the cleanest strategy for optimising this? Thanks, Mark
Vijay Pai
unread,
Aug 26, 2019, 2:29:35 PM8/26/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
This caching is not automatic in grpc or protobuf, but I know that some users use generic (non-proto) message sends to achieve this result: explicitly serialize the message once and then send it out multiple times as a raw message. Hope that helps!