Live data from Hacker News

REST is the new SOAP

medium.com

231–240 of 351 posts

Re: REST is the new SOAP

#231
While I generally like transparent systems as RPC pretends to be one, I have do not like unreliable systems. As network communication by its nature is very unreliable, it is even worse when some magic technology tries to hide that unreliability and calls it transparent. So much for RPC.

Yes, RESTful is not always as simple as it seems at its first glance. But that articles doesn't suggest anything helpful besides arguing why RESTful implementations are difficult. So if someone going to write the next 'REST is the new SOAP' article please provide some sane alternative idea (doesn't have to be a finished implementation).

Re: REST is the new SOAP

#232
post #3

POST represents a non-idempotent operation. The other HTTP verbs (GET, PUT, PATCH etc) are idempotent. The awkwardness surrounding PUT/PATCH stems from the need to ensure that those requests remain idempotent. Nothing bothers me more than an idempotent request (e.g. a search query) using POST. If you design your API starting with "what should happen if the client makes this request multiple times?", then it becomes m…

PATCH is not idempotent.

Source: https://tools.ietf.org/html/rfc5789#section-2

Re: REST is the new SOAP

#233

Earlier quoted context omitted.

You're right of course, like the first time you hit a race condition (with a week of debugging) and build a distributed lock system. You publish it and people find it useful! Only to realize later postgres offers fine locking capabilities far beyond what you've created (now that you get it). Then you realize that all anybody is doing is creating subsets of Erlang (half serious). So why aren't we all using that? In th…

Exploration will be far more effective, and get farther, if it learns from previous expeditions, starts from established frontier outposts, etc. Is there a superset of Common Lisp and Erlang? Such a language would be unmatched for already containing everyone's clever ideas!

> Is there a superset of Common Lisp and Erlang?

http://lfe.io :)

Re: REST is the new SOAP

#234
post #93

Earlier quoted context omitted.

Programming Paradigm Becomes Popular B/C it gets stuff done --> left: it gets stuff done because it's smarter right: it's bad for you, it's actually getting less done middle: didn't read all that stuff, busy getting stuff done.

didn't read all that stuff, busy getting stuff done. I agree with this. When I end up on a new project and I'm not the lead, and there is a lead who is pedantic regarding how they want their URLs crafted (or wants to implement a complicated query pattern, or introduce an extra layer of objects to satisfy an abstract notion of purity), I'll just go with the flow. Accidental complexity, pattern seeking and cargo-cultin…

You might like http://jsonapi.org which defines a standard that is fairly sane.

Re: REST is the new SOAP

#235

Earlier quoted context omitted.

> Why is REST so popular? Because it's easy to implement and works for lots of use cases. Could have given the exact same non-argument for SOAP -- which in its time dominated corporate services. Whether it's "easy to implement and works for lots of use cases", it's a moot point if there would be something even easier to implement and worked even better for real use cases. Why stop at "easy" when you can have easier A…

“Real illuminated REST”? The REST spec? It’s an architectural style defined by Roy Fielding’s thesis (who also was the editor of HTTP/1.1 RFC). It attempted to describe the Web’s architecture in neutral terms and how it was derived by combining previous styles. Some people took this and crafted a quasi religion out of it, but that’s partly because vendors in 2002 were all lined up trying to replace the web with a COR…

>It’s an architectural style defined by Roy Fielding’s thesis (who also was the editor of HTTP/1.1 RFC). It attempted to describe the Web’s architecture in neutral terms and how it was derived by combining previous styles.

It's application for what are essentially RPC needs is which I consider cargo cult.

Re: REST is the new SOAP

#236
post #8

I agree 100% with this article. A simple RPC API spec takes minutes to define. 'Rest'ifying takes much longer, there are a million little gotchas, no real standard. Everyone has a different opinion of how it should be done. Data is spread across verbs, urls, query params, headers, and payloads. Everyone thinks everyone else doesn't 'get' REST. If you try to suggest something other than REST in the office you become t…

> A simple RPC API spec takes minutes to define. 'Rest'ifying takes much longer, there are a million little gotchas, no real standard.

The thing is, RPC is fundamentally broken due to the nature of distributed computing, and REST is not. All the time you have to spend doing things right is … the time necessary to do things right.

And REST really is very simple. The problem is the cargo-cult nature of folks who don't really understand it.

Re: REST is the new SOAP

#238
post #62

Earlier quoted context omitted.

What do you think is a better solution?

I don’t know yet because I haven’t had as much experience with other solutions as with REST. I am curious about Thrift and Protocol Buffers. I have worked once on a project migrating from REST to Protocol Buffers for an internal API and it noticeably improved performance, but code complexity remained more or less the same.

> I have worked once on a project migrating from REST to Protocol Buffers

What does that mean? REST is a style while protobufs are a serialisation format: a REST architecture can use JSON, protobufs, Thrift, whatever.

Re: REST is the new SOAP

#239

GraphQL is the new REST

I'm not sure if GraphQL will ever replace REST as REST is suitable for most of the cases. REST is easier to grasp and still have a great tools and SDKs around. I know that there are fields where GraphQL is better but in general I think REST will remain No. 1.

Re: REST is the new SOAP

#240
Anyone have much experience with gRPC? We are using Swagger/jsonschema for our REST APIs and it's quite the nightmare in terms of development cost. IMO, writing schemas in a self-describing "language" like JSON should be a crime; it's too verbose and easy to make mistakes. At run time it gets bad because you need to unmarshal the JSON objects into Python classes which can be too much overhead for large request or response sizes.
Post reply on HN