Skip to content

DOC-14373 2.2 features in 1.1 SDK#4

Open
RichardSmedley wants to merge 3 commits into
release/1.1from
DOC-14373--2.2-features
Open

DOC-14373 2.2 features in 1.1 SDK#4
RichardSmedley wants to merge 3 commits into
release/1.1from
DOC-14373--2.2-features

Conversation

@RichardSmedley

Copy link
Copy Markdown
Collaborator

No description provided.

@RichardSmedley RichardSmedley requested a review from dnault June 17, 2026 13:45
Clarified the description of the new async API and its introduction in the 2.2 release.

@dnault dnault left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much appreciated!


== Long Running Queries

All versions of Enterprise Analytics support client-side async requests.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All versions of Enterprise Analytics support client-side async requests.

I would not be comfortable claiming the EA JVM SDK's startQuery method is guaranteed to work with EA servers older than 2.2. We haven't tested it, as far as I know.

After the query request is submitted, clients can monitor the status of the request and on successful execution of query, opt to stream the results of the query.
This way the connection between SDK client and Analytics Server does not stay open for the long duration of query processing, and is only needed for result set streaming.

`cluster.StartQueryAsync()` → `QueryHandle` → `QueryStatus` → `QueryResultsHandle`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Java SDK, the name of the method that kicks it off is startQuery (not StartQueryAsync).

Also notable, the user can call startQuery on a cluster or a scope.

I would be in favor of removing this line and letting the flow in the example speak for itself.

Ditto in the other place this text occurs, in the connstr.adoc partial.

== Connecting and Executing a Query


The 1.1 {name-sdk} adds support for JWT and client certificate authentication, as well as a new "async" poll-based API that uses request handles to fetch results.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"async" -> Should we refer to this API as the "startQuery" API, because that's the name of the method?

Ditto everywhere else we refer to the "async" server API.

Comment on lines +93 to +94
var credential = Jwt.Create(Credential token);
public static Cluster Create(string connectionString, Credential credential);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var credential = Credential.ofJwt("...");
var cluster = Cluster.newInstance(connectionString, credential);

[source,java]
----
var credential = ClientCertificate.FromPem(certPath, keyPath);
public static Cluster Create(string connectionString, Credential credential);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var credential = Credential.fromKeyStore(
    Paths.get("path/to/client-cert-and-key.p12"),
    password
);
var cluster = Cluster.newInstance(connectionString, credential);


== Certificate Authority

To make a TLS connection to an Enterprise Analytics cluster with a root certificate issued by a trusted CA (Certificate Authority), you do not need to add this to your configuration --

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would replace this section with something like:

By default, the Analytics SDK trusts the same well-known Certificate Authorities (CAs) as the JVM, plus the Couchbase Capella CA. This works for most deployments.

If you need to trust a different CA, or want to trust only a specific CA, you can override the default trust settings by telling the Analytics SDK which CA certificates to trust.

var cluster = Cluster.newInstance(
  connectionString,
  credential,
  options -> options
    .security(sec -> sec.trustOnlyPemFile(Paths.get("path/to/ca.pem")))
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants