3

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..)?

2 Answers 2

7

DNode is a good option.

A short article about DNode made by HENRI BERGIUS.

DNode for PHP on GitHub.

Sign up to request clarification or add additional context in comments.

Comments

2

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...

2 Comments

Thanks for you input, you have any usefull links by anychance ? Also i am running php-fpm and nginx, redis would still work ?
Yep of course. We use nicolas php redis lib and method publish. That's all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.