• Stars
    star
    36
  • Rank 674,665 (Top 15 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Couchbase Monorepo for JVM Clients: Java, Scala, io-core…

Issues | Forums | Discord | Documentation

Couchbase JVM Clients

license

java-client scala-client kotlin-client

This repository contains the third generation of the Couchbase SDKs on the JVM ("SDK 3").

Overview

This repository contains the following projects:

  • core-io: the foundational library for all language bindings
  • java-client: the Java language binding
  • scala-client: the Scala language binding
  • kotlin-client: the Kotlin language binding
  • tracing-micrometer-observation: module to integrate with Micrometer Observation
  • tracing-opentracing: module to integrate with OpenTracing
  • tracing-opentelemetry: module to integrate with OpenTelemetry tracing
  • metrics-opentelemetry: module to integrate with OpenTelemetry metrics
  • metrics-micrometer: module to integrate with Micrometer metrics
  • java-fit-performer: for internal testing of the java-client transactions implementation

Other toplevel modules might be present which contain examples, experimental code or internal tooling and test infrastructure.

Documentation is available for Java, Scala and Kotlin.
These include getting started guides.

Building

Stable releases are published on maven central.

You can always also just build it from source, using any JDK 8+:

$ git clone https://github.com/couchbase/couchbase-jvm-clients.git
$ cd couchbase-jvm-clients
$ make

Yes, we need make because maven doesn't support the setup we need and neither does gradle. If you want to build for different Scala versions, after the first make you can do this through:

$ ./mvnw -D"scala.compat.version=2.13" -D"scala.compat.library.version=2.13.11" clean install

Notes:

  • Couchbase provides, tests and supports builds for Scala 2.12 and 2.13.
  • Default scala.compat.X properties are defined in file [.mvn/maven.config]
  • You can always go into one of the sub-directories like core-io to only build or test an individual project:
    cd scala-client
    ../mvnw -DskipTests clean install
  • Use -DskipTests to skip testing.

Testing

You can test like this:

$ ./mvnw clean test -fae

Testing with FIT

(This section is for internal consumption for Couchbase developers.)

Increasingly the SDK is tested internally with Couchbase's FIT suite.
Each SDK has its own FIT 'performer' - java-fit-performer, scala-fit-performer and kotlin-fit-performer. They are not included in the build by default as they require a) JDK 17 and b) the fit-grpc library (built separately).

To use a performer, uncomment the lines in the top-level pom.xml after 'Uncomment next lines to include the FIT performers', and reload the Maven config. Then run one of the performers in an IDE.

Branches & Release Trains

Since this monorepo houses different versions of different artifacts, release train names have been chosen to identify a collection of releases that belong to the same train.

These trains are named after historic computers for your delight.

Tags in each branch are named branchname-ga for the initial GA release, and then subsequently branchname-sr-n for each service release. See the tag information for specifics of what's in there.

Release Train Java-Client Scala-Client Core-Io Tracing-OpenTelemetry Tracing-OpenTracing Metrics-OpenTelemetry Metrics-Micrometer
colossus 3.0.x 1.0.x 2.0.x 0.2.x 0.2.x - -
pegasus 3.1.x 1.1.x 2.1.x 0.3.x 0.3.x 0.1.x 0.1.x
hopper 3.2.x 1.2.x 2.2.x 1.0.x 1.0.x 0.2.x 0.2.x
eos 3.3.x 1.3.x 2.3.x 1.1.x 1.2.x 0.3.x 0.3.x
frontier 3.4.x 1.4.x 2.4.x 1.2.x 1.3.x 0.4.x 0.4.x
titan 3.5.x 1.5.x 2.5.x 1.3.x 1.4.x 0.5.x 0.5.x

Testing Info

To cover all tests, the suite needs to be run against the following topologies, but by default it runs against the mock. Recommended topologies:

  • 1 node, no replica
  • 2 nodes, 1 replica
  • 2 nodes, 2 replicas

Also to have maximum service coverage use a cluster which has all services enabled (can be MDS setup).

Building Documentation

Documentation will be built automatically by the mvn install command above.

According to the Maven standard, the file is named artifact-version-javadoc.jar (i.e. java-client-3.4.5-javadoc.jar).

This file can be extracted (jars are like zip files) with the following command:

jar xvf java-client-3.4.5-javadoc.jar

This will extract the contents of the javadoc file into the current directory. After the original jar is removed it can be uploaded to s3.

The location of the javadoc files depends on where you get it from. The easiest is, once published, from Maven central. For example, look it up on Maven central: https://search.maven.org/artifact/com.couchbase.client/java-client/3.4.5/jar and download the javadoc jar: https://search.maven.org/remotecontent?filepath=com/couchbase/client/java-client/3.0.4/java-client-3.4.5-javadoc.jar

