Event Based interaction style in REST

前端 未结 5 745
夕颜
夕颜 2021-01-31 05:07

I am currently struggling with a design issue involving REST. The application I am designing has a requirement to send out events and also support pub/sub style of interaction.

5条回答
  •  醉酒成梦
    2021-01-31 05:47

    I don't see a reason why RESTful interfaces should not support events.

    It will have to be done through polling, mind you; and that would be true even if you were to use SOAP instead.

    While your web servers should definitely remain stateless, you probably do have a DB somewhere on the back end. You can use this DB to handle subscriptions to events by adding a subscription table.

提交回复
热议问题