gorums: reduce generated-code hooks in the application-facing API

Open
#424 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
go, grpc
Domain
api, backend

Research direction

Start with the generated streaming handlers and the registration template in the gorums code generator, and trace where ServerContext.SendMessage, Server.RegisterHandler, NewResponseMessage and AsProto are called from generated code. The issue asks for a design proposal before any API change, so the first deliverable is a written design covering which hooks can move into runtime/gorumsimpl, plus a compatibility note on existing generated code and version checks. Done means an agreed proposal, not a code change.

Written by the indexing model from the issue text.

Description

Problem

Generated server code depends on exported details in package gorums.
Generated streaming handlers call ServerContext.SendMessage.
The registration template also uses Server.RegisterHandler, Message, NewResponseMessage, and AsProto.
These hooks make implementation details visible alongside the application API.

Investigation

  • Identify which exported hooks are used only by generated code and which are also needed by applications or interceptors.
  • Explore removing SendMessage from ServerContext, and review the related registration and message-envelope helpers.
  • Evaluate a narrower generated-code boundary, including runtime/gorumsimpl, while accounting for Go package visibility.
  • Account for existing generated code, generator/runtime version checks, regeneration, and public API compatibility.

Propose a design before changing the API.

Dominant language
Go
Stars
149
Forks
15
Avg merge
1d 8h
Merged PRs (30d)
43

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from relab/gorums

All issues in relab/gorums

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.