Comments (3)
Thanks for responding. I did get it working with a require statement. That's a good idea about having a separate repo for the protobufs.
Now it's working for me I'm really happy with Gruf. Thanks for making it available. I particularly like the interceptors. I'm using two customs ones. One for debugging that watches for a debug entry in the metadata, and one for validating the user's Google ID token.
from gruf.
Hi @toby-1-kenobi - thanks for calling this out. I definitely think the docs can be more elaborated here. For reference, we follow the same concepts as gRPC's core Ruby docs, which do require you to require those files beforehand.
As a recommendation, especially in a service-oriented architecture environment, I recommend you actually have all of your protobufs across your platform in a separate repository (an IDL, or interface definition library), and then generate an artifact (such as a gem) from those. From there, your repository can include them like so:
gem 'my-idl', github: 'toby-1-kenobi/idl'
gem 'gruf', '~> 2.7'
From there, create a Railtie or ask the service to require your gem, which should then require all the generated server/client stubs (we do this via glob). You don't need the proto files - just the generated _pb classes. The benefits of this is that as you branch out to multiple services you don't need multiple gems/clients, and you can centralize the definition (good organizationally for your eng org).
I'm on PTO for a couple of weeks, but will try and improve the docs more when I return. Thanks again!
from gruf.
Perfect @toby-1-kenobi ! I've also added a wiki to Gruf, which I'll be augmenting in the next week or so even further: https://github.com/bigcommerce/gruf/wiki
This should have plenty of information to get you started even more. Thanks for the feedback!
from gruf.
Related Issues (20)
- Please release 2.13.2 HOT 4
- Next step in `Server:-Creating-Controllers.md` not linked HOT 1
- Starting Gruf and bind with specific controllers HOT 4
- After Zeitwerk upgrade, specs don't autoload controller names HOT 7
- Request context for interceptors to communicate information back to controllers HOT 2
- 2.16 appears to autoload the HealthCheck even if not enabled HOT 1
- Minor typo in wiki, recommended fix :) HOT 1
- Gruf.controllers_path unloaded even in client mode HOT 2
- Question: is hot code reloading for other paths possible? HOT 1
- healthcheck cannot be seperated of main thread limit HOT 1
- Autoloading in development is not thread-safe HOT 3
- enabling TLS default
- Allow gruf to receive request objects in `call` HOT 2
- Ruby does not generate correct proto with ruby version 3.1.0 and 3.2.0 HOT 2
- Wiki: update instrumentation docs to rename blacklist to blocklist, since that's what it is in the code. HOT 1
- Ruby 3.3.0 support HOT 1
- Gruf server stuck at starting HOT 1
- Rails 7.1: DEPRECATION WARNING: Calling `ActiveRecord::Base.clear_active_connections! is deprecated. Please call the method directly on the connection handler; for example: `ActiveRecord::Base.connection_handler.clear_active_connections! HOT 1
- Did release 2.17.0 break call concurrency? HOT 9
- Use `ActiveSupport::Notifications::Instrument` instead of `event_listener_proc`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gruf.