Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
8ce8b52
DOC-14113 Java 3.12 in dev branch
RichardSmedley Apr 20, 2026
aea1c46
alias build fix
RichardSmedley Apr 20, 2026
355e2db
DOC-14229 views deprecation
RichardSmedley Apr 22, 2026
ec2e64d
DOC-14236 hello world --> sdk-common
RichardSmedley Apr 22, 2026
d19e8ec
DOC-11699 de-confusing
RichardSmedley Apr 22, 2026
ee4980e
tweaks for getting started
RichardSmedley Apr 22, 2026
4e7624c
release notes for Java SDK 3.6.4!
RichardSmedley Apr 28, 2026
b8fb082
unwanted deletia
RichardSmedley Apr 28, 2026
7990222
backport releases added
RichardSmedley Apr 29, 2026
72a9306
.
RichardSmedley May 20, 2026
de6e56c
DOC-14238
RichardSmedley May 20, 2026
0919455
3,12 & 3.13
RichardSmedley May 20, 2026
0a68053
Better wording
RichardSmedley May 21, 2026
be581af
JVM 3.12 releases
RichardSmedley Jun 4, 2026
0527119
Add new API and improve transaction protocol
RichardSmedley Jun 8, 2026
0a75069
3.12.1 updates
RichardSmedley Jul 9, 2026
d4adad3
Merge branch 'DOC-14113-commoning' of https://github.com/couchbase/do…
RichardSmedley Jul 28, 2026
c5834c3
Feature signposting
RichardSmedley Jul 28, 2026
e1d61df
Feature signposting
RichardSmedley Jul 28, 2026
a0c1ee4
forward porting recent changes
RichardSmedley Aug 14, 2026
e8e6a88
DOC-14589 bulk-get
RichardSmedley Aug 27, 2026
22d35fc
more 3.12.x
RichardSmedley Sep 11, 2026
a050a0c
removing legacy content
RichardSmedley Sep 11, 2026
dea5600
DOC-14589 sdk-common & other tweaks for 3.10
RichardSmedley Sep 11, 2026
1527f1d
DOC-14589 howto tweaks
RichardSmedley Sep 14, 2026
e3572f9
DOC-14593 sdk-common
RichardSmedley Sep 15, 2026
587d56c
h2 fix
RichardSmedley Sep 15, 2026
1350148
!old expiry
RichardSmedley Sep 15, 2026
0ac7125
7.0 mention removal
RichardSmedley Sep 15, 2026
09014b1
Deduplicate RBAC h3
RichardSmedley Sep 15, 2026
b424ee3
Minor fixes
RichardSmedley Sep 15, 2026
d23380c
superfluous CBAS concept
RichardSmedley Sep 15, 2026
f359630
superfluous Collections concept
RichardSmedley Sep 15, 2026
68b2209
superfluous Bucket management concept
RichardSmedley Sep 15, 2026
a68471c
Concepts clean-up
RichardSmedley Sep 15, 2026
c9110af
Alias for superfluous concept doc
RichardSmedley Sep 15, 2026
5990ea6
Collections alias
RichardSmedley Sep 15, 2026
1ecde06
Alias for removed legacy buckets/clusters page
RichardSmedley Sep 15, 2026
84d4161
Liquibase
RichardSmedley Sep 16, 2026
ea79a2a
include fix
RichardSmedley Sep 16, 2026
f489981
encore, une autre fixe
RichardSmedley Sep 16, 2026
7b2ddd1
Older Server compat
RichardSmedley Sep 29, 2026
8f8abc0
DOC-14538 CNG standalone
RichardSmedley Oct 7, 2026
ed632a3
3.13
RichardSmedley Oct 12, 2026
995f942
Release notes for 3.13.0 (#497)
dnault Oct 13, 2026
3338abd
Bump io.grpc:grpc-netty-shaded from 1.28.0 to 1.75.0
dependabot[bot] Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
= Couchbase Java SDK Documentation

This repository hosts the documentation source for the https://docs.couchbase.com/java-sdk/3.11/hello-world/overview.html[Couchbase Java SDK].
This repository hosts the documentation source for the https://docs.couchbase.com/java-sdk/3.13/hello-world/overview.html[Couchbase Java SDK].

This branch documents the 3.11 release of the SDK.
It follows the https://docs.couchbase.com/java-sdk/3.11/project-docs/compatibility.html#api-version[SDK 3.9 API].
This branch documents the 3.13 release of the SDK.
It follows the https://docs.couchbase.com/java-sdk/3.13/project-docs/compatibility.html#api-version[SDK 3.10 API].

This branch reflects the new Information Architecture for the SDK docs, helping to guide new-to-Couchbase users through the pitfalls of a complex distributed system.

Expand Down Expand Up @@ -121,7 +121,7 @@ Update the following files:

=== New Branches

Production branches use the *release/x.y* naming pattern (e.g. `release/3.10`, `release/3.11`).
Production branches use the *release/x.y* naming pattern (e.g. `release/3.12`, `release/3.11`).
Antora uses the branch names in the playbook, but also uses the `version` given in the antor.yml file, to create the version navigation -- so this version number must be unique within the repo for any branches included in the playbook.
When creating a new branch for a new release, remember to update the antora.yml file before trying to build.

Expand Down
15 changes: 9 additions & 6 deletions antora.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
name: java-sdk
version: '3.11'
version: '3.13'
title: Java SDK
start_page: hello-world:overview.adoc
nav:
- modules/ROOT/nav.adoc
asciidoc:
attributes:
page-nav-header-levels: 2
server_version: '8.0.0'
sdk_current_version: '3.11.1'
sdk_dot_minor: '3.11'
server_version: '8.0.3'
sdk_current_version: '3.13.0'
sdk_dot_minor: '3.13'
sdk_dot_major: '3.x'
version-server: '8.0'
version-common: '8.0.1'
version-common: '3.10'
java_latest_lts_version: '25'
name_platform: 'Java'
name_platform_lc: 'java'
lang-code: 'java'
name-sdk: Java SDK
sdk_api: '3.9'
archive_version: 2.7
archive_major: 2.x
sdk_api: '3.10'
sdk-api-link: https://docs.couchbase.com/sdk-api/couchbase-java-client/
sdk-gh-link: https://github.com/couchbase/couchbase-jvm-clients/
105 changes: 1 addition & 104 deletions modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
*** https://docs-archive.couchbase.com/home/index.html[Older Versions Archive^]
** xref:project-docs:compatibility.adoc[]
*** xref:project-docs:migrating-sdk-code-to-3.n.adoc[]
**** xref:howtos:view-queries-with-sdk.adoc[]
*** xref:project-docs:distributed-acid-transactions-migration-guide.adoc[]
*** xref:project-docs:third-party-integrations.adoc[]
** xref:project-docs:sdk-full-installation.adoc[]
Expand All @@ -81,107 +82,3 @@
** xref:ref:glossary.adoc[Glossary]
** xref:ref:travel-app-data-model.adoc[]
** xref:project-docs:metadoc-about-these-sdk-docs.adoc[About These Docs]









////
.Getting Started
* xref:hello-world:start-using-sdk.adoc[]
* xref:howtos:kv-operations.adoc[]
* xref:howtos:n1ql-queries-with-sdk.adoc[]
* xref:howtos:full-text-searching-with-sdk.adoc[]
* xref:hello-world:sample-application.adoc[]
* xref:hello-world:spring-data-sample-application.adoc[]

.Transactions
* xref:howtos:distributed-acid-transactions-from-the-sdk.adoc[]
** xref:howtos:transactions-single-query.adoc[]
** xref:howtos:transactions-tracing.adoc[]
* xref:concept-docs:transactions.adoc[]
** xref:concept-docs:transactions-cleanup.adoc[]
** xref:concept-docs:transactions-error-handling.adoc[]

.Further Data Ops
* xref:howtos:json.adoc[]
* xref:howtos:subdocument-operations.adoc[]
// ** xref:howtos:sdk-xattr-example.adoc[Extended Attributes]
* xref:howtos:analytics-using-sdk.adoc[]
// ** xref:howtos:advanced-analytics-querying.adoc[Advanced Analytics Querying]
* xref:howtos:view-queries-with-sdk.adoc[]
* xref:howtos:concurrent-async-apis.adoc[Async & Reactive APIs]
* xref:howtos:concurrent-document-mutations.adoc[]
* xref:howtos:encrypting-using-sdk.adoc[]
* xref:howtos:transcoders-nonjson.adoc[Transcoders & Non-JSON Documents]

.Managing Couchbase
* xref:howtos:managing-connections.adoc[]
** xref:howtos:sdk-authentication.adoc[]
** xref:howtos:troubleshooting-cloud-connections.adoc[Troubleshooting Cloud Connections]
* xref:howtos:provisioning-cluster-resources.adoc[]
** xref:howtos:sdk-user-management-example.adoc[]

.Errors & Diagnostics
* xref:howtos:error-handling.adoc[]
* xref:howtos:collecting-information-and-logging.adoc[]
* xref:howtos:health-check.adoc[]
* Observability
** xref:howtos:slow-operations-logging.adoc[]
** xref:howtos:observability-metrics.adoc[]
** xref:howtos:observability-orphan-logger.adoc[]
** xref:howtos:observability-tracing.adoc[]

.Learn
* xref:concept-docs:concepts.adoc[]
* xref:concept-docs:buckets-and-clusters.adoc[Buckets & Clusters]
* xref:concept-docs:collections.adoc[Collections & Scopes]
* xref:concept-docs:compression.adoc[]
* xref:concept-docs:data-model.adoc[]
** xref:concept-docs:documents.adoc[]
** xref:concept-docs:nonjson.adoc[]
** xref:concept-docs:subdocument-operations.adoc[Sub-Documents]
** xref:concept-docs:xattr.adoc[XATTR & Virtual XATTR]
* xref:concept-docs:errors.adoc[Errors & Diagnostics]
** xref:concept-docs:health-check.adoc[]
** xref:concept-docs:response-time-observability.adoc[]
* xref:concept-docs:durability-replication-failure-considerations.adoc[]
* xref:concept-docs:encryption.adoc[Field Level Encryption]
* xref:concept-docs:data-services.adoc[Service Selection]
** xref:concept-docs:analytics-for-sdk-users.adoc[]
** xref:concept-docs:understanding-views.adoc[Views]
** xref:concept-docs:n1ql-query.adoc[]
** xref:concept-docs:full-text-search-overview.adoc[Search]
* xref:concept-docs:sdk-user-management-overview.adoc[User Management]
** xref:concept-docs:certificate-based-authentication.adoc[Cert Auth]
** xref:concept-docs:rbac.adoc[RBAC]

.References
* https://docs.couchbase.com/sdk-api/couchbase-java-client[API Reference]
* https://docs.couchbase.com/sdk-api/couchbase-core-io/[JVM Core IO API]
* https://docs.couchbase.com/sdk-api/couchbase-transactions-java/index.html?overview-summary.html[Transactions API Reference]
* xref:ref:client-settings.adoc[]
// * xref:ref:data-structures[Data Structures]
* xref:ref:error-codes.adoc[]
* xref:ref:glossary.adoc[Glossary]
* xref:ref:travel-app-data-model.adoc[]

.Project Docs
* xref:project-docs:sdk-release-notes.adoc[SDK Release Notes]
* xref:project-docs:compatibility.adoc[]
** xref:project-docs:migrating-sdk-code-to-3.n.adoc[]
*** xref:howtos:working-with-collections.adoc[Working with Collections]
** xref:project-docs:distributed-acid-transactions-migration-guide.adoc[]
** xref:project-docs:third-party-integrations.adoc[]
* xref:project-docs:sdk-full-installation.adoc[]
// ** xref:hello-world:platform-help.adoc[]
* https://docs-archive.couchbase.com/home/index.html[Older Versions Archive]
* xref:project-docs:sdk-licenses.adoc[]
* xref:project-docs:get-involved.adoc[]
** https://docs.couchbase.com/home/contribute/index.html[Improve the Docs]
* xref:project-docs:metadoc-about-these-sdk-docs.adoc[About These Docs]
////
25 changes: 0 additions & 25 deletions modules/concept-docs/pages/analytics-for-sdk-users.adoc

This file was deleted.

117 changes: 33 additions & 84 deletions modules/concept-docs/pages/best-practices.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

// Note to editors
//
// This page pulls in content from -sdk-common-
// This page pulls in content from
// https://github.com/couchbase/docs-sdk-common/blob/api/3.10/modules/shared/partials/best-practices-sdk.adoc
// and code samples from -example-dir-
//
// It can be seen built at wwww.

// It can be seen built at
// https://docs.couchbase.com/java-sdk/3.13/concept-docs/best-practices.html

[abstract]
{description}
Expand All @@ -27,84 +28,53 @@ There's plenty that can be done to remove bottlenecks in development and in perf

== Security

But before worrying about bottlenecks, let's put security concerns first.

Security is a process, and not just a set of checkboxes -- but there are key areas you must check off as you move from development, through testing, to deploying in production.
//

=== Roles and RBAC

Self-managed Couchbase Server uses Role-Based Access Control (RBAC), which is reflected in our managed service (Capella) as a nuanced set of Roles.
Data security depends in part on only giving access to the minimum amount of data and permissions required to do the job.
//
include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=security]


