curl-library
RE: Locking a file on the Http Server
Date: Fri, 24 Jun 2005 14:16:35 -0400
The purpose behind the locking need is to avoid situation where more
than one client is try to modify the same file (at the same time).
Because of the file (sensitive) contents, it is important to wait until
one client finish updating the file before another client starts
updating it.
What is the best way to provide this locking (since curl is not the
answer)?
Thanks,
Orna
-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Friday, June 24, 2005 11:03 AM
To: libcurl development
Subject: Re: Locking a file on the Http Server
On Fri, Jun 24, 2005 at 01:07:22PM -0400, Haber, Orna wrote:
> Yes. You got this right.
> My thought about using a shared object and provide a lock-function in
> order to create a cookie on the server machine or create a
> "lock"-key-value in the server's registry (DNS cache).
> Of course I have the problem of using the same shared object by
> processes running on different machines..(:-)
>
> -----Original Message-----
> From: curl-library-bounces_at_cool.haxx.se
> [mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Ralph Mitchell
> Sent: Thursday, June 23, 2005 8:07 PM
> To: libcurl development
> Subject: Re: Locking a file on the Http Server
>
> Let me see if I got this straight - there's a file on a web server,
> and it's being access from multiple different clients. You want to
> lock it so that it can only be accessed by one client at a time. Is
> that right??
>
> If so, it sounds like something the web server needs to handle. The
> curl instances on different machine won't have a clue about locks on
> other machines.
Is this really the requirement? I don't know what you're trying to do
with
this, but you must understand the potential for one requester to cause a
denial of service for the others. If you just want to modify a file
while
clients are downloading, it can be easily done on a *NIX server without
disrupting other clients from accessing the old version at the same
time.
If you're just trying to create a globally-unique value for each client,
there are ways of doing that without blocking, too. In any case, as
Ralph
has said, none of this involves curl.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2005-06-24