infinispan 0.13.0 → 0.14.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/Dockerfile.server +8 -0
- package/README.md +4 -10
- package/docker-compose.yml +272 -0
- package/gen-asciidoc.sh +46 -0
- package/lib/codec.js +358 -27
- package/lib/functional.js +40 -7
- package/lib/infinispan.js +503 -52
- package/lib/io.js +399 -43
- package/lib/listeners.js +50 -3
- package/lib/near-cache.js +99 -0
- package/lib/protocols.js +560 -75
- package/lib/sasl/digest.js +22 -17
- package/lib/sasl/external.js +7 -4
- package/lib/sasl/factory.js +6 -5
- package/lib/sasl/oauthbearer.js +7 -5
- package/lib/sasl/plain.js +6 -4
- package/lib/sasl/scram.js +19 -11
- package/lib/utils.js +89 -24
- package/package.json +2 -2
- package/run-docker-testsuite.sh +72 -0
- package/types/index.d.ts +192 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
FROM quay.io/infinispan/server:16.1.3
|
|
2
|
+
|
|
3
|
+
# Install Nashorn script engine for server-side JavaScript execution
|
|
4
|
+
RUN /opt/infinispan/bin/cli.sh install org.openjdk.nashorn:nashorn-core:15.4 && \
|
|
5
|
+
/opt/infinispan/bin/cli.sh install org.ow2.asm:asm:9.4 && \
|
|
6
|
+
/opt/infinispan/bin/cli.sh install org.ow2.asm:asm-commons:9.4 && \
|
|
7
|
+
/opt/infinispan/bin/cli.sh install org.ow2.asm:asm-tree:9.4 && \
|
|
8
|
+
/opt/infinispan/bin/cli.sh install org.ow2.asm:asm-util:9.4
|
package/README.md
CHANGED
|
@@ -107,16 +107,10 @@ To run the testsuite once execute:
|
|
|
107
107
|
$ ./run-testsuite.sh
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
To run tests continuously execute:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
$ ./node_modules/.bin/jasmine-node spec --autotest --watch lib --captureExceptions
|
|
114
|
-
```
|
|
115
|
-
|
|
116
110
|
To run individual tests execute:
|
|
117
111
|
|
|
118
112
|
```bash
|
|
119
|
-
$
|
|
113
|
+
$ npx jasmine spec/infinispan_local_spec.js
|
|
120
114
|
```
|
|
121
115
|
|
|
122
116
|
To help with testing, you can quickly run the smoke tests via:
|
|
@@ -150,7 +144,7 @@ sudo route add -net 232.0.0.0/5 192.168.1.3
|
|
|
150
144
|
The testsuite now contains manual stress tests that take several minutes to run.
|
|
151
145
|
To run these tests, execute:
|
|
152
146
|
|
|
153
|
-
$
|
|
147
|
+
$ npx jasmine spec-manual/*_spec.js
|
|
154
148
|
|
|
155
149
|
|
|
156
150
|
# Memory profiling
|
|
@@ -173,11 +167,11 @@ Within Chrome, the Developer Tools UI contains a `Memory` tab where heap dumps c
|
|
|
173
167
|
|
|
174
168
|
To debug tests with IDE:
|
|
175
169
|
|
|
176
|
-
node --inspect-brk node_modules/jasmine
|
|
170
|
+
node --inspect-brk node_modules/.bin/jasmine spec/codec_spec.js
|
|
177
171
|
|
|
178
172
|
Or:
|
|
179
173
|
|
|
180
|
-
node --inspect-brk node_modules/jasmine
|
|
174
|
+
node --inspect-brk node_modules/.bin/jasmine spec/infinispan_local_spec.js
|
|
181
175
|
|
|
182
176
|
And then start a remote Node.js debugger from IDE on port 9229.
|
|
183
177
|
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
services:
|
|
2
|
+
# Standalone server for local tests
|
|
3
|
+
server-local:
|
|
4
|
+
build:
|
|
5
|
+
context: .
|
|
6
|
+
dockerfile: Dockerfile.server
|
|
7
|
+
container_name: ispn-local
|
|
8
|
+
hostname: server-local
|
|
9
|
+
volumes:
|
|
10
|
+
- ./spec/configs/infinispan.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
11
|
+
environment:
|
|
12
|
+
USER: admin
|
|
13
|
+
PASS: pass
|
|
14
|
+
JAVA_OPTIONS: >-
|
|
15
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
16
|
+
healthcheck:
|
|
17
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/default/health/status || exit 1"]
|
|
18
|
+
start_period: 30s
|
|
19
|
+
interval: 5s
|
|
20
|
+
timeout: 5s
|
|
21
|
+
retries: 30
|
|
22
|
+
networks:
|
|
23
|
+
ispn:
|
|
24
|
+
|
|
25
|
+
# Cluster nodes (3-node)
|
|
26
|
+
server-one:
|
|
27
|
+
build:
|
|
28
|
+
context: .
|
|
29
|
+
dockerfile: Dockerfile.server
|
|
30
|
+
container_name: ispn-cluster-1
|
|
31
|
+
hostname: server-one
|
|
32
|
+
volumes:
|
|
33
|
+
- ./spec/configs/docker/infinispan-clustered.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
34
|
+
environment:
|
|
35
|
+
USER: admin
|
|
36
|
+
PASS: pass
|
|
37
|
+
JAVA_OPTIONS: >-
|
|
38
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
39
|
+
-Dinfinispan.node.name=server-one
|
|
40
|
+
-Djgroups.dns.query=cluster-dns-ping
|
|
41
|
+
healthcheck:
|
|
42
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
43
|
+
start_period: 30s
|
|
44
|
+
interval: 5s
|
|
45
|
+
timeout: 5s
|
|
46
|
+
retries: 30
|
|
47
|
+
networks:
|
|
48
|
+
ispn:
|
|
49
|
+
aliases:
|
|
50
|
+
- cluster-dns-ping
|
|
51
|
+
|
|
52
|
+
server-two:
|
|
53
|
+
build:
|
|
54
|
+
context: .
|
|
55
|
+
dockerfile: Dockerfile.server
|
|
56
|
+
container_name: ispn-cluster-2
|
|
57
|
+
hostname: server-two
|
|
58
|
+
volumes:
|
|
59
|
+
- ./spec/configs/docker/infinispan-clustered.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
60
|
+
environment:
|
|
61
|
+
USER: admin
|
|
62
|
+
PASS: pass
|
|
63
|
+
JAVA_OPTIONS: >-
|
|
64
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
65
|
+
-Dinfinispan.node.name=server-two
|
|
66
|
+
-Djgroups.dns.query=cluster-dns-ping
|
|
67
|
+
healthcheck:
|
|
68
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
69
|
+
start_period: 30s
|
|
70
|
+
interval: 5s
|
|
71
|
+
timeout: 5s
|
|
72
|
+
retries: 30
|
|
73
|
+
networks:
|
|
74
|
+
ispn:
|
|
75
|
+
aliases:
|
|
76
|
+
- cluster-dns-ping
|
|
77
|
+
|
|
78
|
+
server-three:
|
|
79
|
+
build:
|
|
80
|
+
context: .
|
|
81
|
+
dockerfile: Dockerfile.server
|
|
82
|
+
container_name: ispn-cluster-3
|
|
83
|
+
hostname: server-three
|
|
84
|
+
volumes:
|
|
85
|
+
- ./spec/configs/docker/infinispan-clustered.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
86
|
+
environment:
|
|
87
|
+
USER: admin
|
|
88
|
+
PASS: pass
|
|
89
|
+
JAVA_OPTIONS: >-
|
|
90
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
91
|
+
-Dinfinispan.node.name=server-three
|
|
92
|
+
-Djgroups.dns.query=cluster-dns-ping
|
|
93
|
+
healthcheck:
|
|
94
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
95
|
+
start_period: 30s
|
|
96
|
+
interval: 5s
|
|
97
|
+
timeout: 5s
|
|
98
|
+
retries: 30
|
|
99
|
+
networks:
|
|
100
|
+
ispn:
|
|
101
|
+
aliases:
|
|
102
|
+
- cluster-dns-ping
|
|
103
|
+
|
|
104
|
+
# SSL server
|
|
105
|
+
server-ssl:
|
|
106
|
+
build:
|
|
107
|
+
context: .
|
|
108
|
+
dockerfile: Dockerfile.server
|
|
109
|
+
container_name: ispn-ssl
|
|
110
|
+
hostname: server-ssl
|
|
111
|
+
volumes:
|
|
112
|
+
- ./spec/configs/infinispan-ssl.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
113
|
+
- ./out/ssl/server/server.p12:/opt/infinispan/server/conf/server.p12:ro
|
|
114
|
+
- ./out/ssl/client/client.p12:/opt/infinispan/server/conf/client.p12:ro
|
|
115
|
+
- ./out/ssl/sni-trust1/trust1.p12:/opt/infinispan/server/conf/trust1.p12:ro
|
|
116
|
+
- ./out/ssl/sni-trust2/trust2.p12:/opt/infinispan/server/conf/trust2.p12:ro
|
|
117
|
+
- ./out/ssl/sni-untrust/untrust.p12:/opt/infinispan/server/conf/untrust.p12:ro
|
|
118
|
+
environment:
|
|
119
|
+
USER: admin
|
|
120
|
+
PASS: pass
|
|
121
|
+
JAVA_OPTIONS: >-
|
|
122
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
123
|
+
-Dorg.infinispan.openssl=false
|
|
124
|
+
healthcheck:
|
|
125
|
+
test: ["CMD-SHELL", "curl -sf -k -u admin:pass https://localhost:11622/rest/v2/cache-managers/local/health/status || exit 1"]
|
|
126
|
+
start_period: 30s
|
|
127
|
+
interval: 5s
|
|
128
|
+
timeout: 5s
|
|
129
|
+
retries: 30
|
|
130
|
+
networks:
|
|
131
|
+
ispn:
|
|
132
|
+
|
|
133
|
+
# Failover cluster nodes (started on demand by tests)
|
|
134
|
+
server-failover-one:
|
|
135
|
+
build:
|
|
136
|
+
context: .
|
|
137
|
+
dockerfile: Dockerfile.server
|
|
138
|
+
container_name: ispn-failover-1
|
|
139
|
+
hostname: server-failover-one
|
|
140
|
+
profiles: ["failover"]
|
|
141
|
+
volumes:
|
|
142
|
+
- ./spec/configs/docker/infinispan-clustered.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
143
|
+
environment:
|
|
144
|
+
USER: admin
|
|
145
|
+
PASS: pass
|
|
146
|
+
JAVA_OPTIONS: >-
|
|
147
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
148
|
+
-Dinfinispan.node.name=server-failover-one
|
|
149
|
+
-Djgroups.dns.query=failover-dns-ping
|
|
150
|
+
healthcheck:
|
|
151
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
152
|
+
start_period: 30s
|
|
153
|
+
interval: 5s
|
|
154
|
+
timeout: 5s
|
|
155
|
+
retries: 30
|
|
156
|
+
networks:
|
|
157
|
+
ispn:
|
|
158
|
+
aliases:
|
|
159
|
+
- failover-dns-ping
|
|
160
|
+
|
|
161
|
+
server-failover-two:
|
|
162
|
+
build:
|
|
163
|
+
context: .
|
|
164
|
+
dockerfile: Dockerfile.server
|
|
165
|
+
container_name: ispn-failover-2
|
|
166
|
+
hostname: server-failover-two
|
|
167
|
+
profiles: ["failover"]
|
|
168
|
+
volumes:
|
|
169
|
+
- ./spec/configs/docker/infinispan-clustered.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
170
|
+
environment:
|
|
171
|
+
USER: admin
|
|
172
|
+
PASS: pass
|
|
173
|
+
JAVA_OPTIONS: >-
|
|
174
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
175
|
+
-Dinfinispan.node.name=server-failover-two
|
|
176
|
+
-Djgroups.dns.query=failover-dns-ping
|
|
177
|
+
healthcheck:
|
|
178
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
179
|
+
start_period: 30s
|
|
180
|
+
interval: 5s
|
|
181
|
+
timeout: 5s
|
|
182
|
+
retries: 30
|
|
183
|
+
networks:
|
|
184
|
+
ispn:
|
|
185
|
+
aliases:
|
|
186
|
+
- failover-dns-ping
|
|
187
|
+
|
|
188
|
+
server-failover-three:
|
|
189
|
+
build:
|
|
190
|
+
context: .
|
|
191
|
+
dockerfile: Dockerfile.server
|
|
192
|
+
container_name: ispn-failover-3
|
|
193
|
+
hostname: server-failover-three
|
|
194
|
+
profiles: ["failover"]
|
|
195
|
+
volumes:
|
|
196
|
+
- ./spec/configs/docker/infinispan-clustered.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
197
|
+
environment:
|
|
198
|
+
USER: admin
|
|
199
|
+
PASS: pass
|
|
200
|
+
JAVA_OPTIONS: >-
|
|
201
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
202
|
+
-Dinfinispan.node.name=server-failover-three
|
|
203
|
+
-Djgroups.dns.query=failover-dns-ping
|
|
204
|
+
healthcheck:
|
|
205
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
206
|
+
start_period: 30s
|
|
207
|
+
interval: 5s
|
|
208
|
+
timeout: 5s
|
|
209
|
+
retries: 30
|
|
210
|
+
networks:
|
|
211
|
+
ispn:
|
|
212
|
+
aliases:
|
|
213
|
+
- failover-dns-ping
|
|
214
|
+
|
|
215
|
+
# Cross-site replication servers
|
|
216
|
+
server-earth:
|
|
217
|
+
build:
|
|
218
|
+
context: .
|
|
219
|
+
dockerfile: Dockerfile.server
|
|
220
|
+
container_name: ispn-earth
|
|
221
|
+
hostname: server-earth
|
|
222
|
+
volumes:
|
|
223
|
+
- ./spec/configs/docker/infinispan-xsite-EARTH.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
224
|
+
environment:
|
|
225
|
+
USER: admin
|
|
226
|
+
PASS: pass
|
|
227
|
+
JAVA_OPTIONS: >-
|
|
228
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
229
|
+
-Dinfinispan.node.name=server-earth
|
|
230
|
+
-Djgroups.dns.query=earth-dns-ping
|
|
231
|
+
-Djgroups.bridge.hosts=server-earth[7800],server-moon[7800]
|
|
232
|
+
healthcheck:
|
|
233
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
234
|
+
start_period: 30s
|
|
235
|
+
interval: 5s
|
|
236
|
+
timeout: 5s
|
|
237
|
+
retries: 30
|
|
238
|
+
networks:
|
|
239
|
+
ispn:
|
|
240
|
+
aliases:
|
|
241
|
+
- earth-dns-ping
|
|
242
|
+
|
|
243
|
+
server-moon:
|
|
244
|
+
build:
|
|
245
|
+
context: .
|
|
246
|
+
dockerfile: Dockerfile.server
|
|
247
|
+
container_name: ispn-moon
|
|
248
|
+
hostname: server-moon
|
|
249
|
+
volumes:
|
|
250
|
+
- ./spec/configs/docker/infinispan-xsite-MOON.xml:/opt/infinispan/server/conf/infinispan.xml:ro
|
|
251
|
+
environment:
|
|
252
|
+
USER: admin
|
|
253
|
+
PASS: pass
|
|
254
|
+
JAVA_OPTIONS: >-
|
|
255
|
+
-Dinfinispan.bind.address=0.0.0.0
|
|
256
|
+
-Dinfinispan.node.name=server-moon
|
|
257
|
+
-Djgroups.dns.query=moon-dns-ping
|
|
258
|
+
-Djgroups.bridge.hosts=server-earth[7800],server-moon[7800]
|
|
259
|
+
healthcheck:
|
|
260
|
+
test: ["CMD-SHELL", "curl -sf -u admin:pass http://localhost:11222/rest/v2/cache-managers/clustered/health/status || exit 1"]
|
|
261
|
+
start_period: 30s
|
|
262
|
+
interval: 5s
|
|
263
|
+
timeout: 5s
|
|
264
|
+
retries: 30
|
|
265
|
+
networks:
|
|
266
|
+
ispn:
|
|
267
|
+
aliases:
|
|
268
|
+
- moon-dns-ping
|
|
269
|
+
|
|
270
|
+
networks:
|
|
271
|
+
ispn:
|
|
272
|
+
driver: bridge
|
package/gen-asciidoc.sh
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Generates HTML documentation from AsciiDoc sources.
|
|
4
|
+
# Mirrors the asciidoctor-maven-plugin configuration used by
|
|
5
|
+
# the main Infinispan documentation build (documentation/pom.xml).
|
|
6
|
+
|
|
7
|
+
set -e
|
|
8
|
+
|
|
9
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
10
|
+
SRC_DIR="${SCRIPT_DIR}/documentation/asciidoc"
|
|
11
|
+
OUT_DIR="${SCRIPT_DIR}/out/docs"
|
|
12
|
+
|
|
13
|
+
mkdir -p "${OUT_DIR}"
|
|
14
|
+
|
|
15
|
+
asciidoctor \
|
|
16
|
+
--doctype book \
|
|
17
|
+
--backend html5 \
|
|
18
|
+
--safe-mode unsafe \
|
|
19
|
+
-a idprefix="" \
|
|
20
|
+
-a idseparator="-" \
|
|
21
|
+
-a sectanchors \
|
|
22
|
+
-a toc=left \
|
|
23
|
+
-a toclevels=3 \
|
|
24
|
+
-a numbered \
|
|
25
|
+
-a icons=font \
|
|
26
|
+
-a experimental \
|
|
27
|
+
-a source-highlighter=highlight.js \
|
|
28
|
+
-a highlightjs-theme=github \
|
|
29
|
+
-a imagesdir=../../topics/images \
|
|
30
|
+
-a stories=../stories \
|
|
31
|
+
-a topics=../topics \
|
|
32
|
+
-a community \
|
|
33
|
+
-a brandname=Infinispan \
|
|
34
|
+
-a fullbrandname=Infinispan \
|
|
35
|
+
-a brandshortname=infinispan \
|
|
36
|
+
-a hr_js="Hot Rod JS" \
|
|
37
|
+
-a doc_home=https://infinispan.org/documentation/ \
|
|
38
|
+
-a download_url=https://infinispan.org/download/ \
|
|
39
|
+
-a node_docs=https://docs.jboss.org/infinispan/hotrod-clients/javascript/1.0/apidocs/ \
|
|
40
|
+
-a server_docs=https://infinispan.org/docs/stable/titles/server/server.html \
|
|
41
|
+
-a code_tutorials=https://github.com/infinispan/infinispan-simple-tutorials/ \
|
|
42
|
+
-a query_docs=https://infinispan.org/docs/stable/titles/query/query.html \
|
|
43
|
+
-o "${OUT_DIR}/index.html" \
|
|
44
|
+
"${SRC_DIR}/titles/js_client.asciidoc"
|
|
45
|
+
|
|
46
|
+
echo "Documentation generated: ${OUT_DIR}/index.html"
|