// === Roles and RBAC

include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=rbac]

// concept snippet

// include::{version-common}@sdk:pages:partial$rbac.adoc[]

RBAC restrict resources on a Couchbase cluster to an identified user, allocated by role.
== Performance

==== Capella Security & Priveleges
include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=performance]

Capella, our managed service, likewise has a concept of roles.

In addition to this, clusters within Capella are grouped into
xref:cloud:organizations:organization-projects-overview.adoc[organizations and projects],
to maintain separation of concerns, as well as access priveleges.

=== Dealing with Timeout Errors

==== Users, Resources, Roles, and Privileges
include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=timeout-debug]

Couchbase Server Enterprise Edition uses _Role-Based Access Control_ for applications to restrict _resources_ on a Couchbase cluster to an identified _user_.
include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=timeout-wait]

Each user who attempts resource-access is identified by means of the _credentials_ they pass to Couchbase Server, for purposes of _authentication_: these consist of a _username_ and (typically) a _password_.
Once the user is authenticated, an _authorization_ process checks the _roles_ with which the user is associated.
If one or more of these roles correspond to _privileges_ that permit the user-requested level of resource-access, access is duly granted; otherwise, it is denied.
include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=timeout-more]

Users who have been assigned the *Admin* role for the cluster are able to create, edit, and remove users.
The SDK provides APIs to support these activities.

