coolhand2120 1 day ago

What part of this implementation is ReST? I see a CRUD API that uses HTTP verbs. State transfer implies multiple steps at least, where I call the initial API which then returns several other API endpoints "transfering the state" typically in a HATEOAS style - perhaps that part isn't required.

https://en.wikipedia.org/wiki/REST

> ... although this term is more commonly associated with the design of HTTP-based APIs and what are widely considered best practices regarding the "verbs" (HTTP methods) a resource responds to, while having little to do with REST as originally formulated ...

Ah, I see, the industry has taken to just calling HTTP ReST for no apparent reason.

As far as not being sure about CRDTs, these protocols were made to overcome the obvious and terrible shortcomings of CRUD APIs (lack of communicability and idempotency). Who ever wants to see "the data on the server has changed, do you want to overwrite the data on the server or overwrite your local copy". If you're not doing some sort of event sourcing for state management (ES, OT, CRDT) you're probably doing it wrong or doing it for a simple project.

3
WhitneyLand 1 day ago

Not sure why you think that’s not rest. Because Roy Fielding wrote a paper that most people don’t care about?

Language isn’t controlled by a single authority or the first person to use a term. Words mean what people use them to mean. You can complain that it’s not the ‘proper’ definition, but if the majority of people use it a certain way, that becomes the definition in practice.

edit: Fielding not Crawford (thx ackfoobar)

ackfoobar 1 day ago

Similarly Java falls outside of Alan Kay's definition of OOP. But unlike Roy Fielding's ReST, I don't see many people bringing that up.

tptacek 1 day ago

I don't understand this objection. Whether or not the APIs the post describes are according-to-Royle REST, is it your claim that REST is in fact a good approach to state sync? Because that's what the post is really about.

juliusdavies 1 day ago

Damn that’s a fine coinage. According-to-Royle.

827a 1 day ago

Its more fun at parties to just choose to believe that many of these APIs companies deploy are REST APIs, where the word "REST" is just a word, doesn't stand for anything, and is entirely unrelated to whatever that Roy guy was talking about all those years ago.