You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Initial queues gRPCv1 support
* Add doc and Java queues test
* Minor examples update for queues
* Minor README update
* Additional tests
* Add queue events
* Add additional test with go routines
Copy file name to clipboardExpand all lines: README.md
+6-4
Original file line number
Diff line number
Diff line change
@@ -25,22 +25,24 @@ to a Coherence Cluster using gRPC for the network transport.
25
25
* session lifecycle events such as connected, disconnected, reconnected and closed
26
26
* Support for storing Go structs as JSON as well as the ability to serialize to Java objects on the server for access from other Coherence language API's
27
27
* Near cache support to cache frequently accessed data in the Go client to avoid sending requests across the network
28
-
* Support for Queues in Coherence Community Edition 24.03+
28
+
* Support for simple and double-ended queues in Coherence Community Edition 24.09+ and commercial version 14.1.2.0+
29
29
* Full support for Go generics in all Coherence API's
30
30
31
31
#### Requirements
32
32
33
-
* Coherence CE 22.06.4+, 24.03+ or Coherence 14.1.1.2206.4+ Commercial edition with a configured [gRPCProxy](https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.2206/develop-remote-clients/using-coherence-grpc-server.html).
33
+
* Coherence CE 22.06.4+, 24.09+ or Coherence 14.1.1.2206.4+ Commercial edition with a configured [gRPCProxy](https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.2206/develop-remote-clients/using-coherence-grpc-server.html).
34
34
* Go 1.19.+
35
35
36
+
> Note: If you wish to use the queues API in the latest release, you must use CE 24.09 or commercial version 14.1.2.0.x.
37
+
36
38
#### <aname="start"></a> Starting a gRPC enabled Coherence cluster
37
39
38
40
Before testing the Go client, you must ensure a Coherence cluster is available.
39
41
For local development, we recommend using the Coherence CE Docker image; it contains
40
42
everything necessary for the client to operate correctly.
41
43
42
44
```bash
43
-
docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:24.03
45
+
docker run -d -p 1408:1408 -p 30000:30000 ghcr.io/oracle/coherence-ce:24.09
44
46
```
45
47
46
48
## Installation
@@ -150,7 +152,7 @@ Please consult the [security guide](./SECURITY.md) for our responsible security
150
152
151
153
## License
152
154
153
-
Copyright (c) 2023 Oracle and/or its affiliates.
155
+
Copyright (c) 2024 Oracle and/or its affiliates.
154
156
155
157
Released under the Universal Permissive License v1.0 as shown at
Copy file name to clipboardExpand all lines: coherence/doc.go
+113-31
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The Coherence Go client provides the following features:
26
26
and session lifecycle events such as connected, disconnected, reconnected and closed
27
27
- Support for storing Go structs as JSON as well as the ability to serialize to Java objects on the server for access from other Coherence language API's
28
28
- Near cache support to cache frequently accessed data in the Go client to avoid sending requests across the network
29
-
- Support for Queues in Coherence Community Edition 24.03+
29
+
- Support for simple and double-ended queues in Coherence Community Edition 24.09+ and commercial version 14.1.2.0+
30
30
- Full support for Go generics in all Coherence API's
31
31
32
32
For more information on Coherence caches, please see the [Coherence Documentation].
@@ -482,30 +482,35 @@ in your main code, create a new [Session] and register the listener
482
482
483
483
# Working with Queues
484
484
485
-
When connecting to a Coherence CE cluster versions 24.03 or above you have the ability to create [NamedQueue] or [NamedBlockingQueue].
486
-
Queues in general have the following methods.
485
+
When connecting to a Coherence CE cluster versions 24.09 or above or commercial 14.1.2.0.+, you have the ability to create two main types of queues, a [NamedQueue] or [NamedDequeue].
487
486
488
-
- Peek() - retrieve but not remove the value at the head of the queue
487
+
A [NamedQueue] is a simple FIFO queue which can be one of two types: either [Queue] - a simple queue which stores data in a single
488
+
partition and is limited to approx 2GB of storage, or [PagedQueue] which distributes data over the cluster and is only limited
489
+
by the cluster capacity.
489
490
490
-
- Offer() - inserts the specified value to the end of the queue if it is possible to do so
491
+
A [NamedDequeue] is a simple double-ended queue that stores data in a single partition.
491
492
492
-
- Poll() - retrieves and removes the head of this queue
493
+
Queues in general have the following methods. See [NamedQueue] for the full list.
493
494
494
-
The [NamedBlockingQueue] changes the Peek() and Poll() operations to be blocking by passing a timeout. A specific error
495
-
is returned to indicate the blocking operation did no complete within the specified timeout.
495
+
- PeekHead(ctx context.Context) (*V, error) - retrieve but not remove the value at the head of this queue
496
+
497
+
- PollHead(ctx context.Context) (*V, error - retrieves and removes the head of this queue
498
+
499
+
- OfferTail(ctx context.Context, value V) error - inserts the specified value to the end of this queue if it is possible to do so
496
500
497
501
Consider the example below where we want to create a standard queue and add 10 entries, and then retrieve 10 entries.
502
+
We have specified [coherence.Queue] as the type but this could also be [coherence.PagedQueue].
0 commit comments