News for hackers. Stuff that matters.
Re:Show HN: Lockable – sync locks for distributed systems by GordonS on Saturday June 18, 2022 @07:59AM (#31789085)
Random thought - doesn't S3 have a leasing/locking system that could be used for distributed locks?
Re:Show HN: Lockable – sync locks for distributed systems by keyless_ on Saturday June 18, 2022 @08:12AM (#31789154)
Unfortunately, it doesn't. That was actually the reason I built this originally - there's no easy way to control read/write access to a file on S3 without using some sort of external locking system.
Re:Show HN: Lockable – sync locks for distributed systems by IanCal on Saturday June 18, 2022 @09:12AM (#31789527)
You can add locks to objects, which restricts who can delete them and how, but requires bucket wide settings.
Re:Show HN: Lockable – sync locks for distributed systems by maest on Saturday June 18, 2022 @12:42PM (#31791474)
BTW, this is true, but that is not locking in the "sync locking" sense.
Re:Show HN: Lockable – sync locks for distributed systems by IanCal on Saturday June 18, 2022 @05:30PM (#31794005)
It's not the intended purpose but they can be used like this. Lock files can be written, will fail if they already exist - that gets you a distributed equivalent to flock doesn't it?
Re:Show HN: Lockable – sync locks for distributed systems by GordonS on Saturday June 18, 2022 @10:09AM (#31789975)
Have you looked at Azure Blob Storage's lock feature? Could that be used?
Re:Show HN: Lockable – sync locks for distributed systems by killingtime74 on Saturday June 18, 2022 @08:16AM (#31789170)
Did Zookeeper or Etcd not suit your needs?
Re:Show HN: Lockable – sync locks for distributed systems by keyless_ on Saturday June 18, 2022 @08:56AM (#31789419)
They are valid solutions for this use-case; the main drawback is you need to set up and maintain a ZooKeeper cluster. Lockable is intended as a simpler and faster-to-use alternative.
Re:Show HN: Lockable – sync locks for distributed systems by nijave on Saturday June 18, 2022 @09:03AM (#31789477)
AWS recommends using dynamo and has a Java reference implementation. Afaik GCP doesn't support locks either. Azure supports locks on blob store (their object store service)
Re:Show HN: Lockable – sync locks for distributed systems by GordonS on Saturday June 18, 2022 @10:08AM (#31789964)
Ah, someone mentioned it in reference to Azure Blob Storage recently, and I had (apparently incorrectly) assumed it was also an S3 feature.

Any reason Azure Blob Storage couldn't be used as a no-setup, managed, cheap way to acquire distributed locks?

Re:Show HN: Lockable – sync locks for distributed systems by skyde on Saturday June 18, 2022 @11:33AM (#31790763)
azure blob store is literally used as a cheap way to acquire distributed lock today by the azure sdk.

if you look at azure event hub library they use blob as lock to partition the consumer instances at runtime.