简体   繁体   中英

PHP to node.js communication

I am trying to create a notification system very much like the SO one ( the one when receiving a new message ). My site is built in PHP and i would like the notifications to occur when data is inserted to the DB from the PHP.

At the top of my head i would just curl the node server passing it some post parameters, is that right way to do?

Are there any good practice (security, performances..)?

DNode is a good option.

A short article about DNode made by HENRI BERGIUS.

DNode for PHP on GitHub.

Look at the redis channels. We use this practice for same prupose. Benefits : you can have a lot of node.js servers and they will receive notifications almost a the same time...

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