Skip to content

Releases: benoitc/livery_grpc

v0.2.4

Choose a tag to compare

@benoitc benoitc released this 21 Sep 09:52
f95dbea

Fixed

  • Server reflection serves protos that use map<> fields, including
    imported ones such as google.protobuf.Struct. gpb describes a map
    entry as a shared top-level MapFieldEntry_N_M message with required
    key and value, which protoreflect rejects, so grpcurl and Postman could
    list such a service but not describe or call it. The entries are now
    rewritten to protoc's shape: one <FieldName>Entry nested in the owner
    of each map field, with optional key and value.
  • file_containing_symbol resolves nested messages and enums, methods,
    and symbols of imported packages. Imported messages were indexed under
    the importing file's package.

v0.2.2

Choose a tag to compare

@benoitc benoitc released this 21 Sep 06:47
88dbfa5

Fixed

  • The 0.2.1 hex package still declared only gpb: it was published
    before the packaging fix landed and could not be replaced. 0.2.2 is
    built with make publish, so it declares livery and h2 and
    installs from hex on its own.

Changed

  • make publish PUBLISH_ARGS=--replace passes arguments to
    rebar3 hex publish, to overwrite a version published less than an
    hour ago.

v0.2.1

Choose a tag to compare

@benoitc benoitc released this 20 Sep 23:30
a55528e

Fixed

  • The hex package now declares livery and h2 as requirements. Earlier
    packages were built from a tree with _checkouts, which dropped them
    (0.2.0 declared only gpb), so livery_grpc could not be installed
    from hex on its own. make publish builds from a clean export of HEAD
    and checks the requirements.

Changed

  • Require livery ~> 0.10.2 (any 0.10.x from 0.10.2). barrel_mcp and
    barrel_a2a are no longer fetched or locked: livery made them
    optional dependencies.

v0.2.0

Choose a tag to compare

@benoitc benoitc released this 20 Sep 19:36
19804af

Added

  • A service registration may carry a config, delivered to every callback of that service as the context's config, so a service that serves one backend carries its handle without a global. The routing index entry becomes {Method, Handler, Config}.
  • A2A over gRPC lives in a companion package, livery_grpc_a2a, which composes this library with barrel_a2a. It stays out of this one so a gRPC user does not take on an A2A implementation, and out of barrel_a2a so an A2A user does not take on gpb and a code generation step. The config field above is what lets it hand its agent to the service handler from outside.

Changed

  • The protobuf build uses gpb's use_packages, so a .proto can reference messages from another package (google.protobuf.Struct), with msg_fqname and service_fqname renamed back to their base names so generated Erlang names are unchanged.
  • Bump livery to 0.9.2 and h2 to 0.12.x.

Full detail in CHANGELOG.md.

v0.1.2

Choose a tag to compare

@benoitc benoitc released this 04 Jul 20:26
0a305ce

Changed

  • Bump the livery dependency to 0.5.0.

Full Changelog: v0.1.1...v0.1.2

livery_grpc 0.1.1

Choose a tag to compare

@benoitc benoitc released this 13 Jun 15:08

Added

  • Client interop check against a real grpc-go server
    (make interop-client, skipped without Go), proving livery_grpc_client
    calls services that are not written in Erlang (unary and
    server-streaming over the standard health service).

Fixed

  • A request message compressed with an unsupported grpc-encoding now
    returns unimplemented (as the gRPC spec requires) instead of
    internal. Added livery_grpc_compression:request_algorithm/1.

livery_grpc 0.1.0

Choose a tag to compare

@benoitc benoitc released this 13 Jun 13:44

First release. gRPC for Erlang on the livery HTTP/2 stack: server and
client, all four call types, and the surrounding ecosystem.