NOTE: Introductory examples in the SDK documentation use the _Administrator_ user to ensure that developers can quickly get up and running; this _should not be used in production_.
Elsewhere we use a general "user" which represents whichever permission levels are appropriate to your application.


== Performance
=== Concurrency and Async APIs

Couchbase's Data Service uses a fast binary protocol, which will always outperform JSON streamed over HTTP from {sqlpp} queries.
If you know the key (ID) of a document, then use the xref:howtos:kv-operations.adoc[Data Service].
// ....this paragraph different for each SDK.

If you need pessimistic logging, in particular if you need to lock documents for multi-document ACID transactions, then anything you can do at the schema level to reduce the number of documents locked simultaneously wil remvoe a bottleneck to updating the affected documents.
We recommend using the reactive API over the `CompletableFuture` counterpart.
See the xref:howtos:concurrent-async-apis.adoc[Async & Reactive APIs page] for discussion and practical examples.



=== Dealing with Timeout Errors

=== Bulk Get, Multi-Get, and Network Latency

// see also
// https://couchbasecloud.atlassian.net/wiki/spaces/CST/pages/1993769712/Java+-+Debugging+KV+Timeouts
// in Support wiki
include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=bulk-get]


* `waitUntilReady` should be the default setting for `Cluster.connect` and `Cluster.bucket` in most cases, so that resources are fully loaded before the client proceeds with CRUD calls to the cluster.
* LAN-type connection of client and server is recommended in production, but WAN development is a reality pre-production.
Ensure that you're familiar with the
xref:ref:client-settings.adoc#constrained-network-environments[best timeout options for WAN environments],
or at least set a xref:ref:client-settings.adoc#wan-development[WAN development Configuration Profile].
==== When to Use Bulk Get

