logoalt Hacker News

speedgoosetoday at 12:58 PM1 replyview on HN

REST has issues tough.

How do you send a big read only query? A POST? A GET hoping nothings logs it or swallows half of it?

How do you deal with delayed answers? Things that most HTTP middleware will timeout long before the result is achieved?


Replies

drdexebtjltoday at 2:05 PM

REST has issues if you limit yourself to think of the “resources” as your domain entities.

If you have a long running search, the resource is the search. Create a search. Fetch search results. Delete the search when you’re done.

Similarly, if you have a sufficiently complex command, the resource is the command itself. Maybe it requires async work, and you can later fetch the command results.

Anecdotally, this seems to be too big of a leap in mental model for beginners, mostly because all of the REST learning path does is teach you how to use it in CRUD domains.

show 1 reply