News for hackers. Stuff that matters.
Re:Post-REST by dragonwriter on Monday November 19, 2018 @04:42PM (#18489980)
> Should you use HTTP calls to communicate between services

Yes, it's mostly fine for that. Not always ideal, sure.

> let's say, to poll a resource every second and know if a worker has finished

No, you generally shouldn't poll every second. You should POST a subscription and then the other end should POST you a notification.

If you are in a situation where you need to poll instead of subscribing and waiting, then, maybe use HTTP long polling, maybe poll less frequently than every second, maybe use something other than HTTP, but in any case you are in a suboptimal circumstance.

(Of course, whether you should use HTTP as a transport protocol is orthogonal to whether or not you should use a REST architectural style.)

There are no comments on this comment yet.