Added

  • Project scaffold: OTP application, supervisor, build pipeline with
    gpb and rebar3_gpb_plugin, sample helloworld.proto.
  • Wire layer: livery_grpc_frame (length-prefixed framing + streaming
    decoder), livery_grpc_status (canonical codes, grpc-message
    encoding, trailers), livery_grpc_compression (identity + gzip),
    livery_grpc_codec (gpb glue + content-type checks). Property and unit
    tests.
  • livery_grpc_service: method descriptors derived from gpb
    introspection (wire path, message types, call kind, snake_case callback
    name) and a path-keyed routing index.
  • Server: livery_grpc:start_server/1 runs gRPC on a dedicated h2
    listener; livery_grpc_server dispatches POST /pkg.Svc/Method to the
    bound callback module. Unary and server-streaming, with status in
    trailers (and Trailers-Only for pre-dispatch errors). End-to-end tests
    over h2c cover success, error status, handler crash, unknown method,
    and streaming.
  • Client: livery_grpc_client calls gRPC services over the h2 client
    (unary and server-streaming), with metadata and gzip. livery_grpc_wire
    centralises message encode/decode for both sides. In-tree client tests
    cover unary, error status, server-streaming, and gzip both directions.
  • Cross-cutting: grpc-timeout deadlines (client sends and bounds the
    wait; server parses, exposes in the context, and aborts a unary handler
    that overruns), error details via grpc-status-details-bin, request
    metadata, and livery middleware as gRPC interceptors.
  • Health: the standard grpc.health.v1.Health service
    (livery_grpc_health:service/0), with per-service serving status.
    Check is unary; Watch emits the current status once (live updates
    follow the bidirectional work).
  • gRPC-Web: livery_grpc_web framing on the same server (binary and
    text), with the status delivered as an in-body trailer frame. Unary and
    server-streaming. Reflection is deferred: its RPC is bidirectional and
    waits on the h2 bidi work.
  • Example (greeter_example), a quickstart guide, and a grpcurl interop
    smoke test (make interop) confirming on-the-wire compliance with an
    external gRPC client.
  • Client-streaming and bidirectional streaming on both sides, on h2
    0.10.0. The server reads requests through a livery_grpc_stream handle
    and interleaves replies in the chunked producer; the client adds
    client_stream/3,4 and open/2,3 + send/2 + send_end/1 +
    recv/1,2. All four call types are verified against grpcurl.
  • Client interceptor stack, the outbound twin of livery's server
    middleware: interceptors on connect/3 or per call, with before/1,
    after_response/1, and wrap/1, matching the livery_client layer
    shape (Tower layers on the BEAM).
  • Server reflection (grpc.reflection.v1): enable with reflection => true and tools like grpcurl discover services and message schemas at
    runtime, with no local .proto. Verified with grpcurl list,
    describe, and a fully reflective call.
  • Health Watch now streams live updates: it emits the current status and
    a new message on every change until the client disconnects, backed by a
    small subscription store (livery_grpc_health_store).
  • Code generation (livery_grpc_codegen, make stubs): per service, an
    erpc-style client stub (greeter_client:say_hello/2) and a service
    behaviour (-behaviour(greeter_service)) for compiler-checked handlers.

Changed

  • Servers are now owned by a supervised process (livery_grpc_listener
    under livery_grpc_server_sup) instead of the caller, so a server
    started from a short-lived process keeps running. start_server/1
    returns the listener owner pid.

Added (testing)

  • livery_grpc_e2e_SUITE, a Common Test end-to-end suite against a real
    running server: the full journey with the in-tree client, and the same
    calls driven by grpcurl over reflection (skipped if grpcurl is absent).

Added (docs and example)

  • A documentation set in the style of grpc.io with Erlang snippets:
    Introduction, Core concepts, Getting started, a Basics tutorial built on
    a real RouteGuide example, a Design guide for the Erlang integration, an
    Erlang-integration how-to, and task-oriented guides modeled on the gRPC
    guides (streaming, metadata, interceptors, deadlines, cancellation,
    error handling, status codes, compression, authentication, health,
    reflection, retry, graceful shutdown, flow control, wait-for-ready,
    gRPC-Web, generated stubs, testing). All wired into ex_doc.
  • examples/route_guide.erl + proto/route_guide.proto: the RouteGuide
    example, exercising all four call types, with an eunit suite.
  • livery_grpc_client:cancel/1 cancels a streaming call.