Introduction
This is release v2.0.0 of the Coherence Go Client, an API for accessing Coherence via a native Go client.
Requirements
- Coherence CE 22.06.4+, 14.1.2+, 24.03+, or Coherence 14.1.1.2206.4+, 14.1.2.0 Commercial edition with a configured gRPCProxy. (Always ensure you are using the latest Coherence available patch.)
- Go 1.19.+
Updates / New Features
- Added support for new internal gRPC v1 API in CE 24.09, CE 14.1.2 and commercial 14.1.2 and above. No changes are required in code, the Go client will automatically detect the new version and is backwardly compatible with existing supported versions . This version hardens event processing and adds support for proper implementation queues and other future protocols
- Added the ability to specify a pruneFactor (defaults to 0.8 or 80%) for a near cache. This indicates the percentage of the total number of units that will remain after the cache manager prunes the near cache(i.e. this is the "low watermark" value)
- The minimum TTL for near cache is now 1/4 second. This change was made to bring the client into parity with other clients and to improve the performance of the expiry operation in a near cache. You will received an error if you try to set the TTL < 1/4 second
- Updated Queue API - This update provides a more stable API and adds support for the following queue types
Queue
- a simple queue which stores data in a single partition and is limited to approx 2GB of storagePagedQueue
- a queue which distributes data over the cluster and is only limited by the cluster capacityDequeue
- a simple double-ended queue that stores data in a single partition
- Harden the connection check and resolver lookup on connection failover
Note: The queue API has changed and you will need to update your code. See breaking changes below.
Upgrading from v1.2.2
If you were previously using v1.2.2 then you will need to update your import statements to specify:
"github.com/oracle/coherence-go-client/v2/coherence"
instead of
"github.com/oracle/coherence-go-client/coherence"
Breaking Changes
Queues
- In this release, the queues API has been rewritten based upon the above internal gRPC v1 API. This was done to improve reliability, and prepare for support for other protocols in the future and Queues were affected. This means that Queues in v2.0.0+ of the coherence-go-client it will only work against CE 24.09+ or Commercial 14.1.2.0+ Coherence versions
- If you wish to use the old queue API <v2.0.0 , it will only work against Coherence CE 24.03
Other Breaking Changes
To ensure compatibility with other Coherence API's, the following functions now return channels of StreamedEntry[K, R]
rather than StreamedValue[R]
. You will need to change any code that uses the following API's:
InvokeAllFilter[K comparable, V any, R any]
- now returns<-chan *StreamedEntry[K, R]
InvokeAllKeys[K comparable, V any, R any]
- now returns<-chan *StreamedEntry[K, R]
Bug Fixes
- Fixed an issue where the resolve would not resolve addresses correctly on failover
Documentation
Getting Started
go get github.com/oracle/coherence-go-client/[email protected]
What's Changed
- Update jib version by @tmiddlet2666 in #94
- Add latest CE patches to workflow by @tmiddlet2666 in #95
- Add support for v1 of API by @tmiddlet2666 in #96
- Initial queues gRPCv1 support by @tmiddlet2666 in #97
- Update near cache to support synchronous listeners by @tmiddlet2666 in #98
- Update to use /v2 Module by @tmiddlet2666 in #99
- Minor doc update, near cache calc update by @tmiddlet2666 in #100
- Correct local cache size calculation and add tests by @tmiddlet2666 in #101
- Near cache expiry improvements by @tmiddlet2666 in #102
- Further near cache expiry optimizations by @tmiddlet2666 in #103
- Ensure Pruning when using high units memory prunes to the memory, not… by @tmiddlet2666 in #104
- Update version of x/net to v0.33.0 by @tmiddlet2666 in #105
- Add 14.1.2 to ci/cd by @tmiddlet2666 in #106
Full Changelog: v1.2.2...v2.0.0