0

What is the Best way to communicate in between'em when :-

  1. I need to restart node.js app (or Update configs) from php

I do know about D-node. But is D-node good to use in my case ? I can have 100s of node.js apps

1
  • shell_exec check this Commented Aug 10, 2015 at 9:42

1 Answer 1

1

Your question is opinion based...

If you have a complex system with hundreds of applications in multiple languages (PHP + JS in your case)

  • Define messages so that they can communicate to each other.
  • Choose a common tool to serialize, unserialize messages (JSON, Avro, Protobuf, XML...)
  • Choose a messaging system that suits your needs (RabbitMQ, ZeroMQ, ActiveMQ, ...)
  • Decide which app does which task and a global messaging architecture with patterns that you did not invent (i like zmq documentation for that matter, but you should also read the RabbitMQ doc).

Another great tool is Celery (from the python world). You won't be able to use it, but its documentation is a very good read.

Everything else wont work. If you start having a PHP script restarting another one, that does some task, then calls a bash script, you will end up spending 10 times the effort debugging.

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

Comments

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.