-1

for a project, I'm looking for a solution to exchange data between several smartphones (kind of decentralized chat).

A master will initialize the sequence, and slaves will connect. The master will then send data to the slaves, but the slaves can also send data to the master.

But I don't know what technologies are used to do this.

After a lot of research, I thought of using multicast, but unfortunately this requires that all smartphones are on the same network. This will not necessarily be the case. Indeed, I would like it to work even if a smartphone is connected to the wifi, and another one uses a 4G type connection.

I then thought about using Bluetooth, but this time, I discovered that not all smartphones can handle several Bluetooth connections at the same time.

I thought about using a notification system (like Firebase Cloud Messaging), but I would like to not depend on another service if possible.

I then looked into the idea of setting up an MQTT broker like EMQX, with Paho for the client, but I might have a lot of connections, which scares me a bit with a broker.

Thanks in advance

1 Answers1

0

to answer me, I finally did a test with Mqtt, and it seems to do the job. I chose the EMQX broker which has the advantage of being easily scalable (according to the doc), and on the client side, I use Paho.

I did small scale tests, with 3 smartphones that subscribe to 2 topics, and the result is very conclusive. It remains to be seen with more simultaneous connections, but I think this solution is one of the best in my case.