0

I want to spawn a child process from a node.js process and after performing certain async operations, I want to pause the process.

Then another Node.js process will be running which needs to resume the process based on some event it will be listening to.

I can't seem to find how can I accomplish this in node.js ?

1 Answer 1

1

You can use Redis Pub/Sub to achieve this.

Refer: http://code.tutsplus.com/tutorials/multi-instance-nodejs-app-in-paas-using-redis-pubsub--cms-22239

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

3 Comments

Thanks Vineet. While you have pointed in the direction of establishing communication between two separate node.js processes, my problem is a little more difficult to tackle. I need them to control a common unix child_process and need help in that direction.
This should help you achieve event based control across processes, if you can be a bit more specific I can try to help you on it :)
This helped indeed! My approach towards the solution needed to change. Event based solution worked great. thanks!

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.