The exact same approach can be used for any artifact, including Scala. The Scala documentation can also be built with this command:

cd scala-client && mvn scala:doc

IDE Configuration

IntelliJ

Scala code is automatically formatted on compile with the tool scalafmt. To make IntelliJ use the same settings:

Editor -> Code Style -> Scala, change formatter to scalafmt and check Reformat on file save

(mvn validate can be used from command-line to force reformat)

More Repositories

1

couchbase-lite-ios

Lightweight, embedded, syncable NoSQL database engine for iOS and MacOS apps.
Objective-C
1,603
star
2

forestdb

A Fast Key-Value Storage Engine Based on Hierarchical B+-Tree Trie
C++
1,245
star
3

couchbase-lite-android

Lightweight, embedded, syncable NoSQL database engine for Android.
Java
1,173
star
4

moss

moss - a simple, fast, ordered, persistable, key-val storage library for golang
Go
932
star
5

geocouch

GeoCouch, a spatial index for CouchDB
Erlang
513
star
6

vellum

A Go library implementing an FST (finite state transducer)
Go
492
star
7

couchnode

Couchbase Node.js Client Library (Official)
C++
462
star
8

sync_gateway

Manages access and synchronization between Couchbase Lite and Couchbase Server
Go
447
star
9

couchbase-lite-net

A lightweight, document-oriented (NoSQL), syncable database engine for .NET
C#
429
star
10

go-slab

slab allocator in go
Go
364
star
11

gocb

The Couchbase Go SDK
Go
349
star
12

go-couchbase

Couchbase client in Go
Go
318
star
13

couchbase-net-client

The official Couchbase SDK for .NET Core and Full Frameworks
C#
271
star
14

couchbase-java-client

The official Java client for Couchbase Server
Java
252
star
15

couchbase-lite-core

Cross-platform C++ core library for Couchbase Lite
C++
246
star
16

couchbase-python-client

Couchbase Python Client Library (Official)
Python
239
star
17

fleece

A super-fast, compact, JSON-equivalent binary data format
C++
178
star
18

couchbase-elasticsearch-connector

The Official Couchbase Elasticsearch Connector
Java
176
star
19

libcouchbase

The couchbase client for C.
C
173
star
20

docker

Dockerfiles and configuration scripts for the Docker Hub Official Couchbase images
Dockerfile
137
star
21

cbft

Couchbase Full Text server
Go
135
star
22

couchdb

CouchDB
Erlang
129
star
23

couchbase-spark-connector

The Official Couchbase Spark Connector
Scala
118
star
24

kv_engine

Couchbase Key-Value Engine
C++
110
star
25

couchbase-ruby-client

Couchbase Ruby Client Library (Official)
Ruby
107
star
26

nitro

A high performance in-memory index storage engine
Go
104
star
27

query

Query engine.
Go
97
star
28

couchbase-lite-C

C language bindings for the Couchbase Lite embedded NoSQL database engine
C++
82
star
29

couchbase-kafka-connector

Legacy Couchbase to Kafka connector, superseded by Kafka Connect based.
Java
70
star
30

couchbase-lite-java-core

Couchbase Lite Java core library
Java
68
star
31

CouchbaseMock

A Java mock for Couchbase
Java
62
star
32

couchbase-ruby-model

The Active Model implementation for Couchbase Server built on couchbase-ruby-client
Ruby
61
star
33

memcached

Memcached work planned for contribution back to memcached/memcached
C++
56
star
34

couchstore

couchbase storage file library
C
54
star
35

couchbase-lite-java

Portable java version of Couchbase Lite
Java
52
star
36

java-dcp-client

Couchbase Java DCP Client
Java
45
star
37

ns_server

The Membase Server Superdupervisor.
JavaScript
44
star
38

moxi

a memcached proxy with energy and pep
C
39
star
39

couchbase-cli

Command Line tools for Administering a Couchbase Cluster
Python
39
star
40

indexing

Couchbase Indexes
Go
36
star
41

tlm

top level makefile
CMake
35
star
42

docs-site

The Antora playbook project, contributing documentation, and home page for the new Couchbase Docs site.
JavaScript
34
star
43

couchbase-lite-java-ce-root

The root workspace for the Community Editions of the Java language family of products (Java Desktop, Java WebService, and Android)
Shell
33
star
44

couchbase-jvm-core

The JVM core for Couchbase SDKs.
Java
32
star
45

go_n1ql

N1QL Driver for Go lang's database/sql package
Go
32
star
46

docs-cb4

Documentation for Couchbase Server 4.x and 5.x GA releases
HTML
28
star
47

ep-engine

Eventually Persistent Couchbase Data Layer.
C++
28
star
48

couchbase-exporter

Couchbase Prometheus Exporter
Go
26
star
49

