I tried reading Protobuf docs, but couldn't imagine many usecases it can be used. I would like to know some real-world performance improvement usecases of protocol buffer . Thanks
Protocol buffers is a serialization library, so the answer to that is basically the same as to the question:
When would I want to serialize / deserialize data?
That could be any scenario involving persistence (disk, blobs in a database, etc), transfer (sockets, files, etc), or simply in-memory storage (snapshots, memento, deep-clone). The fact that protobuf is version-tolerant and cross-platform means that it can work for both homogeneous and heterogeneous setups - as indeed can various other serialization formats. Being terse (small) it may be particularly useful when bandwidth is at a premium (which is "always" on busy systems), and being a binary (rather than text) protocol, it is noticeably cheaper to process - so good for reducing CPU overhead. Beyond that: this is an open-ended question limited only by your imagination.
It's going to be more CPU and network efficient than something like Json, so whenever you know what'd you be sending, and need to send a lot of it, it's probably a win.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With