I would like to implement a chat service in the portal client module. The portal client is an Angularjs SPA, which is communicating with the Cuba App over the REST API.
Can I use the already built in Atmosphere framework to implement a parallel messaging channel?
I hope yes, if so is there any integration help or guideline where and how I can start?
In a very simple version i would like to implement the following scenario.
- UserA query a presence service over the REST API to see if UserB is online.
- If UserB is Online the UserA send to him a private message with REST API call, so here I am not using socket.io
- Because UserB is online and logged in the chat service, I notify him with Atmosphere about the new chat message.
4.UserB browser using the Atmosphere client library receiving the message and displaying it, and sending acknowledge over REST API or Atmosphere.
- If UserB is offline, i simply storing the message,and when he logs in he will receive all pending message with REST API call.
Can it be implemented in this way?