@objectstack/service-cluster-redis 9.4.0 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +11 -0
- package/README.md +59 -0
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/service-cluster-redis@9.
|
|
2
|
+
> @objectstack/service-cluster-redis@9.5.0 build /home/runner/work/framework/framework/packages/services/service-cluster-redis
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
13
|
[32mESM[39m [1mdist/index.js [22m[32m13.20 KB[39m
|
|
14
14
|
[32mESM[39m [1mdist/index.js.map [22m[32m37.77 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 848ms
|
|
16
16
|
[32mCJS[39m [1mdist/index.cjs [22m[32m14.57 KB[39m
|
|
17
17
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m35.24 KB[39m
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 854ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 13544ms
|
|
21
21
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m9.99 KB[39m
|
|
22
22
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m9.99 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @objectstack/service-cluster-redis
|
|
2
2
|
|
|
3
|
+
## 9.5.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d08551c]
|
|
8
|
+
- Updated dependencies [707aeed]
|
|
9
|
+
- Updated dependencies [7a103d4]
|
|
10
|
+
- Updated dependencies [4b01250]
|
|
11
|
+
- @objectstack/spec@9.5.0
|
|
12
|
+
- @objectstack/service-cluster@9.5.0
|
|
13
|
+
|
|
3
14
|
## 9.4.0
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @objectstack/service-cluster-redis
|
|
2
|
+
|
|
3
|
+
Redis driver for `@objectstack/service-cluster` — implements the cluster
|
|
4
|
+
primitives `IPubSub` / `ILock` / `IKV` / `ICounter` against Redis using
|
|
5
|
+
[`ioredis`](https://github.com/redis/ioredis).
|
|
6
|
+
|
|
7
|
+
## Status: community-optional reference driver
|
|
8
|
+
|
|
9
|
+
This package is the **reference remote driver** that proves the
|
|
10
|
+
`registerClusterDriver()` SPI. It is **not** on the ObjectStack Cloud or
|
|
11
|
+
ObjectOS EE deployment path — both run **Redis-free** (single-node-affinity
|
|
12
|
+
routing + DB-backed queue/coordination). It is maintained as long as the
|
|
13
|
+
cluster driver SPI is stable, but it is **not operated or supported by
|
|
14
|
+
ObjectStack** as part of the managed/enterprise runtime.
|
|
15
|
+
|
|
16
|
+
Reach for it only when you self-host **multiple replicas that must share
|
|
17
|
+
cluster primitives** with low latency — e.g. sub-second cross-process pub/sub
|
|
18
|
+
or high-frequency cross-process locks. For most deployments the default
|
|
19
|
+
`memory` driver (single process) or the DB-backed queue is sufficient; see
|
|
20
|
+
`@objectstack/service-cluster` for when a remote driver is actually needed.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm add @objectstack/service-cluster @objectstack/service-cluster-redis ioredis
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
Importing the package once at process start self-registers the `'redis'`
|
|
31
|
+
driver, which `defineCluster({ driver: 'redis' })` then resolves.
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { ObjectKernel } from '@objectstack/core';
|
|
35
|
+
import { ClusterServicePlugin } from '@objectstack/service-cluster';
|
|
36
|
+
import '@objectstack/service-cluster-redis'; // self-registers the 'redis' driver
|
|
37
|
+
|
|
38
|
+
const kernel = new ObjectKernel();
|
|
39
|
+
kernel.use(new ClusterServicePlugin({
|
|
40
|
+
config: {
|
|
41
|
+
driver: 'redis',
|
|
42
|
+
url: process.env.REDIS_URL ?? 'redis://localhost:6379',
|
|
43
|
+
nodeId: 'web-1',
|
|
44
|
+
},
|
|
45
|
+
}));
|
|
46
|
+
await kernel.bootstrap();
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
You can also build the service directly with `defineCluster({ driver: 'redis', url, nodeId })`,
|
|
50
|
+
or pass a shared ioredis client via `driverOptions.client`.
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
Apache-2.0. See [LICENSING.md](../../../LICENSING.md).
|
|
55
|
+
|
|
56
|
+
## See Also
|
|
57
|
+
|
|
58
|
+
- [@objectstack/service-cluster](../service-cluster) — primitives, SPI, and the
|
|
59
|
+
default in-process `memory` driver
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/service-cluster-redis",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Redis cluster driver for ObjectStack — implements IPubSub/ILock/IKV/ICounter against Redis using ioredis.",
|
|
6
6
|
"type": "module",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"ioredis": "^5.11.1",
|
|
18
|
-
"@objectstack/service-cluster": "9.
|
|
19
|
-
"@objectstack/spec": "9.
|
|
18
|
+
"@objectstack/service-cluster": "9.5.0",
|
|
19
|
+
"@objectstack/spec": "9.5.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^25.9.2",
|