Json RPC
#5364
Replies: 1 comment 1 reply
-
|
We're gradually switching from REST to RPC style API in our projects. It's mostly NodeJS/Bun but some Python as well. RPC style is so much more convenient – I keep asking myself why REST even gained its popularity 🤔 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Having played around with TRPC, I feel like it would allow for a change in the way api's are written, especially for frontend. Thinking about it though, and running into my own problems trying to make an api trying to follow best practices, sometimes it seems like a rigid rest style is not always the best way to handle things.
So what the idea is to implement something similar. However it could utilize https://www.jsonrpc.org/specification. An example of this is
https://github.com/pavlov99/json-rpc, since decorators are already used, I was curious to what the difficulty would be to add something like @jrpc_method or something along those lines to allow for the rpc style calls with crud type calls as well.
This has pro's and con's as with anything, and could provide more tools for people to shoot themselves in the foot with, but at the same time what library already doesn't have some form of this. What are your thoughts?
Beta Was this translation helpful? Give feedback.
All reactions