Description
A simple gem for nested grpc message encoding and decoding. When you have deeply nested hash to convert to grpc message, it is difficult. So I wrote a tiny library :). Similar to ActiveModelSerializer
grpc_serializer alternatives and similar gems
Based on the "Abstraction" category.
Alternatively, view grpc_serializer alternatives based on common mentions on social networks and blogs.
-
Trailblazer
The advanced business logic framework for Ruby. -
Interactor
Interactor provides a common interface for performing complex user interactions. -
wisper
A micro library providing Ruby objects with Publish-Subscribe capabilities -
Responders
A set of Rails responders to dry up your application -
ActiveInteraction
:briefcase: Manage application specific business logic. -
Decent Exposure
A helper for creating declarative interfaces in controllers -
Rails Event Store
A Ruby implementation of an Event Store based on Active Record -
Mutations
Compose your business logic into commands that sanitize and validate input. -
dry-types
Flexible type system for Ruby with coercions and constraints -
Light Service
Series of Actions with an emphasis on simplicity. -
Amoeba
A ruby gem to allow the copying of ActiveRecord objects and their associated children, configurable with a DSL on the model -
Inline SVG
Embed SVG documents in your Rails views and style them with CSS -
SimpleCommand
A simple, standardized way to build and use Service Objects (aka Commands) in Ruby -
Waterfall
A slice of functional programming to chain ruby services and blocks, thus providing a new approach to flow control. Make them flow! -
u-service
Represent use cases in a simple and powerful way while writing modular, expressive and sequentially logical code. -
PageletRails
Improve perceived performance of your rails application with minimum effort -
Surrounded
Create encapsulated systems of objects and focus on their interactions -
Smart Init - Simple service objects in Ruby
A simple gem for eliminating Ruby initializers boilerplate code, and providing unified service objects API -
SuperModule
SuperModule allows defining class methods and method invocations the same way a super class does without using def included(base). This also succeeds ActiveSupport::Concern by offering lighter syntax -
Rocketman
๐ Rocketman help build event-based/pub-sub code in Ruby -
skinny_controllers
A pattern for allowing for easier testing of large projects' business logic -
Strategic
Strategic - Painless Strategy Pattern in Ruby and Rails -
Invokable
Objects are functions! Treat any Object or Class as a Proc (like Enumerable but for Procs). -
Lionshare
A Ruby interface to the Lionshare API (cryptocurrency prices) -
EasilyTypable
Ruby module that facilitates English-like type checking in an inheritance hierarchy via "type_name?" methods -
simple_active_link_to
Simple rails view helper to manage "active" state of a link -
dry-rb
dry-rb is a collection of next-generation Ruby libraries, each intended to encapsulate a common task.
Static code analysis for 29 languages.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of grpc_serializer or a related project?
README
grpc_serializer
A simple gem for nested grpc message encoding and decoding
Usage
$ gem install grpc_serializer
Sample Proto file (.proto) :
syntax = "proto3";
package cpqgrpc.product.v1;
message Shop {
string name = 1;
repeated string items = 2
}
message ProductRequest {
uint64 id = 2;
string name = 3;
repeated string categories = 4;
Shop shop = 5
}
Use the generated stub class ProductRequest as follows. Do deep_symbolize_keys before sending as argument
payload:
{
id: 1,
name: "Macbook"
categories: ["accessories", "electronics"],
shop: {
name: "shop 1",
items: ["item1", "item2"]
}
}
grpc_msg = GrpcSerializer.hash_to_grpc_object(payload, ProductRequest)
To decode to hash on client or server
hash = GrpcSerializer.grpc_object_to_hash(grpc_msg, ProductRequest)