简体   繁体   中英

Push notifications from Django to Node to Browser

Before I post my question, I understand that the HTTP protocol is a typical PULL protocol and Django doesn't work too well with the PUSH mechanism that I'm looking for. So what I plan to do is create a node server which can push notifications to a client browser.

Since I have complete control over the architecture, I don't mind creating the separate node server to handle notifications. I'm planning to create a webhook on the node end which will be consumed by a urllib2 request from my Django server which will have the necessary data to be pushed.

My question here is, is it possible to do this? If so, can the client browser use socket.io and connect to this node server separately?

Yes, that would be possible. See Web sockets make ajax/CORS obsolete? for the second part of the question.

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