简体   繁体   中英

Push Notifications with NodeJs

I have a group chat implemented in Nodejs and socket.io and mobile application in worklight. Than there is Redis database storing messages. After a new message is send I want to send notification to all devices subscribed. Im have not idea how to put it together to work. I was thinking about adding socket.io to adapter but I founded that I dont know how. Than I was thinking about adding new route to group chat, so adapter can request new messages and process them. Any ideas how to continue or made it the best way?

questions:

Is it possible to invoke worklight adapter from nodejs?

Is it possible to add socket.io to worklight adapter?

Is it possible to periodically invoke worklight adapter?

Is it possible to create no-sql alternative to sql-adapter in worklight?

Is it possible to invoke worklight adapter from nodejs?
Yes. You can invoke a procedure form anywhere. Keep in mind to keep it secure.

Is it possible to add socket.io to worklight adapter?
You can keep your socket.io on a separate server and protect it with Worklight

Is it possible to periodically invoke worklight adapter?
Yes, server side, create a demon and invoke the Worklight adapter, client side use settimeout.

Is it possible to create no-sql alternative to sql-adapter in worklight?
Yes, you can use an HTTP adapter to call the no-sql REST API or call it from a Java adapter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM