Replies: 2 comments
-
We're focused on the building blocks right now, but I took a peek at Next.js API routes a while ago. If a file is both handler boilerplate and business logic, you'd want some tool to scaffold, but also to verify/update for schema changes. A regular protoc plugin is well suited for scaffolding, but not for verifying/updating - there is no feature in the plugin contract that gives you access to existing files. I can definitely imagine some tool that takes a descriptor set (parsed protobuf files) as input, and verifies/updates previously generated code. Something like this could also be helpful for schema changes in general, for example if you want to migrate from protocolbuffers-javascript to protobuf-es. |
Beta Was this translation helpful? Give feedback.
-
Since it looks like we'll be able to use connect-node in the context of cloudflare workers, vercel functions, aws lambda, etc. it would be great if it included utils to conveniently split a grpc service's methods across several workers / functions / lambdas. The smaller the footprint of the serverless function the better :-).
This is already possible of course (manually), but a bit cumbersome & repetitive. Would it make sense to offer a
protoc-gen-grpc-serverless
generator with support for the most popular incarnations (AWS, Cloudflare, Vercel, etc.)... I think it would work more like a scaffolding tool, e.g. doesn't overwrite previously generated files, etc.?Just dropping this here as food for thought. Experimenting with that stuff manually atm. and drooling over the possibilities... e.g. conveniently & seamlessly deploying grpc apis in Cloudflare Pages (via
./functions
) and Vercel deployments (via./src/api/*
) :-)Beta Was this translation helpful? Give feedback.
All reactions