常用分布式工具组件 distributed-tool V1.4 发布

分布式常用工具组件 distributed-tool V1.4 发布了,之前版本,只支持redis的单点连接,1.4之后,新增支持了哨兵模式部署的redis连接方式。初始化方式:

//哨兵地址端口集合
Set<String> sentinelSet = new HashSet<>();
sentinelSet.add("ip:port");
sentinelSet.add("ip:port");
//其中mymaster是redis的master节点,xxx是密码,如果需要
Dt.getInstance().initJedisSentinel("mymaster", sentinelSet, "xxx");

当然,目前这个工具,暂时还不支持多master集群方式部署的redis连接。后续会跟进。在主备+哨兵模式下的redis方式,分布式锁和分布式信号量,在master挂掉,slave切换master的情况下,如果数据节点同步不及时,可能会有点问题。后面看看怎么优化下。 

distributed-tool 是一个分布式常用工具组件。其中包括但不限于:分布式List、分布式Set、分布式Long、分布式信号量、分布式缓存、分布式锁、分布式序列号生成器、分布式订阅发布模式等常用工具类。

目前微服务开发的系统很多,这个就涉及到分布式集群问题。像以前如果是单机,那么这些解决方案都可以使用JVM的API来实现,但在分布式环境下,这些API都不可用,所以急需一套分布式的API来支持这种常用操作,那么我来提供了,后面持续添加各种分布式常用工具类。

转载于:https://my.oschina.net/u/3961368/blog/1944667

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Computers and computer networks are one of the most incredible inventions of the 20th century, having an ever-expanding role in our daily lives by enabling complex human activities in areas such as entertainment, education, and commerce. One of the most challenging problems in computer science for the 21st century is to improve the design of distributed systems where computing devices have to work together as a team to achieve common goals. In this book, I have tried to gently introduce the general reader to some of the most fundamental issues and classical results of computer science underlying the design of algorithms for distributed systems, so that the reader can get a feel of the nature of this exciting and fascinating field called distributed computing. The book will appeal to the educated layperson and requires no computer-related background. I strongly suspect that also most computer-knowledgeable readers will be able to learn something new. Gadi Taubenfeld is a professor and past dean of the School of Computer Science at the Interdisciplinary Center in Herzliya, Israel. He is an established authority in the area of concurrent and distributed computing and has published widely in leading journals and conferences. He authored the book Synchronization Algorithms and Concurrent Programming, published by Pearson Education. His primary research interests are in concurrent and distributed computing. Gadi was the head of the computer science division at Israel's Open University; member of technical staff at AT&T Bell Laboratories; consultant to AT&T Labs–Research; and a research scientist and lecturer at Yale University. Gadi served as the program committee chair of PODC 2013 and DISC 2008 and holds a Ph.D. in Computer Science from the Technion–Israel Institute of Technology.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值