Skip to content

Commit dc84e68

Browse files
committed
Update release notes
1 parent a7f6f03 commit dc84e68

File tree

1 file changed

+74
-98
lines changed

1 file changed

+74
-98
lines changed

RELEASE-NOTES.txt

Lines changed: 74 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,64 @@
11
lettuce 4.0.Beta1 RELEASE NOTES
22

3-
This release is a major release that introduces numerous changes. lettuce coupled API and connection very tight together,
4-
like other clients, too. The connection and the different API's are now decoupled. All connections are backed now by stateful
5-
connection and the API, as you know it from `RedisConnection` or `RedisAsyncConnection`, just operates on the connection. This
6-
is also the reason, why all `...Connection` and `...AsyncConnection` interfaces are deprecated and replaced by new `...Commands`
7-
interfaces. To sum it up, a lot changed under the hood, read more in new segregated command interfaces about the new interfaces.
3+
This release is a major release that introduces numerous changes like stateful connections,
4+
the reactive API and many more. Lettuce 4.0 includes all features from lettuce 3.3.
85

9-
The cluster API was extended to run a command on multiple nodes and invocation to multi-key commands del, mget, mset and msetnx
10-
perform automatic pipelining if the keys belong to different slots/masters.
6+
This release contains some breaking changes. You may want to consult the
7+
wiki at https://github.com/mp911de/lettuce/wiki/Migration-from-3.x-to-4.x
8+
to check the migration guide.
119

12-
A couple of changes are breaking changes, and you need most likely to adopt your code to use lettuce 4.0.
13-
lettuce dropped Java 6 and 7 support and requires Java 8 to run. A couple API's changed, like the renaming of RedisPubSubConnection to RedisPubSubAsyncConnection. RedisPubSubConnection is now a synchronous API.
10+
The all `Redis...Connection` and `Redis...AsyncConnection` interfaces are deprecated and replaced by new `...Commands`
11+
interfaces.
1412

15-
lettuce 4.0 is needs Java 8 and cannot be used with Java 6 or 7.
13+
The cluster API was extended to run a command on multiple nodes and invocation
14+
to multi-key commands DEL, MGET, MSET and MSETNX perform automatic pipelining
15+
if the keys belong to different slots/masters.
1616

17-
If you need any support, meet lettuce at https://gitter.im/mp911de/lettuce
17+
A couple of changes are breaking changes, and you need most likely to adopt
18+
your code to use lettuce 4.0. lettuce 4.0 dropped Java 6 and 7 support and
19+
requires Java 8 to run.
1820

21+
lettuce 4.0 needs Java 8 and cannot be used with Java 6 or 7.
1922

20-
Rearchitecting the API
23+
If you need any support, meet lettuce at:
24+
25+
* Google Group: https://groups.google.com/d/forum/lettuce-redis-client-users
26+
* Gitter: https://gitter.im/mp911de/lettuce
27+
* Github Issues: https://github.com/mp911de/lettuce/issues
28+
29+
30+
Reactive API
2131
-----
22-
Lettuce provides right from the start two API's: Sync and async. Now comes a third one: Reactive. Behind the scenes, all commands are
23-
executed using netty and it does not really matter, from which API you come. But the connection resources (sockets, events)
24-
were bound to a particular API. If one wanted to use sync calls for a certain scenario, he had to create another connection to redis.
32+
Lettuce provides since its genesis two API's: Sync and async.
33+
Now comes a third one: Reactive.
34+
The reactive API uses rx-java and every command on the reactive API returns an Observable.
35+
36+
```java
37+
StatefulRedisConnection<String, String> connection = client.connect();
38+
RedisReactiveCommands<String, String> reactive = stateful.reactive();
39+
40+
Observable<String> observable = reactiveApi.keys("*");
41+
observable.subscribe();
42+
43+
// more sophisticated
2544

45+
reactive.keys("*").flatMap(reactive::del).subscribe();
46+
```
47+
48+
The command is only executed on a subscription to the Observable.
49+
Commands returning a collection, such as Lists or Sets,
50+
return Observables that provide the element type.
51+
The reactive API covers the same commands as the synchronous/asynchronous API's.
52+
53+
Read more: https://github.com/mp911de/lettuce/wiki/Reactive-API-(4.0)
54+
55+
Rearchitecting the API
56+
-----
57+
Before 4.0, connection resources (sockets, events) were bound to the particular API.
58+
If one wanted to use a different API, he had to create another connection to Redis.
2659
This coupling is loosed now. By calling `connect()` you will no longer get a synchronous connection, you will get a `StatefulRedisConnection`
27-
with the access to the sync, async and reactive interface.
60+
with the access to the synchronous, asynchronous and reactive API.
61+
All commands are executed using netty and it does not matter, from which API you come.
2862

