PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 13, 2022

[FIXED] What is the best way to make instant messaging on website?

 April 13, 2022     instant-messaging, phpwebsocket, symfony     No comments   

Issue

I am currently creating a website on Symfony 4, and I would like to integrate an instant messaging system like messenger, with the possibility to create groups of discussions.

The problem is that I don't know which method to use. Symfony doesn't offer anything for that, and ajax seems to me not optimized at all because of the many requests made to the server. Should I use websockets coupled to nodeJs? Or use the Rachet librarie? Because I don't know NodeJs and integrate a new technology into the project may not be suitable for everyone

So, what would be the most optimized system to support a large number of users?

Thank you,


Solution

You have 2 options here:

Implement by yourself

In your case you need the following:

  • Install some XMPP server in your cloud. It could be something like Ejabberd, Prosody, Tigase, Openfire
  • On client side - use XMPP libs to connect to XMPP server and to send/receive messages. On Web/Web panel - use StropheJS
  • for any service tasks - there are also XMPP libs for PHP

Use some messaging SaaS platforms

There are also lot's of diff messaging platforms e.g Pusher, Twillio, Layer, ConnectyCube, Applozic etc.

I used ConnectyCube some time ago, they support Messaging, Video Calling and Push Notifications functionality for iOS, Android and Web. They also have some ready code samples available, so can some some time on start. Pricing is a competitive one. So it can be done in the following way:

  • Javascript/Web Chat SDK and code samples https://developers.connectycube.com/js/messaging

Hope it will be helpful for you



Answered By - Rubycon
Answer Checked By - Katrina (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing