http://qs321.pair.com?node_id=11118069


in reply to Need suggestion on problem to distribute work

Right now you are in the thrails of an "XY Problem." You're describing what you need without addressing how to get there.

I focus on this: "currently I have a program that loop and deal with the database within the loop and sends some command to the remote server by connecting to it" ...

So – is "the remote server" the database, or something else? We just can't tell.

Now do this: tell us, first, who your server is and what he is to do. As this process is perceived by his external customers, exactly what is he expected to do?

Then, tell us clearly about each external agent ... "the database server," maybe "the 'remote server'" ... exactly how he connects to each one. If there is some external party upon which "he" depends to accomplish a particular unit of work, please make that clear.

Even though you are obviously momentarily-confused as to how to tackle this problem ... we have all been there. Describe it.