DEV Community

loading...

Realtime notfication system...

yohannestz profile image YohannesTz ・1 min read

Hi i have been wondering if there is a way to make fully functional realtime notification and chat system like firebase in nodejs socketio?

I know it is possible to make chat system but i don't know and never tried notfication system.

Discussion

pic
Editor guide
Collapse
kartikbhargava profile image
Kartik Bhargava

You can use FCM and subscribe user to a topic or use tokens .
Fcm also works in background

Collapse
yohannestz profile image
YohannesTz Author

Sorry can u elaborate?

Collapse
kartikbhargava profile image
Kartik Bhargava

Firebase Cloud Messaging is good for this. You need to generate a token for every user and use that token to subscribe users to a particular topic (You can read about this in FCM Docs), and then u just need to make a call to fcm server and send a request body with your payload and fcm service handles it . It is quite effeicient.

Thread Thread
yohannestz profile image
YohannesTz Author

Okay but the problem is i don't want to use firebase