couchbase-lite-android-liteserv

An HTTP (ReST) interface to the Couchbase-Lite database running on the device/emulator
Java
24
star
50

eventing

Couchbase Eventing Engine
Go
22
star
51

testrunner

The TestRunner (Extracted from carlin).
Python
21
star
52

cbgt

The cbgt project provides a generic golang library that manages partitions or data shards across a cluster of servers.
Go
21
star
53

couchbase-lite-java-native

This is a shared native SQLite library used for Couchbase Lite Android/Java.
C++
20
star
54

perfrunner

Performance TAF for Couchbase Server
Python
20
star
55

couchbase-examples

Ruby
19
star
56

gocbcore

The IO component of gocb
Go
19
star
57

chronicle

Erlang
18
star
58

service-broker

An Open Service Broker Based Kubernetes Templating Engine
Go
17
star
59

build

jenkins scripts for executing builds, cgi scripts for status and reporting
Shell
17
star
60

docs-server

The Couchbase Server documentation source files (in AsciiDoc) used in the Couchbase Docs site.
HTML
16
star
61

phosphor

High performance event tracing
C++
14
star
62

goxdcr

Go
13
star
63

gperftools

C++
12
star
64

platform

Small library providing a platform layer
C++
12
star
65

couchbase-lite-java-listener

Embedded web server to expose Couchbase Lite REST API on an http socket
Java
12
star
66

docs-ui-old

Produces the UI bundle used by the Couchbase documentation site.
CSS
12
star
67

cbmonitor

cbmonitor
Python
11
star
68

subjson

High performance JSON manipulation library
C++
11
star
69

couchbase-lite-java-javascript

Javascript view engine for Couchbase Lite Android
Java
10
star
70

query-ui

The Couchbase query workbench UI for SQL++ / N1QL.
JavaScript
10
star
71

sg-bucket

Sync Gateway Bucket interface and common code used by all Sync Gateway bucket implementations.
Go
10
star
72

couchbase-fluent-bit

Fast and Lightweight Log processor and forwarder. Based on upstream Fluent Bit, this includes some additional Couchbase specific configuration and support - https://github.com/fluent/fluent-bit
Go
10
star
73

couchbase-lite-android-ce

The community edition of couchbase lite for android
9
star
74

clog

Couchbase logging for go.
Go
9
star
75

godbc

Golang database connectivity API. This API is more flexible and extensible than golang's built-in database/sql package, because like JDBC, the API uses interfaces instead of concrete types. This allows it to be extended to handle both SQL and NoSQL / JSON data sources.
Go
9
star
76

docs-couchbase-lite

Documentation for Couchbase Lite
Java
9
star
77

gometa

Go
8
star
78

cbbootstrap

REST API to help bootstrap Couchbase Server clusters
Go
8
star
79

gocbmgr

A library for the making Couchbase REST API calls in golang
Go
7
star
80

sigar

System Information Gatherer And Reporter
C++
7
star
81

Android-EmptyApp

The android empty app.
Java
7
star
82

product-metadata

Various configuration files describing products we build
Jinja
6
star
83

tools-common

Go
6
star
84

go-blip

Go language implementation of BLIP-over-WebSocket protocol
Go
5
star
85

docs-sdk-go

The Go SDK documentation source files used in the new Couchbase Docs site.
Go
5
star
86

docs-sdk-java

The Java SDK documentation source files used in the Couchbase Docs site.
Java
5
star
87

build-infra

Various programs and scripts used by the Build & Release team not directly related to specific software build processes
Dockerfile
5
star
88

couchbase-lite-java-common

Common code for the Java language family of products (Java Desktop, Java WebService, and Android)
Java
5
star
89

couchbase-hadoop-plugin

A Couchbase to Hadoop (Sqoop) plugin for importing and exporting data
Java
5
star
90

build-manifests

Internal build manifests for all products.
4
star
91

rhmap

robinhood hashmap in golang
Go
4
star
92

n1k1

n1k1, pronounced "nicky", is a prototype execution compiler and engine for N1QL query plans
Go
4
star
93

spring

Simple Couchbase CRUD-workload generator based on pylibcouchbase
Python
4
star
94

gocb-opentelemetry

Go
3
star
95

cbauth

Go
3
star
96

docs-sdk-scala

The Scala SDK documentation source files to be used in the new Couchbase Docs site. https://docs.couchbase.com
Scala
3
star
97

java-couchbase-encryption

Crypto extensions for Couchbase Java Client
Java
3
star
98

license-reviews

3
star
99

docs-sdk-nodejs

The Node.js SDK documentation source files used in the new Couchbase Docs site.
JavaScript
3
star
100

sync-gateway-ami

Package Sync Gateway into an Amazon AMI + CloudFormation Template
Python
3
star