How would I create an asynchronous notification system using RESTful web services?

前端 未结 4 1858
伪装坚强ぢ
伪装坚强ぢ 2021-02-04 03:59

I have a Java application which I make available via RESTful web services. I want to create a mechanism so clients can register for notifications of events. The rub is that th

4条回答
  •  盖世英雄少女心
    2021-02-04 04:44

    I can think of four approaches:

    1. A Twitter approach: You register the Client and then it calls back periodically with a GET to retrieve any notifications.

    2. The Client describes how it wants to receive the notification when it makes the registration request. That way you could allow JMS for those that can handle it and fall back to email or similar for those that can't.

    3. Take a URL during the registration request and POST back to each Client individually when you have a notification. Hardly Pub/Sub but the effect would be similar. Of course you'd be assuming that the Client was listening for these notifications and had implemented their Client according to your specs.

    4. Buy IBM WebSphere MQ (MQSeries). Best IBM product ever. Not REST but it's great at multi-platform integration like this.

提交回复
热议问题