Giter Site home page Giter Site logo

More clear docs needed about gruf HOT 3 CLOSED

bigcommerce avatar bigcommerce commented on August 27, 2024
More clear docs needed

from gruf.

Comments (3)

toby-1-kenobi avatar toby-1-kenobi commented on August 27, 2024 2

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.

splittingred avatar splittingred commented on August 27, 2024

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.

splittingred avatar splittingred commented on August 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.