Re: SQL::Interpolate and *::Interpolate proposals

2004-01-06 Thread Nicholas Clark
On Mon, Jan 05, 2004 at 10:04:01PM -0500, David Manura wrote:
 So, there seems like three main ways out there to implement string 
 interpolation:
 
  - use tied hashes
  - use source filtering (e.g. Filter::Simple)
  - use a function call on a list (e.g. as done with SQL::Interpolate 
 with source filtering disabled: dbi_interp SELECT * FROM mytable WHERE 
 X =, \$x);

I think it's also possible to overload  parsing using the overload
module. But my brain is hazy on this one. Certainly you should be able
to parse a  string and decide what to return (string, or object ref)

Nicholas Clark


Re: Simple multi-level tie

2004-01-06 Thread A. Pagaltzis
* david nicol [EMAIL PROTECTED] [2004-01-06 20:03]:
 I'm also safe from the implementation needing the flock bits if
 it uses them.  I don't know that they do, but I also don't know
 that they don't.

You're also safe because tieing and locking is not an atomic
operation, and some DBM libraries modify the file as soon as they
open it. tieing first and locking the DBM afterwards would create
a race condition.

-- 
Regards,
Aristotle
 
If you can't laugh at yourself, you don't take life seriously enough.


atomic locking web service?

2004-01-06 Thread david nicol


a web service that provides atomic advisory locking would be
pretty easy to write.

For that matter so would a datagram service, and that would be
more efficient.

Requests would include:

resource-ID-string

a character string uniquely identifying
what is getting locked

lock-disposition

SHARED, EXCLUSIVE, or UN.  All requests
are nonblocking.

request-identifier

a character string uniquely identifying this
request, for robustness

timeout

how many seconds to wait before calling this
lock stale and breaking it


Responses would include:

request-identifier
copied from request

result
(lock-disposition) GRANTED
or FAILED

Security would be based on peer IP address, with the server
throwing away requests from unlisted peers (amounting to the
same thing as a firewall rule)  Use a VPN to encrypt all traffic
if you want, rather than adding encryption features to the
remote resource locking protocol.



Have I just described something that already exists?



-- 
david nicol
Take your time. -- Allan Quaterman