Hacker News new | past | comments | ask | show | jobs | submit login

I'm having trouble understanding the continual claiming that REST is not asynchronous - which I guess means that REST is synchronous. Saying it once would be a typo, but several times and I start to feel there is a distinct difference of opinion between myself and the author as to what constitutes a Restful architecture.



    A typical RESTful API:
    PUT new data to resource x/y/z

    An asynchronous non RESTful API:
    POST job information for resource x/y/z
    GET status of job for resource x/y/z until status is complete.
    GET results of job for resource x/y/z


It's all just relative though. If the resource is the job itself, then you have CRUD over REST for the job resource. The queue processing the job is a RESTful consumer as well, updating the job with information about the resulting new resource.

That is all RESTful. Whether or not its useful is a different question.


I think you left the realm of REST and reached out to the application level in order to make an non-existing case.

Your second example is only asynchronous in so far as you are oblivious to the completion of of the request, but that hardly makes it non-Restful. To me both of your examples are REST by definition.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: