How feasible it is to create your own Push Notification Server?

(Obaidur Rahman) #1

How feasible it is to create your won Push Notification Server instead of using FCM or APNs ?
What are the requirements for this ?

(Sayem Hossain) #2

I don’t think it’ll be a good idea to create your own system for push notifications.
If it was only web, you could definitely use websockets but for mobile devices you’ll need to trigger events continuously on the background service I guess, and keep your connections alive all the time with your server. That’s a huge amount of memory to work with. And lot of possibilities for memory leakage.
I’d recommend storing fcm user token in a table mapped with your user id. And then send push to your users by that refresh token. Can subscribe your users to a topic and send all of them who subscribes that topic too.

That solves most of your use case. Why reinventing your own wheel if you already have one and it’s perfect?