Open sleipnir opened 1 year ago
With the possibility of transcoding grpc to http (https://github.com/elixir-grpc/grpc/pull/273) maybe we can solve the item https://github.com/eigr/spawn/issues/31 through this one.
When completes https://github.com/eigr/spawn/pull/302 closes this issue without the need for an Activator
It would be nice if this https://github.com/elixir-grpc/grpc/pull/254 was implemented before we start this item
We need to dynamically implement a grpc contract, just like we did in the Massa project, for the client for this we need at runtime to compile the proto files via FileDescriptor
Example of converting protobuf json to elixir (pseudo code):
actor = Eigr.Functions.Protocol.Actors.Actor.new(name: "Joe") {:ok, json} = Protobuf.JSON.to_encodable(actor) decoded_actor = Protobuf.JSON.decode(json, Eigr.Functions.Protocol.Actors.Actor)
Links: https://github.com/eigr/massa/blob/379828098fbbb7298de5ebd8ee1525c749555bbd/apps/massa_proxy/lib/massa_proxy/server/grpc_server.ex#L18 https://github.com/eigr/massa/blob/379828098fbbb7298de5ebd8ee1525c749555bbd/apps/massa_proxy/lib/massa_proxy/server/grpc_server.ex#L32 https://github.com/eigr/massa/blob/379828098fbbb7298de5ebd8ee1525c749555bbd/apps/massa_proxy/lib/massa_proxy/util.ex#L155