Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^5: How to tell a child what to do?

by Corion (Pope)
on Sep 21, 2005 at 10:57 UTC ( #493729=note: print w/replies, xml ) Need Help??

in reply to Re^4: How to tell a child what to do?
in thread How to tell a child what to do?

No - to me, that does not sound overkill. But that is because I try to avoid IPC in Perl and want to be able to easily audit what the children are doing, and what jobs came when. Also, I like the scalability that a database-based IPC mechanism provides - you can quickly add new machines to the setup which take their jobs from the database.

You said The hard part seems to be communicating with children, and I tell you a way that makes it trivially easy to communicate with the children, without any ugly interlocking problems and race conditions because of how (SQL) databases work. If you don't want to use what I propose feel free to do so, but don't dismiss it as unusable, as it is easy to implement.

Replies are listed 'Best First'.
Re^6: How to tell a child what to do?
by Eyck (Priest) on Sep 21, 2005 at 11:41 UTC

    It is NOT simple to implement, it may seem like that because you've been tinkering with it a lot, but this shouldn't prevent you from noticing how many external dependencies and problem this introduces.

    I find it highly disturbing to see you recommend such unholy measures, as as a high-flying Monk you're sure to sway lot's of unsuspecting youngsters to the dark side. I'm thrilled to see myriads of apps using SQL for iterating through lists and similar tasks.

    Funny that you mention ugly interlocking problems and race conditions that you just wrapped in your bulgy sql libraries,

    solution from Anonymous Monk(Re^4: How to tell a child what to do?) needs no interlocking-avoiding libraries, it's simple, REALLY self-contained ( and not, "well, kind-of self contained, when you factor in dependency on writable filesystem, enough place there, C-based sqlite library, with it's dependencies, correct sqlite file, with correct structure, and don't forget that when you change database format from 2.x to 3.0 your code will just die without en error message" ).

    I don't know how you used SQLite that you never encountered those problems, but you've been very lucky and I envy you.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://493729]
and the monks are mute...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2018-03-17 19:17 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (225 votes). Check out past polls.