十. redis java client
2011-02-16 10:50
141 查看
redis主页上列出的java 客户端有JDBC-Redis JRedis Jedis三种,下面分别介绍三种客户端的优缺点及其他相关的工具.
JDBC-Redis
JDBC-Redis is just a JDBC wrapper for JRedis database.
If you plan on using your code with different back-ends then JDBC is a good way to go. NOTE: It is not a complete JDBC implementation and the NOSQL will bleed through.
If you are going to stay with Redis then I would suggest using the API, which will give you more flexibility. Use a DAO layer pattern to encapsulate your DB Access and down the road that is all you will need to change.
- Romain Hippeau
Redis syntax is completely different from standard SQL so using JDBC doesn't help encapsulating different back-ends as you suggest: I would have to write new queries anyway... – muriloq Jun 16 '10 at 14:00
@muriloq - but the mechanical acquiring and releasing resources is standard. – Romain Hippeau
spring wrapper
Spring provides a wrapper around both implementations(Jredis Jedis) and they're providing serialization/deserialization, amongst other things:
上面的方法可能已经调整,请参见最新的 http://static.springsource.org/spring-data/data-keyvalue/docs/1.0.0.M2/reference/html/#redis
spring nosql/cross-store
prototype implementation allowing entities to be stored in multiple types of data stores (i.e. JPA and Neo4j or JPA and Redis etc.)
JOhm
JOhm is a blazingly fast Object-Hash Mapping library for Java inspired by the awesome Ohm. The JOhm OHM is a modern-day avatar of the old ORM's like Hibernate with the difference being that we are not dealing with an RDBMS here but with a NoSQL rockstar.
homepage:https://github.com/xetorthio/johm
参考:
http://stackoverflow.com/questions/3047010/best-redis-library-for-java
https://github.com/xetorthio/johm
支持redis版本 | 性能 | 维护 | 推荐 | |
JDBC-Redis | not good | |||
JRedis | 1.2.n release 2.0.0 尚未release版本 | fast | ||
Jedis | 2.0.0 release | fast | actively developed | 推荐 |
JDBC-Redis
JDBC-Redis is just a JDBC wrapper for JRedis database.
If you plan on using your code with different back-ends then JDBC is a good way to go. NOTE: It is not a complete JDBC implementation and the NOSQL will bleed through.
If you are going to stay with Redis then I would suggest using the API, which will give you more flexibility. Use a DAO layer pattern to encapsulate your DB Access and down the road that is all you will need to change.
- Romain Hippeau
Redis syntax is completely different from standard SQL so using JDBC doesn't help encapsulating different back-ends as you suggest: I would have to write new queries anyway... – muriloq Jun 16 '10 at 14:00
@muriloq - but the mechanical acquiring and releasing resources is standard. – Romain Hippeau
spring wrapper
Spring provides a wrapper around both implementations(Jredis Jedis) and they're providing serialization/deserialization, amongst other things:
Person p = new Person("Joe", "Trader", 33); template.convertAndSet("trader:1", p); Person samePerson = template.getAndConvert("trader:1", Person.class); Assert.assertEquals(p, samePerson);
上面的方法可能已经调整,请参见最新的 http://static.springsource.org/spring-data/data-keyvalue/docs/1.0.0.M2/reference/html/#redis
spring nosql/cross-store
prototype implementation allowing entities to be stored in multiple types of data stores (i.e. JPA and Neo4j or JPA and Redis etc.)
JOhm
JOhm is a blazingly fast Object-Hash Mapping library for Java inspired by the awesome Ohm. The JOhm OHM is a modern-day avatar of the old ORM's like Hibernate with the difference being that we are not dealing with an RDBMS here but with a NoSQL rockstar.
homepage:https://github.com/xetorthio/johm
参考:
http://stackoverflow.com/questions/3047010/best-redis-library-for-java
https://github.com/xetorthio/johm
相关文章推荐
- Redis Java Client Jedis
- 十. redis java client
- Intro to Jedis – the Java Redis Client Library
- 十. redis java client
- Redis c/c++, java client连接
- 四、Java内存数据库实践之深入浅出Redis - Java Client - Jedis的使用
- 3、redis之java client环境搭建
- Redis面向java的Client
- Java链接Redis时出现 “ERR Client sent AUTH, but no password is set” 异常的原因及解决办法
- Redis c/c++, java client连接
- Redis Java Client Jedis 源码分析
- Redis java client ==> Jedis
- 基于Java Client的Redis与Tarantool HASH性能对比
- redis java client测试
- java redis client jedis 测试
- Quick to Redis,Java Client:Jedis in Action
- Redis java demo
- Redis之java增删改查
- redis-cli ping Java 实现
- java之httpclient的一些破事