Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Need suggestion on problem to distribute work

by smarthacker67 (Beadle)
on Jun 15, 2020 at 18:17 UTC ( [id://11118102]=note: print w/replies, xml ) Need Help??


in reply to Re: Need suggestion on problem to distribute work
in thread Need suggestion on problem to distribute work

All Thanks for your responses.

When I say a remote server is its a freeswitch server to whome I want to send work but its takes time so I cant send more work unless that work reaches to it. I wish to handle it separately.

I connect with single database only eg I do 200 insertion + 200 times work sending to remote server due to this next bach has to wait. Wish to fork this out from main loop so that separate thread will take care of this,

  • Comment on Re^2: Need suggestion on problem to distribute work

Replies are listed 'Best First'.
Re^3: Need suggestion on problem to distribute work
by Marshall (Canon) on Jun 18, 2020 at 02:30 UTC
    I am still not understanding your application. I alluded to this before, but running 200 insertions as a single DB transaction can take about the same time as 1 or 2 single transactions. The transaction overhead is HUGE. Doing 200 insertions at once doesn't take much more time than doing just a single insertion.

    I am not sure that forking or threading is your answer. I now suspect that your DB code is flawed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118102]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found