Hacker News new | ask | show | jobs
by that_james 1432 days ago
I think the issue is here is that I should have explicitly stated this was about HTTP RPC (I am steering clear of REST for a reason).

In the context of RPC, is it still impractical? It feels clearer to me, but I might just be continuing my own confusion now

2 comments

> In the context of RPC, is it still impractical?

If you are defining a bespoke RPC protocol that incidentally uses some parts of HTTP without much concern about the spec but only concern with what existing infrastructure will do with requests, you have…lots of freedom to design things however you want.

OTOH, a lot of work has gone into handling almost every conceivable aspect of information interchange, within a REST style (because REST was both derived from the architecture of the Web and used in updating HTTP for HTTP/1.1) in the HTTP standards (there are some gaps still, like that addressed by the draft QUERY [0] method), why reinvent the wheel, unless you are specifically dealing with use cases squarely within the gaps?

[0] https://www.ietf.org/archive/id/draft-ietf-httpbis-safe-meth...

My comment makes sense if you lean on REST/HTTP and want to leverage the uniform communication and layered architecture. The more bespoke you get, the less you want to care about what I said above. I interpreted your post as general if that makes sense.

In any case, consistency is key. Personally I think it is easier to lean on standards in order to be consistent. Which is why I made some examples of status codes that can only be formed by an application server. I think "how do I avoid surprises, workarounds and inconsistencies" is a good question to make decisions around what we're discussing here.