Hacker News new | past | comments | ask | show | jobs | submit login

if comfortable answering, why protobuf instead of gob?



Gob is Go-specific. Our mission is to make schema-driven APIs easy, regardless of what language you use. Protobuf already has official support for nearly a dozen languages, and unofficial support for many more. Protobuf also has a compiler with a plugin model, which facilitates supporting even more in the future.

Furthermore, Protobuf is an IDL, not a full-blown programming language. This makes it ideal for this use case, for describing APIs and data structures.

Gob-encoded data structures are described with Go. While Go is great for writing server-side business logic, it is not as well-suited as a description language for data that you need to share with non-Go systems.


thanks for the super clear explanation, which i definitely thought was the case (thinking back to NeXTstep era IDL and all thereafter)


proto predates gob by quite a bit. gob was introduced with golang, and it's not really used anywhere else.


My takeaway from Java serialization (which became passé) was that a schema-driven encoding that’s supported in many languages is a lot more useful.


Java serialization is passe largely because it has huge gaping holes in how one can abuse the serialization loaders to perform very unsafe security holes. And it's incredibly slow, and tied to JVMs, but sadly only really tied to JVM that have the exact same version and serialized objects, etc.. did I mention java serialization sucks? (Spoken by a true java lover that that subjected himself to serialization way more than he wanted to)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: