cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Locking a file on the Http Server

From: Haber, Orna <Orna.Haber_at_ca.com>
Date: Fri, 24 Jun 2005 14:27:48 -0400

The locking feature that I need involves locking a set of related files.
That is why I am looking into a solution that could write/read a "lock"
key-value on the Web server registry if that is possible, where each
client could read/write this registry key-value for a given set of
files..
Any ideas because there could be a security issue with this solution.
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 moved
Received on 2005-06-24