-1

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,

Bastien
  • 63
  • 6

2 Answers2

1

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:

Hope it will be helpful for you

Rubycon
  • 18,156
  • 10
  • 49
  • 70
0

Just use pubnub.com,

it's like 5 lines of code

https://www.pubnub.com/developers/demos/10chat/

These days it would be bizarre to build chat from scratch.

Fattie
  • 27,874
  • 70
  • 431
  • 719
  • The website would be for my startup, so I would prefer to do it myself to avoid having to pay or anything else! :) Because I saw on their website that you had to pay once the site went into production ( https://support.pubnub.com/support/solutions/articles/14000043651-can-i-use-pubnub-for-free- ) – Bastien Dec 26 '18 at 21:09
  • it's completely free until you have huge numbers of users. Note that if you use **any sort of cloud service** you of course have to pay. PubNub is far and away the world's biggest messaging service. Normally when you want to throw on some chat, you just use that. it will be completely free for you! (Just as using AWS, Firebase or whatever will be free for you.) – Fattie Dec 26 '18 at 21:23
  • Oh? It would be perfect ! Because on their site there are two categories: "Plan and build" and "Launch and Grow" And only the part "Plan and build" is free, but if I want to make profits with my applications, it is not likely to become profitable? https://www.pubnub.com/pricing/ – Bastien Dec 26 '18 at 21:32
  • honestly by the time your site is making enough money to hire a person or two, you can change to some other system. you'll have to **pay for servers** anyway. just throw it together using pubnub at first for free. or one of the many alternatives to pubnub. – Fattie Dec 26 '18 at 22:39