The current web app setup is like this: there is a central server which interacts with different services through http API calls using JSON as the response object. We want to switch to using gRPC for the communication between these services to improve performance. So, can anyone help how can I use gRPC gem in my Rails application and services without changing the existing MCV ( model, controller, view) code structure.
gruf can help:
gruf is a Ruby framework that wraps the gRPC Ruby library to provide a more streamlined integration into Ruby and Ruby on Rails applications.
There's also a demo Rails application that can be used as a reference.
After creating your proto file, generating the Ruby wrappers and wiring it up to your Rails application, you can simply bundle exec gruf
to launch a gRPC server.
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