Home » vue » Which technologies would be the best choice for an online real time chat application? [closed]

Which technologies would be the best choice for an online real time chat application? [closed]

Posted by: admin November 26, 2021 Leave a comment

Questions:

I am new in world of development. Newly I got a project where I need to implement a chat application on it. There might over 1000 users may concurrently interact with this chat app at peek. The chat application should work in all browsers, IOS, Android.

I am using laravel as php framework.

Looking for your help. Thank you!

Answers:

You can use Laravel with socket.io to create a real time chat application.

Here is a small that kind of demo which I made few days ago:

https://github.com/xparthx/Larevel-echo-with-socket.io

(It is not exactly a chat application but it is a real time feed)

You can get the basic idea from it.

###

I am using firebase for real time chat app
you can even use Pusher
here is the link use to create real time chat app with pusher linknado and search laravel real time

###

Use firebase by google. It is very straightforward.

A simple architecture can

Each chat will be called a thread.

A thread will have messages

A message will have content, author, time and other details

Firebase is a realtime database, it is non relational,

Querying is very each, but complex queries will give bottlenecks

{
  thread1:{
    cdate: created_date,
    messages : {
      message1:{
       author:you,
       cdate : whenSent
      },
      message2:{
       author:him,
       cdate : whenSent
      },
    }
  }
}

For a live chat all you have to do is listen on the thread1 object in firebase using their web apis.

You can send new messages from either client(web apis) or using php in the backend using firebase-php