REST vs RPC Structure #114
Replies: 1 comment 3 replies
-
ARGUMENT FOR RESTI just like the structure of REST and how it's stateless, I also like the "CRUD" system of REST a lot, and I think it applies well to us. REST is a lot more about "nouns" and the actions we can perform on it. I think the term is resource-centric architecture and our system is resource centric (we have users, teams). The action's we're doing are fundamentally basic (ex. join a team, leave a team, register for the hackathon), if we used an RPC model for this, it wouldn't be taking advantage of the inherent action based design philosophy of RPC. More often than not we're going to be an action specific to a model, which is what REST excels at. Also just at a pure organisational level, our REST endpoints will look exactly like our file structure.
^all our routes are organized the same way (ex. POST /user, GET /user?userID=asdf) Also, we'd want to expose these resources down the line for other clients to access (ie. we want to have a blog on our website that users can comment on, we want to take this resource straight from our existing API/databse for our portal). At a fundamental level, REST does this better than RPC because RPC architecture is about actions, not resources. |
Beta Was this translation helpful? Give feedback.
-
We need to decide the architecture of our API now, REST vs RPC. For our CMS, we are using GraphQL, so this is not referring to that.
Beta Was this translation helpful? Give feedback.
All reactions