Live data from Hacker News

The S stands for Simple

72.249.21.88

41–50 of 54 posts

Re: The S stands for Simple

#41
post #38

Earlier quoted context omitted.

Not just JSON and HTTP but specifically REST w/ JSON. There's a lot to be said for such a model.

What's the difference between "JSON in GET/POST" and "REST with JSON"?

"REST with JSON" should send the (relative) URL for the next request, not just an ID. Although there's more to it than just that.

Re: The S stands for Simple

#42
post #23

I'm sure I've had this conversation in real life :-) My one experience with SOAP was trying to get a perl client library working with a Java server -- they weren't compatible with each other. In the end I used ethereal with a Java client and dumped the request which I could then replay through perl. In fact, I would go as far to say SOAP is the least fun protocol that I've ever used (including an undocumented one).

My one SOAP exerience was similar but I ended up using LWP and creating my own serializer then they upgraded from .net 1.1 to .net 2.0 and it all broke again. I hated SOAP from then on.

Re: The S stands for Simple

#43
A few notes The "SOAP Guy" sounds rather like a straw man to me. I'd like to hear what a real soap guy has to say. Though I don't know if there is such a guy any more. Soap is just a transport format. Any WCF (http://en.wikipedia.org/wiki/Windows_Communication_Foundatio...) guys around?

We use WFC between .Net programs, and once you connect to the right endpoint, it pretty much just works. You may have a look at the generated WSDL to see if it's sensible, but for the most part, it is "just plumbing. You don’t need to see it."

We're not stupid enough to try to get WCF and SOAP to interop with other languages, though. We'd probably look at using ActiveMQ, or XML and URLs for that kind of job.

Also the statement that "no one actually uses these other transports" is not true - we use TCP transport in some cases, and it's not that unusual.

There are parts - large parts - of the spec (see the WS-* stuff, e.g. http://en.wikipedia.org/wiki/List_of_Web_service_specificati...) which very few people use or care about, which would probably make full-blooded interop with other stacks very hard. It's sad that we didn't get there yet, but I'm glad that we've got what we do have.

In some cases REST is better. Even MS knows this. See http://msdn.microsoft.com/en-us/data/bb931106.aspx

Re: The S stands for Simple

#45
post #27

Earlier quoted context omitted.

Both protobuf and Thrift are designed exclusively around simple static type-checking with type-erasure. Neither support heterogeneous collections, much less discriminated unions or GADTs. There are plenty of untaken vertices in the serialization-format hypercube.

Heterogeneous collections, discriminated unions, and GADTs can be implemented easily in either thrift or protobuf by leveraging inclusion of custom type-tagged messages/data. However, while the encodings are absolutely sufficient to represent these data structures -- if you so choose -- my experience dictates that keeping serialized messages typed and as simple as possible is advantageous from the perspective of long…

Of course you can implement custom type-tagged blobs, but that's not using thrift or protobufs -- it's your own nebulous SOAP-style bullshit.

Re: The S stands for Simple

#46
post #38

Earlier quoted context omitted.

Not just JSON and HTTP but specifically REST w/ JSON. There's a lot to be said for such a model.

What's the difference between "JSON in GET/POST" and "REST with JSON"?

In one, you are essentially doing RPC: here's the input, do the operation and give me an output. In the other, you are remotely manipulating "documents". Even a command to act consists of emplacing a "request" and being redirected to a "response". You navigate between "documents" by following URLs in links.

To be honest, I like REST for CRUD of things that are natural resources, but I think it's wasted extra work for operations that are natural RPCs.

Re: The S stands for Simple

#47
post #45

Earlier quoted context omitted.

Heterogeneous collections, discriminated unions, and GADTs can be implemented easily in either thrift or protobuf by leveraging inclusion of custom type-tagged messages/data. However, while the encodings are absolutely sufficient to represent these data structures -- if you so choose -- my experience dictates that keeping serialized messages typed and as simple as possible is advantageous from the perspective of long…

Of course you can implement custom type-tagged blobs, but that's not using thrift or protobufs -- it's your own nebulous SOAP-style bullshit.

They're not "blobs" if they are also protobuf/thrift messages themselves.

Re: The S stands for Simple

#48
post #45

Earlier quoted context omitted.

Of course you can implement custom type-tagged blobs, but that's not using thrift or protobufs -- it's your own nebulous SOAP-style bullshit.

They're not "blobs" if they are also protobuf/thrift messages themselves.

That's certainly cleverer, but it's still a nested user-implemented unsound type-system.

Re: The S stands for Simple

#50

A few notes The "SOAP Guy" sounds rather like a straw man to me. I'd like to hear what a real soap guy has to say. Though I don't know if there is such a guy any more. Soap is just a transport format. Any WCF ( http://en.wikipedia.org/wiki/Windows_Communication_Foundatio... ) guys around? We use WFC between .Net programs, and once you connect to the right endpoint, it pretty much just works. You may have a look at th…

And another thing: the article complains that 1) SOAP sucks and 2) It keeps changing.

There's some merit to both those charges, but change is a legitimate response to something not being right yet. What's the alternative?

Not sure why I'm getting downvotes. Its possible that I'm wrong, but it's a more substantial answer than most comments on this topic. I'd like to hear your point of view. Or are only "LOL I agree soap sucks" comments encouraged?

Post reply on HN