You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Aaron Trevena <aa...@gmail.com> on 2007/10/30 14:12:23 UTC

Apache::Upload / tempname vs link vs slurping fh

Hi all,

I'm planning on changing an existing mod_perl application to
distribute images across the cluster as they are uploaded rather than
using rsync afterwoods.

Currently the code uses the "slurp fh, print to another file" recipe
which seems incredibly inefficient.

The "correct" way seems to be to use link(), but I can't be sure it
will be linked from the same filesystem and it's another unwanted step
before I copy to remote servers.

Would it be poor form to copy the spooled file at tempname directly to
the rest of the cluster   using something like Net::CascadeCopy or
MogileFS::Client? How much is the Apache::Request API likely to change
in a way that break tempname given that 2.x is now mature and stable?

A.

-- 
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Hosting

Re: Apache::Upload / tempname vs link vs slurping fh

Posted by Perrin Harkins <pe...@elem.com>.
On 10/30/07, Aaron Trevena <aa...@gmail.com> wrote:
> The "correct" way seems to be to use link(), but I can't be sure it
> will be linked from the same filesystem and it's another unwanted step
> before I copy to remote servers.

File::Copy?

- Perrin