{"id":19695857,"url":"https://github.com/codislabs/nedis","last_synced_at":"2025-07-24T14:07:39.518Z","repository":{"id":57729546,"uuid":"41406342","full_name":"CodisLabs/nedis","owner":"CodisLabs","description":"An event-driven, asynchronous redis client based on netty","archived":false,"fork":false,"pushed_at":"2016-03-25T07:19:09.000Z","size":198,"stargazers_count":70,"open_issues_count":3,"forks_count":28,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-05T15:04:02.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodisLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-26T05:32:16.000Z","updated_at":"2024-09-10T12:15:15.000Z","dependencies_parsed_at":"2022-09-11T06:07:27.331Z","dependency_job_id":null,"html_url":"https://github.com/CodisLabs/nedis","commit_stats":null,"previous_names":["wandoulabs/nedis"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodisLabs%2Fnedis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodisLabs%2Fnedis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodisLabs%2Fnedis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodisLabs%2Fnedis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodisLabs","download_url":"https://codeload.github.com/CodisLabs/nedis/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251493940,"owners_count":21598199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T19:31:12.010Z","updated_at":"2025-04-29T11:31:45.127Z","avatar_url":"https://github.com/CodisLabs.png","language":"Java","readme":"# nedis\nAn event-driven, asynchronous redis client based on [netty](http://netty.io/)\n\n## How to use\nAdd this to your pom.xml. We deploy nedis to https://oss.sonatype.org.\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.wandoulabs.nedis\u003c/groupId\u003e\n  \u003cartifactId\u003enedis-client\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\nTo use it\n```java\nNedisClientPool nedisPool = NedisClientPoolBuilder.create().timeoutMs(5000)\n        .remoteAddress(\"rediserver\", 6379).build();\nNedisClient nedis = NedisUtils.newPooledClient(nedisPool);\nnedis.set(NedisUtils.toBytes(\"foo\"), NedisUtils.toBytes(\"bar\")).sync();\nbyte[] value = nedis.get(NedisUtils.toBytes(\"foo\")).sync().getNow();\nSystem.out.println(NedisUtils.bytesToString(value));\nnedis.close().sync();\n```\n\n**Java7 is required to build or use nedis.**\n\n## For codis users\nAdd this to your pom.xml.\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.wandoulabs.nedis\u003c/groupId\u003e\n  \u003cartifactId\u003ecodis-client\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\nTo use it\n```java\nRoundRobinNedisClientPool nedisPool = RoundRobinNedisClientPool.builder()\n        .poolBuilder(NedisClientPoolBuilder.create().timeoutMs(5000)).curatorClient(\"zkserver:2181\", 30000)\n        .zkProxyDir(\"/zk/codis/db_xxx/proxy\").build().sync().getNow();\nNedisClient nedis = NedisUtils.newPooledClient(nedisPool);\nnedis.set(NedisUtils.toBytes(\"foo\"), NedisUtils.toBytes(\"bar\")).sync();\nbyte[] value = nedis.get(NedisUtils.toBytes(\"foo\")).sync().getNow();\nSystem.out.println(NedisUtils.bytesToString(value));\nnedis.close().sync();\n```\n\n## Performance\nNedis is **NOT** faster than jedis, especially if you use it in a synchronized way. In nedis, the requests on the same connection will be pipelined automatically if possible, but it is still **NOT** faster than jedis if you explicitly use a pipeline when using jedis.\n\nSo please use nedis with caution.\n\nIf you are an expert of netty, you could try to use `EpollEventLoopGroup` and add `-Dio.netty.allocator.type=pooled`(default is `unpooled` in netty 4.0) when starting to increase performance.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodislabs%2Fnedis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodislabs%2Fnedis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodislabs%2Fnedis/lists"}