Skip to content

Coherence Go Client - v2.0.0

Latest
Compare
Choose a tag to compare
@tmiddlet2666 tmiddlet2666 released this 23 Dec 04:12
· 3 commits to main since this release
beab7e1

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 storage
    • PagedQueue - a queue which distributes data over the cluster and is only limited by the cluster capacity
    • Dequeue - 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

Full Changelog: v1.2.2...v2.0.0