Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: What the flock!? Concurrency issues in file writing.

by suaveant (Parson)
on Oct 01, 2008 at 18:23 UTC ( #714860=note: print w/replies, xml ) Need Help??


in reply to Re: What the flock!? Concurrency issues in file writing.
in thread What the flock!? Concurrency issues in file writing.

Not NFS.

I am only sorting to get the data back in line after parallel writing, since data gets written out of order (and is not fixed, so I can't just seek to the proper position and write)

                - Ant
                - Some of my best work - (1 2 3)

  • Comment on Re^2: What the flock!? Concurrency issues in file writing.

Replies are listed 'Best First'.
Re^3: What the flock!? Concurrency issues in file writing.
by BrowserUk (Patriarch) on Oct 01, 2008 at 21:01 UTC

    If you have to sort the results anyway, just dodge the bullet and have each of your processes write to separate files. Then sort the files into one. You can't sort until you get the last line anyway, so there is no loss of parallelism.

    Also, a threaded solution is possible if you are interested.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I've thought about both of these, and I may actually look into the multiple file option since I could possibly write these subfiles in order, if I tweaked everything right.

      Threading is definately something I have thought of but would be a big change, not to mention getting up to speed on threads :)

                      - Ant
                      - Some of my best work - (1 2 3)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2022-09-29 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (125 votes). Check out past polls.

    Notices?