2963
3.x code:
3064
```java
@@ -34,28 +68,35 @@ RedisConnection connection = client.connect();
3468
4.x code:
3569
```java
3670
StatefulRedisConnection stateful = client.connect();
71+
72+
RedisCommands commands = stateful.sync();
73+
74+
// still working
3775
RedisConnection connection = stateful.sync();
3876
```
3977

40-
The other `connect` methods like `connectAsync` and `connectSentinelAsync` will remain unchanged.
78+
The other `connect` methods like `connectAsync` and `connectSentinelAsync` are
79+
deprecated but remain unchanged.
4180

42-
Affected `connect` methods are:
81+
Breaking changes in `connect` methods are:
4382

4483
* `RedisClient.connect` (provides a `StatefulRedisConnection`)
4584
* `RedisClient.connectPubSub` (provides a `StatefulRedisPubSubConnection`)
46-
* `RedisClusterClient.connect` (provides a `StatefulRedisClusterConnection`)
85+
* `RedisClusterClient.connectCluster` (provides a `StatefulRedisClusterConnection`)
4786

48-
New connect methods:
87+
New `connect` methods:
4988

5089
* `RedisClient.connectSentinel` (provides a `StatefulRedisSentinelConnection`)
5190

5291
New segregated command interfaces
5392
-----
54-
Starting with reactive API's, another 13 interfaces will be provided with lettuce. This increases the count of
55-
types within the `com.lambdaworks.redis` package and the package gets messier again. In combination with the stateful connection
56-
the original `...Connection` or `...AsyncConnection` interfaces no longer reflect the real purpose. New `Commands` interfaces provide
57-
the same functionality and are located in `api.sync` and `api.async` packages (respective `cluster.api.sync`, `cluster.api.async` and so on
58-
for the Redis Cluster client and PubSub).
93+
Starting with reactive API's, another 13 interfaces will be provided with lettuce.
94+
This change increases the count of types within the `com.lambdaworks.redis`
95+
package and the package gets messier again. In combination with the stateful connection
96+
the original `...Connection` or `...AsyncConnection` interfaces no longer
97+
reflect the real purpose. New `Commands` interfaces provide the same
98+
functionality and are located in `api.sync` and `api.async` packages
99+
(respective `cluster.api.sync`, `cluster.api.async` and so on for the Redis Cluster client and PubSub).
59100

60101
The following interfaces are deprecated and substituted by new `...Commands` interfaces:
61102

@@ -85,73 +126,8 @@ The following interfaces are deprecated and substituted by new `...Commands` int
85126
* BaseRedisConnection
86127
* BaseRedisAsyncConnection
87128

88-
89-
### Migration Matrix sync API:
90-
91-
3.x package: `com.lambdaworks.redis`
92-
4.x package: `com.lambdaworks.redis.api.sync`
93-
94-
95-
New command interfaces:
96-
97-
* RedisCommands
98-
* RedisClusterCommands
99-
* BaseRedisComands
100-
* RedisHashCommands
101-
* RedisHLLCommands
102-
* RedisKeyCommands
103-
* RedisListCommands
104-
* RedisScriptingCommands
105-
* RedisServerCommands
106-
* RedisSetCommands
107-
* RedisSortedSetCommands
108-
* RedisStringsCommands
109-
* RedisTransactionalCommands
110-
* RedisPubSubCommands
111-
112-
### Migration Matrix async API:
113-
114-
3.x package: `com.lambdaworks.redis`
115-
4.x package: `com.lambdaworks.redis.api.async`
116-
117-
118-
New command interfaces:
119-
120-
* RedisAsyncCommands
121-
* RedisClusterAsyncCommands
122-
* BaseRedisAsyncCommands
123-
* RedisHashAsyncCommands
124-
* RedisHLLAsyncCommands
125-
* RedisKeyAsyncCommands
126-
* RedisListAsyncCommands
127-
* RedisScriptingAsyncCommands
128-
* RedisSentinelAsyncCommands
129-
* RedisServerAsyncCommands
130-
* RedisSetAsyncCommands
131-
* RedisSortedSetAsyncCommands
132-
* RedisStringAsyncCommands
133-
* RedisTransactionalAsyncCommands
134-
* RedisPubSubAsyncCommands
135-
136-
137-
### New interfaces providing observable commands:
138-
139-
4.x package: `com.lambdaworks.redis.api.rx`
140-
141-
New interfaces:
142-
143-
* BaseRedisRxConnection
144-
* RedisHashesRxConnection
145-
* RedisHLLRxConnection
146-
* RedisKeysRxConnection
147-
* RedisListsRxConnection
148-
* RedisScriptingRxConnection
149-
* RedisSentinelRxConnection
150-
* RedisServerRxConnection
151-
* RedisSetsRxConnection
152-
* RedisSortedSetsRxConnection
153-
* RedisStringsRxConnection
154-
* RedisTransactionalRxConnection
129+
See https://github.com/mp911de/lettuce/wiki/Migration-from-3.x-to-4.x#optional-changes
130+
for the migration matrix.
155131

156132
## New API's
157133

@@ -167,10 +143,10 @@ New interfaces:
167143
* Moved `CommandOutput` from `com.lambdaworks.redis.protocol` to `com.lambdaworks.redis.output`
168144
* Moved `SetArgs` from `com.lambdaworks.redis.protocol` to `com.lambdaworks.redis`
169145
* All connections are `AutoCloseable` so you can handle connections using try-with-resources.
170-
* `RedisFuture`s are based on `CompleteableFuture` and throw now any occured exception when accessing the value using `get()`.
146+
* `RedisFuture`s are based on `CompleteableFuture` and throw now any occurred exception when accessing the value using `get()`.
171147
Exceptions are passed down the `CompletionStage`s.
172148

173-
Advanced cluster API
149+
Advanced Cluster API
174150
-----
175151
The advanced cluster API allows to select nodes and run commands on the node selection:
176152

@@ -185,12 +161,12 @@ the result (CompletionStage) is available though AsyncExecutions.
185161

186162
Enhancements
187163
-----
188-
* Advanced cluster API (async) #78
164+
* Advanced Cluster API (async) #78
189165
* Improve HLL command interface #77
190166
* Move segregated API interfaces to own packages #76
191-
* Provide a stateful redis connection and decouple sync/async API from connection resources enhancement #75
167+
* Provide a stateful Redis connection and decouple sync/async API from connection resources #75
192168
* Reactive support #68
193-
* Pipelining for certain cluster commands enhancement #66
169+
* Pipelining for certain cluster commands #66
194170
* Drop support for Java 6 and Java 7 #50
195171
* Migrate RedisFuture to CompletionStage #48
196172

@@ -202,7 +178,7 @@ Other
202178
------
203179

204180

205-
lettuce requires a minimum of Java 8 to build and run. It is tested continuously against Redis 3.0.
181+
lettuce requires a minimum of Java 8 to build and run. It is tested continuously against the latest Redis source-build.
206182

207183
For complete information on lettuce see the websites:
208184

0 commit comments

Comments
 (0)