mneme: (Default)
[personal profile] mneme
Less cryptically, why isn't there a perl-usable (pure perl or just something with perl wrappers; don't care) distributed locking system that's worth a damn? What's so hard to understand about "locks should only EVER be given out to one client, and clients need to know instantly if their locks become unreliable?" that causes everyone to get it wrong?

IPC::Lock::Memcache: memcache is a caching system, and may drop your locks on the floor without telling you; also, netsplit will hose you, also, dead clients don't auto-unlock=useless.

IPC::Locker: single-server (not ideal, but fine -- although it lets clients specify a group of machines that DON'T TALK TO ONE ANOTHER, which is worse than useless unless you -want- a high likelyhood of false locks), handles dead clients well via timeouts and checking for pid existence (though if pid server isn't working, probably can timeout longrunning locks while they're working = bad), but locks don't hold connections open. Which means if, say, your lock server reboots, instead of what -should- happen (all your processes holding open locks get signals and can decide this means they have to relock or dump all their work on the ground, as they no longer, well, have an exclusive lock), things go on happily having lost your lock. Checking for a lock before every atomic stage of a critical section? Not good.

Date: 2009-04-03 09:24 pm (UTC)
From: [identity profile] londo.livejournal.com
I'd assume it's because that's worth money.

Date: 2009-04-03 09:45 pm (UTC)
avram: (Default)
From: [personal profile] avram
On the other hand, it's also seems like the kind of thing that would scratch some programmer's itch, and those kinds of things are most likely to be well-served by the open-source community.

Date: 2009-04-04 05:15 pm (UTC)
From: [identity profile] stormsweeper.livejournal.com
The trend in OSS is away from locking mechanisms entirely, I've found.

Date: 2009-04-03 11:59 pm (UTC)
jl8e: (Default)
From: [personal profile] jl8e
Because distributed locking is hard?

Date: 2009-04-04 12:35 am (UTC)
From: [identity profile] cattitude.livejournal.com
Distributed locking is always inefficient; in high-level languages (like perl) it's unusably inefficient. If you need distributed locking, get a distributed database engine and let it do the locking for you. Call it using the usual perl/database bindings.

Profile

mneme: (Default)
Joshua Kronengold

December 2024

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 28th, 2025 09:48 pm
Powered by Dreamwidth Studios