java - 基于 MySql/GigaSpaces/Netapp 的分布式锁服务

标签 java mysql locking distributed gigaspaces

<分区>

Disclaimer: I already asked this question, but without the deployment requirement. I got an answer that got 3 upvotes, and when I edited the question to include the deployment requirement the answer then became irrelevant. The reason I'm resubmitting is because SO considers the original question 'answered', even though I got no meaningful upvoted answer. I opened a uservoice submission about this problem. The reason I reposted is so StackOverflow consider the original question answered, so it doesn't show up on the 'unanswered questions' tab.

您会使用哪种分布式锁服务?

要求是:

  1. 可以从不同进程/机器看到的互斥(锁)
  2. 锁定...释放语义
  3. 一定超时后自动释放锁 - 如果锁持有者死亡,它将在 X 秒后自动释放
  4. Java 实现
  5. 轻松部署 - 除了 Netapp、MySql 或 GigaSpaces 之外,不得需要复杂的部署。必须与这些产品配合良好(尤其是 GigaSpaces - 这就是 TerraCotta 被排除在外的原因)。
  6. 很高兴拥有:.Net 实现
  7. 如果是免费的:死锁检测/缓解

我对“可以通过数据库完成”或“可以通过 JavaSpaces 完成”这样的回答不感兴趣 - 我知道。相关答案应仅包含现成的、开箱即用的、经过验证的实现。

最佳答案

您的 .Net 实现非常接近随 Java API 提供的现有开箱即用的锁定/解锁 API。看: http://www.gigaspaces.com/docs/JavaDoc8.0/org/openspaces/core/DefaultGigaMap.html

您可以在产品随附的 gs-openspaces-src.zip 文件中找到此 Java 类的源代码。与 Gigaspaces .Net API 相同应该是 straightfwd。

关于java - 基于 MySql/GigaSpaces/Netapp 的分布式锁服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1070495/

相关文章:

java - HQL - 从带有点分隔符的选择中获取结果

php - 存储用户在文本中输入的超链接

postgresql - 如何使用字符串作为 PostgreSQL 咨询锁的键?

sql-server - 长时间锁定记录是现代数据库系统的常见做法吗?

c - 在多线程程序中将全局数组锁定在需要重入的函数中?

java无法notify()线程?

java - Java游戏框架中静态 Controller 和非静态 Controller 的区别

java - 傅立叶变换得到大约一半错误输出

没有删除语句的MySQL复制

php - MySql 如何插入或更新 IF 重复的 2 个字段?