I'm trying to implement push notifications in my app but not sure if it's correct and i need your opinions.Here how it should work :Client app needs to notify users when their products are not available in store or when new products have arrived in store. There's 2 solutions to do it according to my researches:- Notify users manually by using push notification services like one signal, accengage, aws sns and many more- Notify users automatically according to database updates.The second one is what i want to achieve. To do so, i have to implement a database observable object in my API then notify susbscribed users every chosen period. I'm still not sure if i'm correct though.In the future, users will be able to trade their stuff so there will be some sort of ping pong's effect going on between users and i wonder how to achieve that, like facebook messenger instant notification for example.It has to be websocket or some sort like that, i'm not sure.I've learned that socket.iO can also be a solution but has cons for mobile. The Device must be connected to the socket so that the information flows between the client and the server, but a smartphone, in the real world, connects and disconnects all the time to different networks, and that breaks the socket connection. Also, by having the connection open, on the background, there is a ping pong between the server and the client to verify that the connection is still open, and that ends up consuming battery life.I'm trying to figure it out. I'd gladly appreciate for your help guys.
Submitted September 14, 2018 at 10:11AM by Surikaate
No comments:
Post a Comment