include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=bulk-get-async-platform]

// Something on longer timeouts and fewer retries?
// ... reading the logs to find the pattern?


// & Something on polling rate the SDK uses to fetch an updated cluster map whenever a topology change occurs.
////
By default the Java SDK polls every 2.5 seconds, regardless of server version or SDK version.
This interval is configurable via the io.configPollInterval client setting.
https://docs.couchbase.com/java-sdk/current/ref/client-settings.html#io.configPollInterval
When Java SDK 3.5.0 or later is used with Couchbase Server 7.6 or later, the SDK also listens for config change notifications from the server. In this case the polling acts as a failsafe, so it's probably okay to set it significantly higher than 2.5 seconds.
////

// write after more LZA added
////
Expand All @@ -114,14 +84,6 @@ Advanced zone aware....
////


=== Concurrency and Async APIs

// ....this paragraph different for each SDK.

We recommend using the reactive API over the `CompletableFuture` counterpart.
See the xref:howtos:concurrent-async-apis.adoc[Async & Reactive APIs page] for discussion and practical examples.



== Error Handling

Expand All @@ -132,12 +94,6 @@ See also the xref:howtos:error-handling.adoc[error handling guide],
which covers specific errors, along with a broader look at error handling strategies.


== Testing

Integrate developing with the {name-sdk} into your accustomed test framework.




