Skip to content
Permalink
Browse files

..

  • Loading branch information...
javahongxi committed Sep 21, 2018
1 parent 866f34b commit 1c7c548027368f3fe908276da29823d7bd759f26
Showing with 1 addition and 4 deletions.
  1. 0 mvnw
  2. +1 −4 whatsmars-redis/README.md
  3. BIN whatsmars-redis/jedis.png
0 mvnw 100644 → 100755
No changes.
@@ -3,17 +3,14 @@ Redis is an in-memory database that persists on disk. The data model is key-valu
but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets,
Hashes, HyperLogLogs, Bitmaps. https://redis.io http://redis.net.cn

### Spring Data Redis & Jedis/Lettuce
### Spring Data Redis
- Spring Data’s mission is to provide a familiar and consistent, Spring-based programming model
for data access while still retaining the special traits of the underlying data store.
- SDR对Redis的标准模式和Cluster模式进行了充分封装,但并未对客户端sharding进行良好封装,需要开发者自己实现,
这也是SDR和[Jedis](https://github.com/xetorthio/jedis)相比,唯一缺少的特性。另外,Redis官网给出了一个
Redis的Java客户端列表,SDR支持Jedis, [Lettuce](https://github.com/lettuce-io/lettuce-core) ['lɛtɪs],
Spring Boot 2.x默认使用Lettuce。
- Jedis实例是线程不安全的,在多线程的环境下,需要使用连接池,每个线程都使用自己的Jedis实例,当连接数增多时,
会消耗较多的物理资源。而Lettuce基于Netty,是一个可伸缩的线程安全的Redis客户端,支持同步、异步和响应式模式。
- Jedis相比Lettuce和[Redission](https://github.com/redisson/redisson),最大的特点是简单易集成,这从源代码量就可感受到。
- Jedis连接方式如图<br> ![jedis](jedis.png)

### Redis集群方案
早期Redis没有Cluster特性,而目前官方Cluster方案还有一些未解决或无法避免的问题,实践中广泛采用的集群方案仍然是客户端分片与
Binary file not shown.

0 comments on commit 1c7c548

Please sign in to comment.
You can’t perform that action at this time.