gRPC in NestJS, for Spring Developers: 1999 Plus 1 Is "19991"
The design sheet The full architecture and the verified references. Free, no email.
3:45 docker compose up, and watch it happen
One payments.proto, served by Spring Boot and by NestJS. A payment of 1999 cents arrives and the
handler adds one: 2000 on Spring, "19991" on Nest. Measured on 1 October 2026. Same proto, different
runtime types.
The 64 bit integer
Java mapped int64 to a long. Nest passes its loader options straight to @grpc/proto-loader, and
with none the amount arrived as a Long object: typeof object, zero not equal to 0, and plus one
joined strings. With longs: Number it was a number again, but a value just past 2^53 arrived one
lower. That is JavaScript numbers, not gRPC. Pick the representation deliberately.
Errors and deadlines
A handler that threw was masked on both stacks: UNKNOWN, with a generic description. A client that
set a 300 ms deadline on a one second charge got DEADLINE_EXCEEDED on both, and the server completed
the charge anyway on both. A deadline stops the waiting, not the work: check for cancellation before
the step with the side effect, and make that step idempotent.
The full code for every measurement is in the repository, and the free design sheet above has the checklist on one page.