Question

I want to implement chat feature in my asp.net mvc 4.0 website. I've few doubts in my mind.

  1. Should I use MS SQL database to store chat message and to update on user profile using jquery (refreshing after every 5 seconds).

  2. Should I use Inbound Web-hook HTTP Post method to update chat message on user profile using same MS SQL databse.

  3. Should I use XMPP without any database to integrate it in my website and use it.

Please let me know which method is best for implementing chat feature in website?

Was it helpful?

Solution

Let me first clear your doubts.

  1. Using MSSQL server for string and retrieving chat is not a bad option if you are making AJAX call every 5 seconds to see if any new message came from any other users. if any new message arrives just ping the user about the same.

  2. Well Inbound Webhooks automatically send HTTP GET/POST call to the given REST API url, you can refresh the user page whenever you get any inbound webhooks call, so as user will get the new message as soon as it is sent from the other end.

  3. Using XMPP in your chat application will allow you to integrate your chat application with facebook or gtalk like messengers also, so it will add great benefit if you uses XMPP in your application, but for this you need jabber account for every new user.

So, I think after reading all these comments it will be easy for you to decide which feature will be most beneficiary for you in what condition.

OTHER TIPS

I know this doesnt answer any of your question but have you ever looked into working with SignalR?

Sample application here: http://code.msdn.microsoft.com/wpapps/Chat-Web-Application-in-9a86e594

Many tutorials online as well but 2 part example is here

http://visualstudiomagazine.com/articles/2013/01/22/build-a-signal-r-app-part-1.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top