RPC Olympics – The Search for the Perfect RPC Protocol
41–50 of 71 posts
Re: RPC Olympics – The Search for the Perfect RPC Protocol
#42Atom is an easy, Redis Streams-based RPC that also emphasizes docker containerization of microservices. We support plug-ang-play serialization with msgpack and Apache Arrow currently supported and more on the roadmap. You can also send raw binary if you please.
Another nice thing about Redis is that if you're running microservices on the same instance you can connect to redis through a linux socket on tmpfs and bypass the TCP stack to get even better performance.
Re: RPC Olympics – The Search for the Perfect RPC Protocol
#43Re: RPC Olympics – The Search for the Perfect RPC Protocol
#44Curious to hear anyone's experience with RPC over Nameko in Python. We use it extensively on top of RabbitMQ and its been pretty robust.
RPC over Rabbit is fine if you don't care about the result, or you can guarantee that each message gets processed in a short constant time.
Re: RPC Olympics – The Search for the Perfect RPC Protocol
#45Having just looked into this recently, I can also safely say that moving to REST HTTP/2 on its own already provides a significant speed benefit. Closing the gap to GRPC (or even substantially beating it) is possible by switching to a fast serialization format (eg; flatbuffers, msgpack, capnproto). While GRPC has its place it also comes with headaches like pretty lousy generated interfaces, horrible debuggability, and…
1. Having a complex build system that is aware of gRPC
2. Massive migraines
Unfortunately build systems integrations, IDE integrations, and generated code is unanimously awful for gRPC.
Every company I've seen use grpc has unfortunately adopted the practice of basically manually running protoc and committing the generated code into repo - sometimes modifying the code manually to make it import successfully (Python).
I hope Bazel evolves into a state where it's usable by the average engineer and has first class support for gRPC.
Re: RPC Olympics – The Search for the Perfect RPC Protocol
#46Earlier quoted context omitted.
It wouldn’t really be an R PC, then would it?
It's not a normal procedure call within the same process.
It's like comparing communication between people physically located in the same room and people located on different continents.
Re: RPC Olympics – The Search for the Perfect RPC Protocol
#47My current rpc model for python is to pickle function name and args/kwargs and publish to redis for any subscribers that might be listening. If the channel is marked as persisting, I put the message to a hashset with current nanosecond as the timestamp and just send a ping instead. It is pretty fast with asyncio redis client clocking at an avg 15k rpc/s on a single core with uvloop on a lowly i7
Be careful using the pickle format; it's not considered safe to unpickle untrusted data. https://docs.python.org/3/library/pickle.html
Re: RPC Olympics – The Search for the Perfect RPC Protocol
#48Earlier quoted context omitted.
especially when you use the router pattern on server side in order to have multiple sessions on the same socket.
Got any references on the router pattern? I searched but came up with a lot of IT related articles.
Re: RPC Olympics – The Search for the Perfect RPC Protocol
#49Strong recommendation for ZeroMQ as well. It's a thin layer on TCP, is very fast, offers bindings in many languages, and is fairly flexible as well. https://zeromq.org/
I believe GRPC is pluggable so if one wanted to invest time in building a GRPC ZeroMQ Transport then that is a feasible route. GRPC bring really good RPC mechanisms to the table.