PHP for node.js communication
I am trying to create a notification system very similar to SO (one when a new message is received). My site is built in PHP and I would like to be notified when data is inserted into the DB from PHP.
At the top of my head, I was just curling up the server node passing some post parameters to it, is this the correct way to do it?
Is there any good practice (security, performance ...)?
+3
silkAdmin
source
to share
2 answers
Take a look at redis channels. We use this practice for the same. Advantages: You can have many node.js servers and they will receive notifications at almost the same time ...
+2
Selvatico
source
to share
DNode is a good option.
A short article on DNode by HENRI BERGIUS.
DNode for PHP on GitHub.
+7
Oliver
source
to share