René's URL Explorer Experiment


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

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

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

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

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

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

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

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository
route-controllerfiles
route-actiondisambiguate
fetch-noncev2:a721bda0-8f9e-f7a6-e7c7-e4bbad387273
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-id9960:13F113:150409F:1C97284:6972A971
html-safe-noncedea68a45f379f59195e436fb6827527a818101b759c8aebd62a8854aadcadc31
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTYwOjEzRjExMzoxNTA0MDlGOjFDOTcyODQ6Njk3MkE5NzEiLCJ2aXNpdG9yX2lkIjoiNjU0NTUyNTc4MDAwNjQ4MDI0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf9a96626e8a256d8d52510fadb4d22e08c93168344199a85ac3ec20b90c136b3
hovercard-subject-tagrepository:143836886
github-keyboard-shortcutsrepository,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/pyb1993/JavaRedis
twitter:imagehttps://opengraph.githubassets.com/43200b6e5f85e56971e086ff1693721b02123d10b3bebbd4172561b06115b513/pyb1993/JavaRedis
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/43200b6e5f85e56971e086ff1693721b02123d10b3bebbd4172561b06115b513/pyb1993/JavaRedis
og:image:alt一个用java写的redis服务器. Contribute to pyb1993/JavaRedis development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneae357919e9cc5fb635a01c9a2cc530478d3ac85f55090215eb70e1beca3385ac
turbo-cache-controlno-preview
go-importgithub.com/pyb1993/JavaRedis git https://github.com/pyb1993/JavaRedis.git
octolytics-dimension-user_id14846733
octolytics-dimension-user_loginpyb1993
octolytics-dimension-repository_id143836886
octolytics-dimension-repository_nwopyb1993/JavaRedis
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
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
release625f1bd9f76a617a9c0729e2de91edb56b6ce42f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpyb1993%2FJavaRedis
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpyb1993%2FJavaRedis
Sign up https://patch-diff.githubusercontent.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=pyb1993%2FJavaRedis
Reloadhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis
Reloadhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis
Reloadhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis
pyb1993 https://patch-diff.githubusercontent.com/pyb1993
JavaRedishttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpyb1993%2FJavaRedis
Fork 15 https://patch-diff.githubusercontent.com/login?return_to=%2Fpyb1993%2FJavaRedis
Star 18 https://patch-diff.githubusercontent.com/login?return_to=%2Fpyb1993%2FJavaRedis
18 stars https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/stargazers
15 forks https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/forks
Branches https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/branches
Tags https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/tags
Activity https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/activity
Star https://patch-diff.githubusercontent.com/login?return_to=%2Fpyb1993%2FJavaRedis
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpyb1993%2FJavaRedis
Code https://patch-diff.githubusercontent.com/pyb1993/JavaRedis
Issues 0 https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/issues
Pull requests 0 https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/pulls
Actions https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/actions
Projects 0 https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/projects
Security 0 https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/security
Insights https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/pulse
Code https://patch-diff.githubusercontent.com/pyb1993/JavaRedis
Issues https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/issues
Pull requests https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/pulls
Actions https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/actions
Projects https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/projects
Security https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/security
Insights https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/pulse
Brancheshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/branches
Tagshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/tags
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/branches
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/tags
18 Commitshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/commits/master/
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/commits/master/
java_pid1167.hprof.hwcachehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/tree/master/java_pid1167.hprof.hwcache
java_pid1167.hprof.hwcachehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/tree/master/java_pid1167.hprof.hwcache
src/main/javahttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/tree/master/src/main/java
src/main/javahttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/tree/master/src/main/java
.DS_Storehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/.DS_Store
.DS_Storehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/.DS_Store
.gitignorehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/.gitignore
.gitignorehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/.gitignore
Netty_Demo_1.imlhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/Netty_Demo_1.iml
Netty_Demo_1.imlhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/Netty_Demo_1.iml
netty_demo_1.propertieshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/netty_demo_1.properties
netty_demo_1.propertieshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/netty_demo_1.properties
readMe.mdhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/readMe.md
readMe.mdhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/blob/master/readMe.md
READMEhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#这是一个用netty实现的redis服务器
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#目的有三
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#目前实现的功能
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#version-1架构
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#handler
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#编码解码
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#协议格式
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#数据库部分
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#实现了hyperloglog数据结构
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#基本原理
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://patch-diff.githubusercontent.com/pyb1993/JavaRedis#实现步骤
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#实现
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#实际上这几个参数一个都不能少否则误差就会变大原理和实现还是差距很大的具体推导感兴趣的自己取看paperredis源码里面给了paper的名字
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#version-2架构
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#-同步删除的策略
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#-异步删除的策略
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#上面这样做第一是对原来的redismap进行了封装但是并没有对原有的数据操作所以无论数据有多少都是o1的操作
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#第二所有转换都在主线程里面执行所以不需要考虑转换过程带来的线程安全的问题
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#第三转换完成之后就可以提交任务让异步线程也对该redishashmap进行操作了这个时候操作一定是线程安全的
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#第四一般这种操作竞争的程度并不高一共就几个异步线程进行操作所以性能损失不大而且每个操作很迅速所以自己写了一个简单的spin-lock用来进行保护即可具体内容见redisconcurrenthashmapclass
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#最后我们只需要在异步线程结束之后在主线程将状态转换回来即可这种情况下只能让主线程去轮训提交的异步任务的future只要future完成就执行对应的回调具体内容见expirefuturejava部分
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#此外还有一些小的优化这里就不一一赘述了
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#version-3
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#改动1--增加了对于渐进式rehash的支持为了达到这个目的我重写了redishashmap其实就是把jdk源码抄了一部分过来
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#改动2--增加了异步线程进行rehash的支持重点是确保线程安全使得删除过期rehash以及主线程rehash协作运行
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#思路设计
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#-渐进rehash的支持
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#-主线程渐进式rehash的逻辑
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#-异步线程的逻辑
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#-线程安全和性能的讨论
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#--锁的实现
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#-状态改变的条件
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#version-4
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#改动--针对gc频繁的问题将最常用的数据结构string改造为redisstring并且实现了一套对象池的技术手动管理很多对象的分配释放统计信息等策略
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#首先说明一下idea的来源由于运行的时候发现gc在高负载的时候非常的频繁差不多1s就会产生一次gc所以思考怎么解决这个问题
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#思路如下-首先我们需要知道gc频繁的原因因为每一次请求都会生成大量的临时对象
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#那么将新生代扩大是不是能够解决这个问题呢
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#这就得出一个结论必须将所有的string都替换成一个我们自己设计的可以池化的类型-redisstring
https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#这里实现的时候有这么一些难点
Readme https://patch-diff.githubusercontent.com/pyb1993/JavaRedis#readme-ov-file
Please reload this pagehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis
Activityhttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/activity
18 starshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/stargazers
2 watchinghttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/watchers
15 forkshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/forks
Report repository https://patch-diff.githubusercontent.com/contact/report-content?content_url=https%3A%2F%2Fgithub.com%2Fpyb1993%2FJavaRedis&report=pyb1993+%28user%29
Releaseshttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis/releases
Packages 0https://patch-diff.githubusercontent.com/users/pyb1993/packages?repo_name=JavaRedis
Please reload this pagehttps://patch-diff.githubusercontent.com/pyb1993/JavaRedis
Java 100.0% https://patch-diff.githubusercontent.com/pyb1993/JavaRedis/search?l=java
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.