This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi,
I'm hawking a bit of advise here if possible.
As the title suggests I need to build out a chat application into an existing Angular app. The client has requested it work in the same way as WhatsApp. I have built a proof of concept that runs of my existing API and just polls using setInterval once the user is signed in. This works ok for proof of concept but I am now looking to throw this into production.
My initial thoughts are using socket.io but I wanted to see if anyone else had either a better suggestion or had already used socket.io for this type of chat application and had any pointers that might help as I have never used sockets.
I currently have a few database tables chat_group, chat_group_members, chat_group_messages. These are in mySQL but I have no real need to leave the data within the main application database. I also have a table called chat_group_unread which holds a key made up of the groupID & userID and holds a count of the current unread messages. This is not actually a count of individual messages as once the user clicks the group to view the message stream the count is set to 0 again.
My main need is to be able to manage the counter in the menu in realtime and to be able to retrieve all previous messages when the user enters the group. I am using rxjs subjects (chatGroups$, chatGroup$, unreadCount$) so when a user enters a group the group is pushed to the chatGroup$ subject along with the messages.
Apologies for the long rambling explanation, any help greatly appreciated.
x
Subreddit
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Angular2/co...