ProductPromotion
Logo

Scala

made by https://0x3d.site

GitHub - couchbase/couchbase-jvm-clients: The Couchbase Monorepo for JVM Clients: Java, Scala, io-core…
The Couchbase Monorepo for JVM Clients: Java, Scala, io-core… - couchbase/couchbase-jvm-clients
Visit Site

GitHub - couchbase/couchbase-jvm-clients: The Couchbase Monorepo for JVM Clients: Java, Scala, io-core…

GitHub - couchbase/couchbase-jvm-clients: 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 17+:

$ 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.13" 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:

In Editor -> Code Style -> Scala:

  • Change formatter to scalafmt.
  • Click 'disable' next to the EditorConfig warning.
  • Check Reformat on file save.

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

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory