Comet modes
Data streaming and long polling Comet modes are supported. The client can decide at run time which mode to use depending on which mode works best with the particular technology stack or network topology.
Note: For key based notifications, the client should
request the latest data from the master data source to ensure that the
client does not hold stale data due to missed
notifications.
- Data streaming
- When the client requests information from the server, the server holds the request indefinitely. As information becomes available to the server, it is pushed to the client by writing it to the output stream of the response continuously.
- Long polling
- When the client requests information from the server, the server holds the request until a notification is ready to be pushed to the client. After information becomes available to the server, a completed response is pushed to the client and the connection closes. The client immediately registers for push notifications again in order to continue receiving updates.