René's URL Explorer Experiment


Title: GitHub - hackeryutu/JavaRedis: 一个用java写的redis服务器 · GitHub

Open Graph Title: GitHub - hackeryutu/JavaRedis: 一个用java写的redis服务器

X Title: GitHub - hackeryutu/JavaRedis: 一个用java写的redis服务器

Description: 一个用java写的redis服务器. Contribute to hackeryutu/JavaRedis development by creating an account on GitHub.

Open Graph Description: 一个用java写的redis服务器. Contribute to hackeryutu/JavaRedis development by creating an account on GitHub.

X Description: 一个用java写的redis服务器. Contribute to hackeryutu/JavaRedis development by creating an account on GitHub.

Opengraph URL: https://github.com/hackeryutu/JavaRedis

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/tree/*name(/*path)
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:4d070f94-d185-01b3-7723-2ac675db9742
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-idBD0C:21F6EA:194F383:237BC9A:6A4CBCB5
html-safe-noncedb05fcc8cb9bee099c60fc0351f796cbdaf70ef71cf01c44bef4f5298eb3da71
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDBDOjIxRjZFQToxOTRGMzgzOjIzN0JDOUE6NkE0Q0JDQjUiLCJ2aXNpdG9yX2lkIjoiNDQ4ODE1MzM2MzM4OTM5ODE5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac021c8ee3bf77dfc1416537ed8d72424848861152408fbd7e37f24ed892c56fbc
hovercard-subject-tagrepository:508964802
github-keyboard-shortcutsrepository,source-code,file-tree,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location//
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/hackeryutu/JavaRedis/tree/master
twitter:imagehttps://opengraph.githubassets.com/010695b213b857480a6133eb907bde057d04c53de782a5e463653421e928e545/hackeryutu/JavaRedis
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/010695b213b857480a6133eb907bde057d04c53de782a5e463653421e928e545/hackeryutu/JavaRedis
og:image:alt一个用java写的redis服务器. Contribute to hackeryutu/JavaRedis development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-cache
go-importgithub.com/hackeryutu/JavaRedis git https://github.com/hackeryutu/JavaRedis.git
octolytics-dimension-user_id16240260
octolytics-dimension-user_loginhackeryutu
octolytics-dimension-repository_id508964802
octolytics-dimension-repository_nwohackeryutu/JavaRedis
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id143836886
octolytics-dimension-repository_parent_nwopyb1993/JavaRedis
octolytics-dimension-repository_network_root_id143836886
octolytics-dimension-repository_network_root_nwopyb1993/JavaRedis
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec03e7e569190bc89b638cdd4acb4b6c6b38a170a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/hackeryutu/JavaRedis/tree/master#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhackeryutu%2FJavaRedis%2Ftree%2Fmaster
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhackeryutu%2FJavaRedis%2Ftree%2Fmaster
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=hackeryutu%2FJavaRedis
Reloadhttps://github.com/hackeryutu/JavaRedis/tree/master
Reloadhttps://github.com/hackeryutu/JavaRedis/tree/master
Reloadhttps://github.com/hackeryutu/JavaRedis/tree/master
hackeryutu https://github.com/hackeryutu
JavaRedishttps://github.com/hackeryutu/JavaRedis
pyb1993/JavaRedishttps://github.com/pyb1993/JavaRedis
Notifications https://github.com/login?return_to=%2Fhackeryutu%2FJavaRedis
Fork 0 https://github.com/login?return_to=%2Fhackeryutu%2FJavaRedis
Star 0 https://github.com/login?return_to=%2Fhackeryutu%2FJavaRedis
Code https://github.com/hackeryutu/JavaRedis
Pull requests 0 https://github.com/hackeryutu/JavaRedis/pulls
Actions https://github.com/hackeryutu/JavaRedis/actions
Projects https://github.com/hackeryutu/JavaRedis/projects
Security and quality 0 https://github.com/hackeryutu/JavaRedis/security
Insights https://github.com/hackeryutu/JavaRedis/pulse
Code https://github.com/hackeryutu/JavaRedis
Pull requests https://github.com/hackeryutu/JavaRedis/pulls
Actions https://github.com/hackeryutu/JavaRedis/actions
Projects https://github.com/hackeryutu/JavaRedis/projects
Security and quality https://github.com/hackeryutu/JavaRedis/security
Insights https://github.com/hackeryutu/JavaRedis/pulse
https://github.com/hackeryutu/JavaRedis
Brancheshttps://github.com/hackeryutu/JavaRedis/branches
Tagshttps://github.com/hackeryutu/JavaRedis/tags
https://github.com/hackeryutu/JavaRedis/branches
https://github.com/hackeryutu/JavaRedis/tags
18 Commitshttps://github.com/hackeryutu/JavaRedis/commits/master/
https://github.com/hackeryutu/JavaRedis/commits/master/
java_pid1167.hprof.hwcachehttps://github.com/hackeryutu/JavaRedis/tree/master/java_pid1167.hprof.hwcache
java_pid1167.hprof.hwcachehttps://github.com/hackeryutu/JavaRedis/tree/master/java_pid1167.hprof.hwcache
src/main/javahttps://github.com/hackeryutu/JavaRedis/tree/master/src/main/java
src/main/javahttps://github.com/hackeryutu/JavaRedis/tree/master/src/main/java
.DS_Storehttps://github.com/hackeryutu/JavaRedis/blob/master/.DS_Store
.DS_Storehttps://github.com/hackeryutu/JavaRedis/blob/master/.DS_Store
.gitignorehttps://github.com/hackeryutu/JavaRedis/blob/master/.gitignore
.gitignorehttps://github.com/hackeryutu/JavaRedis/blob/master/.gitignore
Netty_Demo_1.imlhttps://github.com/hackeryutu/JavaRedis/blob/master/Netty_Demo_1.iml
Netty_Demo_1.imlhttps://github.com/hackeryutu/JavaRedis/blob/master/Netty_Demo_1.iml
netty_demo_1.propertieshttps://github.com/hackeryutu/JavaRedis/blob/master/netty_demo_1.properties
netty_demo_1.propertieshttps://github.com/hackeryutu/JavaRedis/blob/master/netty_demo_1.properties
readMe.mdhttps://github.com/hackeryutu/JavaRedis/blob/master/readMe.md
readMe.mdhttps://github.com/hackeryutu/JavaRedis/blob/master/readMe.md
READMEhttps://github.com/hackeryutu/JavaRedis/tree/master
https://github.com/hackeryutu/JavaRedis/tree/master#这是一个用netty实现的redis服务器
https://github.com/hackeryutu/JavaRedis/tree/master#目的有三
https://github.com/hackeryutu/JavaRedis/tree/master#目前实现的功能
https://github.com/hackeryutu/JavaRedis/tree/master#version-1架构
https://github.com/hackeryutu/JavaRedis/tree/master#handler
https://github.com/hackeryutu/JavaRedis/tree/master#编码解码
https://github.com/hackeryutu/JavaRedis/tree/master#协议格式
https://github.com/hackeryutu/JavaRedis/tree/master#数据库部分
https://github.com/hackeryutu/JavaRedis/tree/master#实现了hyperloglog数据结构
https://github.com/hackeryutu/JavaRedis/tree/master#基本原理
https://www.codecogs.com/eqnedit.php?latex=$&space;P(X_i&space;<=&space;K)&space;=&space;(1&space;-&space;(1/2)^k)^n$
https://www.codecogs.com/eqnedit.php?latex=\bg_black&space;\large&space;$&space;1&space;-&space;(1&space;-&space;(1/2)^{k-1})^n&space;$
https://www.codecogs.com/eqnedit.php?latex=\large&space;$&space;2^K&space;$
https://github.com/hackeryutu/JavaRedis/tree/master#实现步骤
https://github.com/hackeryutu/JavaRedis/tree/master#实现
https://github.com/hackeryutu/JavaRedis/tree/master#实际上这几个参数一个都不能少否则误差就会变大原理和实现还是差距很大的具体推导感兴趣的自己取看paperredis源码里面给了paper的名字
https://github.com/hackeryutu/JavaRedis/tree/master#version-2架构
https://github.com/hackeryutu/JavaRedis/tree/master#-同步删除的策略
https://github.com/hackeryutu/JavaRedis/tree/master#-异步删除的策略
https://github.com/hackeryutu/JavaRedis/tree/master#上面这样做第一是对原来的redismap进行了封装但是并没有对原有的数据操作所以无论数据有多少都是o1的操作
https://github.com/hackeryutu/JavaRedis/tree/master#第二所有转换都在主线程里面执行所以不需要考虑转换过程带来的线程安全的问题
https://github.com/hackeryutu/JavaRedis/tree/master#第三转换完成之后就可以提交任务让异步线程也对该redishashmap进行操作了这个时候操作一定是线程安全的
https://github.com/hackeryutu/JavaRedis/tree/master#第四一般这种操作竞争的程度并不高一共就几个异步线程进行操作所以性能损失不大而且每个操作很迅速所以自己写了一个简单的spin-lock用来进行保护即可具体内容见redisconcurrenthashmapclass
https://github.com/hackeryutu/JavaRedis/tree/master#最后我们只需要在异步线程结束之后在主线程将状态转换回来即可这种情况下只能让主线程去轮训提交的异步任务的future只要future完成就执行对应的回调具体内容见expirefuturejava部分
https://github.com/hackeryutu/JavaRedis/tree/master#此外还有一些小的优化这里就不一一赘述了
https://github.com/hackeryutu/JavaRedis/tree/master#version-3
https://github.com/hackeryutu/JavaRedis/tree/master#改动1--增加了对于渐进式rehash的支持为了达到这个目的我重写了redishashmap其实就是把jdk源码抄了一部分过来
https://github.com/hackeryutu/JavaRedis/tree/master#改动2--增加了异步线程进行rehash的支持重点是确保线程安全使得删除过期rehash以及主线程rehash协作运行
https://github.com/hackeryutu/JavaRedis/tree/master#思路设计
https://github.com/hackeryutu/JavaRedis/tree/master#-渐进rehash的支持
https://github.com/hackeryutu/JavaRedis/tree/master#-主线程渐进式rehash的逻辑
https://github.com/hackeryutu/JavaRedis/tree/master#-异步线程的逻辑
https://github.com/hackeryutu/JavaRedis/tree/master#-线程安全和性能的讨论
https://github.com/hackeryutu/JavaRedis/tree/master#--锁的实现
https://github.com/hackeryutu/JavaRedis/tree/master#-状态改变的条件
https://github.com/hackeryutu/JavaRedis/tree/master#version-4
https://github.com/hackeryutu/JavaRedis/tree/master#改动--针对gc频繁的问题将最常用的数据结构string改造为redisstring并且实现了一套对象池的技术手动管理很多对象的分配释放统计信息等策略
https://github.com/hackeryutu/JavaRedis/tree/master#首先说明一下idea的来源由于运行的时候发现gc在高负载的时候非常的频繁差不多1s就会产生一次gc所以思考怎么解决这个问题
https://github.com/hackeryutu/JavaRedis/tree/master#思路如下-首先我们需要知道gc频繁的原因因为每一次请求都会生成大量的临时对象
https://github.com/hackeryutu/JavaRedis/tree/master#那么将新生代扩大是不是能够解决这个问题呢
https://github.com/hackeryutu/JavaRedis/tree/master#这就得出一个结论必须将所有的string都替换成一个我们自己设计的可以池化的类型-redisstring
https://github.com/hackeryutu/JavaRedis/tree/master#这里实现的时候有这么一些难点
Readme https://github.com/hackeryutu/JavaRedis/tree/master#readme-ov-file
Please reload this pagehttps://github.com/hackeryutu/JavaRedis/tree/master
Activityhttps://github.com/hackeryutu/JavaRedis/activity
0 forkshttps://github.com/hackeryutu/JavaRedis/forks
Report repository https://github.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fhackeryutu%2FJavaRedis&report=hackeryutu+%28user%29
Releaseshttps://github.com/hackeryutu/JavaRedis/releases
Packages 0https://github.com/users/hackeryutu/packages?repo_name=JavaRedis
Please reload this pagehttps://github.com/hackeryutu/JavaRedis/tree/master
Contributorshttps://github.com/hackeryutu/JavaRedis/graphs/contributors
Please reload this pagehttps://github.com/hackeryutu/JavaRedis/tree/master
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.