TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Locks, leases, fencing tokens, FizzBee

57 pointsby azhenleyabout 2 months ago

5 comments

singronabout 2 months ago
You can fix this scenario by incrementing the next_token when you commit the critical section instead of when you enter (if that&#x27;s possible for your domain). This essentially makes it an optimistic lock instead of a pessimistic lock. Two threads can get the same fence token, but only one will be able to commit.<p>You can often rephrase and algorithm without a commit step into one that has one, although sometimes it can feel more complicated. E.g. instead of doing A and B in a critical section, commit an intent to do A and B, and then let an idempotent process execute that intent.
pehejeabout 2 months ago
Can someone explain to me how it makes sense that you want to define a locking mechanism using.. locking mechanism (the &quot;atomic&quot;). Does this mean that in an actual implementation you would have to drop down to some hardware-level-atomic operation, and is that even practical?<p>Also won&#x27;t fencing token require some kind of token manager, that ensures you must present the highest token to do the action, and that you have to ask to get a new token, and that when you fail because your token is too old you must re-request one, is this modelled?
评论 #43447467 未加载
macintuxabout 2 months ago
Very nice write-up. First time I’ve finished an article about formal proofs and thought to myself I’d like to give it a try.
shermantanktopabout 2 months ago
Remind me again why I would want to pull consistency guarantees out of an actual datastore (which is designed to provide those guarantees) and force-fit that problem into a fancy caching layer?<p>The Kleppman critique about efficiency vs correctness is exactly right. Redis for efficiency is great as a work-saving optimization. Redis for correctness (assuming it is possible) asks a remote system to enforce behavior at a far remove from the place where correctness is evident, which is system state, usually data in a datastore.
评论 #43447289 未加载
评论 #43450444 未加载
legerdemainabout 2 months ago
The creator of FizzBee presented it at the most recent meeting of the SF Systems Club. The talk was some kind of meandering hybrid between presentation and tutorial and went far over time, but FizzBee itself sounds rich in features and simple to use. Its creator is pitching it as an easy-to-use verification tool for software teams in industry to document and verify the systems they&#x27;re building.