|
|
|
|
|
by SMFloris
1919 days ago
|
|
Never tried with MsgPack, but I did try Protobuf. The reason I dislike Protobuf is that there is an extra code generation step I need to do. When using a compiled language, I guess you don't really mind the extra code generation step since you also get some safety from the compiler so you don't wind up miss-using the generated code. It is not the same when you are using an interpreted language that doesn't have really good strong typing. You will have to run a static code analyser and be very careful every time you do a change to the interface. Since in my experiments I was calling a method in Php through RabbitMq from a Rust worker, so it just proved allot simpler to just use json. Also, I measured the time it took to: 1. Make a request to the Php API 2. Php sends the rpc message on the queue 3. Rust processes that message 4. Php catches the response from the worker 5. Php returns the response to the http client It was <10ms running the cluster locally regardless if I used Protobuf or simply json. |
|
https://github.com/alecthomas/go_serialization_benchmarks