spring-projects / spring-projects/spring-framework

Make message decoding in ProtobufDecoder more extensible

Open
#37,265 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: web status: waiting-for-triage
Dominant language
Java
Stars
60.2k
Forks
38.8k
Avg merge
5d 2h
Merged PRs (30d)
27

Description

Recent changes in ProtobufDecoder have made it more open to extension. One thing that is missing still is the ability to override the Message creation step. The base class does all the interesting stuff, and comes up with a byte buffer with the message contents, but then doesn't allow you to insert your own logic for decoding. A protected method in ProtobufDecoder would be great, or a helper interface like MessageSizeReader.

Would enable us to more easily (without copy-pasting the whole of ProtobufDecoder) support grpc-web in https://github.com/spring-projects/spring-grpc/issues/427.

Contributor guide

Open the contributing guide

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.

Research direction

Start by reading ProtobufDecoder and trace the message creation step after the base class produces the byte buffer. Determine whether a protected method or MessageSizeReader-style helper best exposes that step without duplicating the decoder. Done means custom decoding logic can be inserted and the grpc-web use case can build on the extension point.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.