alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.02k stars 12.8k forks source link

[GLCC 2023] 提供分布式锁的能力 / Provide Ability for distributed locks. #10378

Open KomachiSion opened 1 year ago

KomachiSion commented 1 year ago

GitLink编程夏令营(GLCC),是在CCF中国计算机学会指导下,由CCF开源发展委员会(CCF ODC)举办的面向全国高校学生的暑期编程活动。活动将覆盖近千所高校,并联合各大开源基金会、开源企业、开源社区、开源专家,旨在鼓励青年学生通过参加真实的开源软件开发,提升自身技术能力,为开源社区输送优秀人才。为青年学生提供开放友好的交流平台,希望进一步推动国内开源社区的繁荣发展。

Nacos将会作为指导组织参加本次的“GitLink编程夏令营(GLCC)”

背景

Nacos 社区向社区用户征集Nacos3.0中期望的功能中,支持分布式锁的功能是呼声最高的功能之一。分布式锁作为分布式应用常用功能,目前主要有Zookeeper或redis产品来实现,许多用户已经使用Nacos替换Zookeeper进行服务管理和配置管理, 但由于Nacos无法支持分布式锁的功能,无法移除Zookeeper的依赖,还需要额外运维Zookeeper集群。如果Nacos能够实现分布式锁功能,能在一定程度帮助用户减少依赖系统,降低微服务应用架构的复杂度。

由于分布式锁的原理和实现较为复杂,同学可以提前学习Zookeeper和Redis等现有产品的分布式锁实现原理和方式,并参考其实现方式进行方案设计,但不可以直接照搬或抄袭。

目标

提供类似Zookeeper或redis的分布式锁的功能;如果有余力可以给予该分布式锁功能添加协助用户服务选主的功能。

难度

进阶

导师

王建伟 786594722@qq.com

产出要求

能力要求


GitLink Programming Summer Camp (GLCC) is a summer programming activity for college students nationwide, under the guidance of the China Computer Federation (CCF) and organized by the CCF Open Source Development Committee (CCF ODC). The event will cover nearly a thousand colleges and universities, and will unite various open source foundations, enterprises, communities, and experts with the aim of encouraging young students to participate in real open source software development, enhancing their technical skills, and providing outstanding talent for the open source community. GLCC also provides an open and friendly platform for young students to communicate and hopes to further promote the prosperity and development of the domestic open source community.

Nacos will participate as a guiding organization in “GitLink Programming Summer Camp (GLCC)”.

Background

The Nacos community is soliciting the desired features for Nacos 3.0 from users. Among these features, Provide Ability for distributed locks is one of the most requested ones. As a common feature in distributed applications, currently, Zookeeper or Redis are mainly used to implement distributed locks. Many users have already replaced Zookeeper with Nacos for service and configuration management, but because Nacos cannot support distributed lock functionality, it cannot remove the Zookeeper dependency and additional maintain Zookeeper cluster. If Nacos can implement distributed lock feature, it can help users reduce system dependencies to some extent and reduce the complexity of microservice application architecture.

Due to the principle and implementation of distributed lock is relatively complex, students can learn the implementation principles and methods of distributed locks in existing products such as Zookeeper and Redis in advance, and refer to their implementation way for program design, but copying or directly using their way is not allowed.

Target

Provide distributed lock functionality similar to Zookeeper or Redis; if possible, add feature to assist users in selecting the leader service for this distributed lock.

Difficulty

Advanced

Mentor

Jianwei Wang 786594722@qq.com

Output Requirements

Technical Requirements

azhsmesos commented 1 year ago
lutcoding commented 1 year ago

了解etcd基于mvcc实现的分布式锁源码,但不太会java,有资格参加吗

li-xiao-shuang commented 1 year ago

终于搞起来了啊👍🏻👍🏻👍🏻

scwlkq commented 1 year ago

zhgg牛

KomachiSion commented 1 year ago

课题转移到 “GitLink编程夏令营(GLCC)”

https://www.gitlink.org.cn/KomachiSion/nacos/issues/1