Replies: 1 comment
-
Hi! Socket.IO can totally be used on mobiles, but one should avoid to use it in an always-running background service. FCM will regularly check if there are new notifications, but does not rely on a always-open TCP connection if I'm not mistaken. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Socket.IO mentions in the documentation:
Socket.IO is not meant to be used in a background service for mobile applications.
The Socket.IO library keeps an open TCP connection to the server, which may result in a high battery drain for your users. Please use a dedicated messaging platform like FCM (Firebase Cloud Messaging) for this use case.
THE QUESTION
How can you say Socket.IO is not meant to be used on mobiles, but then you suggest something like FCM?
What do FCM do that Socket.IO don't?
I mean, they both need to open & keep a live connection with the users, right?
Unless FCM is a PubSub technology, where you need a producer & consumer relations, and all the client does is long-polling for new messages (which is something I really wanted to avoid when getting into building a complex Chat-System).
Could you please elaborate more on what is the best-practice when it comes to a messaging system for mobiles, and how bad is it to still be using Socket.IO?
Beta Was this translation helpful? Give feedback.
All reactions