////
== General Approach to Scala Exceptions
Expand All @@ -156,6 +112,8 @@ include::{version-common}@sdk:shared:partial$errors.adoc[tag=diag]





// Slow Operations Logging
include::{version-common}@sdk:shared:partial$errors.adoc[tag=observability]

Expand All @@ -166,6 +124,14 @@ include::{version-common}@sdk:shared:partial$errors.adoc[tag=observability]



== Testing

Integrate developing with the {name-sdk} into your accustomed test framework.





// Missing APIs
// For anything that is not covered by the SDK,
// for example
Expand Down Expand Up @@ -216,25 +182,8 @@ Example usage:

== Additional Information

SDKs are client to Couchbase Server -- whether Capella Database-As-A-Service, or self-managed -- and in some areas it would be wise to take a fully rounded approach.
Read up on security and performance considerations relevant to your use case.

=== Couchbase Security Best Practices

* xref:cloud:security:security.adoc[Security Best Practices in Capella]
* xref:server:learn:security/security-overview.adoc[Security for self-managed Couchbase Server]

=== Role-Based Access Control

For Capella, Roles, Cluster Access Credentials, and Authentication options are covered in the xref:cloud:security:security.adoc[Capella Security docs].


For self-managed Couchbase Server, all aspects of the Couchbase RBAC system are covered in the section xref:{version-server}@server:learn:security/authorization-overview.adoc[Authorization].
Specifically, for information on:

* Adding _Users_ and assigning _roles_, by means of the Couchbase Web Console, see xref:{version-server}@server:manage:manage-security/manage-users-and-roles.adoc[Manage Users and Roles].
* _Roles_ required for resource-access, and the privileges they entail, see xref:{version-server}@server:learn:security/roles.adoc[Roles].
* _Resources_ controlled by Couchbase RBAC, see xref:{version-server}@server:learn:security/resources-under-access-control.adoc[Resources Under Access Control].
include::{version-common}@sdk:shared:partial$best-practices.adoc[tag=additional]



Expand Down
Loading