0

Currently I'm working on the MQTT based Chat application where I need to assign Unique Topics to Users dynamically.

So, I thought of using their IMEI/MobileNumber. But in iOS, we cannot get the IMEI Number so we thought of generating a random IMEI from the backend and assign it to the Users.

Now, My problem is whenever user changes his mobile, the IMEI Number changes and it will be fresh profile again to that user.

If I use based on his Mobile Number, there is a chance when the user doesn't use the sim for 3 months. The connection automatically terminates from the network provider and the same number will be assigned to another new customer(atleast here in india).

Can anyone suggest me a good approach for the Topic Generation?

BTW, I need a Web Chat also and that need to be fetched from database. that is the only reason, I'm focusing on the Topic Generation. So, I will fetch messages based on his topic and show them in the Web Chat.

Do anyone know, how whatsapp maintained their topics?

RealSteel
  • 1,871
  • 3
  • 37
  • 74
  • you don't have any other kind of primary key for your user? the issue with IMEI or mobile number, apart from fresh sessions when the user changes device, is that it could allow account access to a different user if the device is sold or given to someone else. – slipperyseal Aug 17 '17 at 04:25

1 Answers1

0

I thought of using their IMEI/MobileNumber.

Bad design. Have the user create an account (i.e. email) with a password for your service that way no matter what phone or phone number they have, they can still log in and use your app. And make sure you ENCRYPT the user credentials in your database. Start FIRST by building an app with proper security or else you will be hacked 5 minutes after you launch it.

Do anyone know, how whatsapp maintained their topics?

Just because Zuckerberg copies everyone else, doesn't mean you need to copy them. Also, I believe whatsapp created there own version of a MQTT Broker. Hence, it will have an entirely different set of functionality from a regular MQTT Broker.

Roger
  • 7,062
  • 13
  • 20