Designing a REST API with req/resp and pub/sub requirements
<p>Nowadays I'm designing a REST interface for a distributed system. It is a client/sever architecture but with two message exchange patterns:</p>

<ul>
<li>req/resp: the most RESTful approach, it would be a CRUD interface to access/create/modify/delete objects in the server.</li>
<li>pub/subs: this is my main doubt. I need the server to send asynchronous notifications to the client as soon as possible.</li>
</ul>

<p>Searching in the web I found that one solution could be to implement REST-servers in the server and client: <a href="https://stackoverflow.com/questions/22046328/publish-subscribe-rest-http-simple-protocol-web-services-architecture">Publish/subscribe REST-HTTP Simple Protocol web services architecture?</a></p>

<p>Another alternative would be to implement blocking-REST and so the client doesn't need to listen in a specific port: <a href="https://stackoverflow.com/questions/3780086/using-blocking-rest-requests-to-implement-publish-subscribe">Using blocking REST requests to implement publish/subscribe</a> </p>

<p>I would like to know which options would you consider to implement an interface like this one. Thanks!</p>