Skip to main content
New Participant
May 31, 2021 1:42 PM UTC
Question

How to maintain relationship between Parent and child processes dynamically

Hi All,

We have a use case where from parent process we will call a webapi and based on the data received the webapi triggers subprocesses dynamically and consider the subprocesses count is pretty high. 

We need the child processes to communicate back the parent process as well

​
So the key requirement is:
​
1) maintain the relationship between parent and child processes
​
2) Have a way to notify parent process at regular intervals - lets say on completion of certain steps in child process

One way to implement this is using a send message and receive message, do we have any other alternative way which doesn't include DB intervention. Please suggest

Appreciate your help. Thanks!

5 replies

stefanhelzle0001
Brainy
May 31, 2021 2:11 PM UTC

Do you plan to keep alive these parent processes for a longer time? Does not feel like a best practice design.

New Participant
Jun 1, 2021 6:18 AM UTC

Yes Stefan, we need to keep them alive. 

stefanhelzle0001
Brainy
Jun 1, 2021 6:32 AM UTC

OK. I have no idea what your goal is. Long running processes are to be avoided.

Data migration scenarios are a different scenario. Starting a large number of processes with messaging going back and forth puts high load on the system, conduct a load test and keep an eye on health check. Do that outside business hours.

Participating Frequently
May 31, 2021 3:35 PM UTC
send message and receive message

This is the way to go.

Please consider best practices. For certain use cases like setting up data/data migration this design works well and try to avoid this design for apps. 

New Participant
Jun 7, 2021 2:24 PM UTC

Thanks Stefan and Shyam, 

Is there any other way to have a communication for an asynchronous sub process and parent process. Please suggest.