Skip to content

Commit c691832

Browse files
committed
Update documentation in preparation for Coherence CE 22.06 release.
1 parent a7c8ab7 commit c691832

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

DEVELOPING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2020 Oracle and/or its affiliates.
2+
Copyright (c) 2020, 2022 Oracle and/or its affiliates.
33
44
Licensed under the Universal Permissive License v 1.0 as shown at
55
http://oss.oracle.com/licenses/upl.

README.md

+24-23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2020 Oracle and/or its affiliates.
2+
Copyright (c) 2020, 2022 Oracle and/or its affiliates.
33
44
Licensed under the Universal Permissive License v 1.0 as shown at
55
http://oss.oracle.com/licenses/upl.
@@ -8,7 +8,7 @@ http://oss.oracle.com/licenses/upl.
88
# Coherence JavaScript Client
99

1010
Coherence JavaScript Client allows Node applications to act as
11-
cache clients to a Coherence Cluster using gRPC framework as
11+
cache clients to a Coherence Cluster using Google's gRPC framework for
1212
the network transport.
1313

1414
### Features
@@ -18,16 +18,16 @@ the network transport.
1818
* Registration of listeners to be notified of map mutations
1919

2020
### Requirements
21-
* Coherence CE 20.12 or later (or equivalent non-open source editions) with a configured [gRPC Proxy](https://github.com/oracle/coherence/tree/master/prj/coherence-grpc-proxy)
21+
* Coherence CE 22.06 or later (or equivalent non-open source editions) with a configured [gRPC Proxy](https://github.com/oracle/coherence/tree/master/prj/coherence-grpc-proxy)
2222
* Node 14
23-
* NPM 6.x
23+
* NPM 8.x
2424

2525
### Usage
2626

2727
Before testing the library, you must ensure a Coherence cluster is available. For local development, we recommend using the Coherence CE Docker image; it contains everything necessary for the client to operate correctly.
2828

2929
```bash
30-
docker run -d -p 1408:1408 oraclecoherence/coherence-ce:21.12.1
30+
docker run -d -p 1408:1408 oraclecoherence/coherence-ce:22.06
3131
```
3232

3333
For more details on the image, see the [documentation](https://github.com/oracle/coherence/tree/master/prj/coherence-docker).
@@ -39,7 +39,7 @@ project's `package.json`:
3939
```
4040
...
4141
"dependencies": {
42-
"@oracle/coherence": "^1.0.0",
42+
"@oracle/coherence": "^1.1.0",
4343
},
4444
...
4545
```
@@ -56,8 +56,8 @@ such as maps and/or caches. When using the Coherence JavaScript Client, a `Sessi
5656
gRPC endpoint and uses a specific serialization format to marshal requests and responses.
5757
This means that different sessions using different serializers may connect to the same server endpoint. Typically,
5858
for efficiency the client and server would be configured to use matching serialization formats to avoid
59-
deserialization of data on the server but this does not have to be the case. If the server is using a different
60-
serializer for the server-side caches it must be able to deserialize the client's requests, so there must be
59+
deserialization of data on the server, but this does not have to be the case. If the server is using a different
60+
serializer for the server-side caches, it must be able to deserialize the client's requests, so there must be
6161
a serializer configured on the server to match that used by the client.
6262

6363
> NOTE: Currently, the Coherence JavaScript client only supports JSON serialization
@@ -122,18 +122,19 @@ by JavaScript except for the following differences:
122122
* insertion order is not maintained
123123
* `set()` calls cannot be chained because of the asynchronous nature of the API
124124

125-
> NOTE: The only difference between `NamedCache` and `NamedMap` is that the 'NamedCache' allows associating a
125+
> NOTE: The only difference between `NamedCache` and `NamedMap` is that the 'NamedCache' allows associating a
126126
> `time-to-live` on the cache entry, while `NamedMap` does not
127127
128-
For the following examples, let's assume that we have a Map defined in Coherence named `Test`. To get access to the map from the client:
128+
For the following examples, let's assume that we have a Map defined in Coherence named `Test`.
129+
To get access to the map from the client:
129130

130131
> NOTE: If using the Docker image previously mentioned for testing, you don't need to worry about the details of the map name. Any name will work.
131132
132133
```javascript
133134
let map = session.getMap('Test')
134135
```
135136

136-
Once we have the handle to our map, we can invoke the same basic operations as a standard JavaScript Map:
137+
Once we have a handle to our map, we can invoke the same basic operations as a standard JavaScript Map:
137138
```javascript
138139
await map.size
139140
// (zero)
@@ -171,7 +172,7 @@ await map.forEach((value, key) => console.log(key + ': ' + value))
171172

172173
Coherence provides a rich set of primitives that allow developers to create advanced queries against
173174
a set of entries returning only those keys and/or values matching the specified criteria.
174-
See the [documentation](https://oracle.github.io/coherence/21.12/api/java/index.html) for details
175+
See the [documentation](https://oracle.github.io/coherence/22.06/api/java/index.html) for details
175176
on the Filters provided by this client.
176177

177178
Let's assume we have a `NamedMap` in which we're storing `string` keys and some objects with the structure of:
@@ -192,12 +193,12 @@ await map.set('0002', {name: "Fred Jones", age: 56, hobbies: ["racing", "golf"]}
192193
await map.set('0003', {name: "Jane Doe", age: 48, hobbies: ["gardening", "photography"]})
193194
```
194195

195-
Using a filter we can limit the result set returned by the map:
196+
Using a filter, we can limit the result set returned by the map:
196197

197198
```javascript
198199
const { Filters } = require('@oracle/coherence')
199200

200-
...
201+
// ...
201202

202203
await map.entries(Filters.greater('age', 40))
203204
// [{key: '0002', value: {name: "Fred Jones"...}}, {key: '0002', value: {name: "Jane Doe"...}}]
@@ -212,14 +213,14 @@ await map.values(Filters.not(Filters.arrayContains('hobbies', 'gardening')))
212213
#### Aggregation
213214

214215
Coherence provides developers with the ability to process some subset of the entries in a map,
215-
resulting in an aggregated result. See the [documentation](https://oracle.github.io/coherence/21.12/api/java/index.html) for aggregators provided by this client.
216+
resulting in an aggregated result. See the [documentation](https://oracle.github.io/coherence/22.06/api/java/index.html) for aggregators provided by this client.
216217

217-
Assuming the same set of keys and values are present from the filtering example above:
218+
Assume the same set of keys and values are present from the filtering example above:
218219

219220
```javascript
220221
const { Aggregators, Filters } = require('@oracle/coherence')
221222

222-
...
223+
// ...
223224

224225
await map.aggregate(Aggregators.average('age'))
225226
// 47.3
@@ -234,14 +235,14 @@ await map.aggregate(Filters.greater('age', 40), Aggregators.count())
234235
#### Entry Processing
235236

236237
An entry processor allows mutation of map entries in-place within the cluster instead of bringing the entire object
237-
to the client, updating, and pushing the value back. See the [documentation](https://oracle.github.io/coherence/21.12/api/java/index.html) for the processors provided by this client.
238+
to the client, updating, and pushing the value back. See the [documentation](https://oracle.github.io/coherence/22.06/api/java/index.html) for the processors provided by this client.
238239

239-
Assuming the same set of keys and values are present from the filtering and aggregation examples:
240+
Assume the same set of keys and values are present from the filtering and aggregation examples:
240241

241242
```javascript
242243
const { Filters, Processors } = require('@oracle/coherence')
243244

244-
...
245+
// ...
245246

246247
// targeting a specific entry
247248
await map.invoke('0001', Processors.extract('age'))
@@ -269,8 +270,8 @@ await map.get('0001')
269270
### Events
270271

271272
Coherence provides the ability to subscribe to notifications pertaining to a particular map/cache.
272-
Registration is works similarly to event registration with Node, with some key differences. In addition
273-
to listening for a specific event, it is possible to listen to events for changes made to a specific key, or using
273+
Registration works similarly to event registration with Node, with some key differences. In addition
274+
to listening for specific events, it is possible to listen to events for changes made to a specific key, or using
274275
a Filter, it's possible to limit the events raised to be for a subset of the map entries.
275276

276277
Now, let's register a listener:
@@ -395,4 +396,4 @@ Map size is 0
395396

396397
### References
397398
* Oracle Coherence JavaScript Client - https://coherence.community/20.06/api/js/index.html
398-
* Oracle Coherence CE Documentation - https://coherence.community/21.12/docs/#/docs/about/01_overview
399+
* Oracle Coherence CE Documentation - https://coherence.community/22.06/docs/#/docs/about/01_overview

0 commit comments

Comments
 (0)