Java SE sample using NoSQL with Jakarta NoSQL.
This project contains several projects with the primary goal of exploring the Jakarta NoSQL on several databases.
Redis is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indices.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run --name redis-instance -p 6379:6379 -d redisValkey is an open-source in-memory key–value database, used as a distributed cache and message broker, with optional durability. Because it holds all data in memory and because of its design, Valkey offers low-latency reads and writes, making it particularly suitable for use cases that require a cache.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run --name valkey-instance -p 6379:6379 -d valkey/valkey:latestHazelcast:In computing, Hazelcast is an open source in-memory data grid based on Java.
Memcached is a general-purpose distributed memory-caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source must be read. Memcached is free and open-source software, licensed under the Revised BSD license.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -d --name memcached-instance -p 11211:11211 memcached:latestCassandra: Apache Cassandra is a free and open-source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -d --name casandra-instance -p 9042:9042 cassandraScyllaDB is an open-source distributed NoSQL wide-column data store. It was designed to be compatible with Apache Cassandra while achieving significantly higher throughputs and lower latencies.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -d --name scylladb-instance -p 9042:9042 scylladb/scyllaArangoDB: ArangoDB is a native multi-model database system developed by triAGENS GmbH. The database system supports three important data models (key/value, documents, graphs) with one database core and a unified query language AQL (ArangoDB Query Language). The query language is declarative and allows the combination of different data access patterns in a single query. ArangoDB is a NoSQL database system but AQL is similar in many ways to SQL.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -e ARANGO_NO_AUTH=1 -d --name arangodb-instance -p 8529:8529 -d arangodb/arangodbMongodb: MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -d --name mongodb-instance -p 27017:27017 mongoOracle NoSQL: Oracle NoSQL Database is a NoSQL-type distributed key-value and document database from Oracle Corporation. It provides transactional semantics for data manipulation, horizontal scalability, and simple administration and monitoring.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -d --name oracle-instance -p 8080:8080 ghcr.io/oracle/nosql:latest-ceApache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang. CouchDB uses multiple formats and protocols to store, transfer, and process its data. It uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password -d couchdb-
Follow the instructions: https://hub.docker.com/_/couchdb
-
Create
heroesas bucket name -
Create
HeroandVillainas collections -
Create primary query to
Hero
Couchbase Server, originally known as Membase, is an open-source, distributed multi-model NoSQL document-oriented database software package optimized for interactive applications. These applications may serve many concurrent users by creating, storing, retrieving, aggregating, manipulating and presenting data.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -d --name db -p 8091-8097:8091-8097 -p 9123:9123 -p 11207:11207 -p 11210:11210 -p 11280:11280 -p 18091-18097:18091-18097 couchbase-
Select the option "Setup New Cluster"
-
Define "root" as Admin username
-
Define "123456" as Password
-
Define "localhost" as Cluster Name
-
Accept the terms and conditions
-
Go to "Buckets" session
-
Create Bucket "heroes" using the "Add Bucket" Option
-
Click at "heroes"
-
Add "Hero" and "Villain" as Collection
-
Go to Query session and execute:
CREATE PRIMARY INDEX `#primary` ON `heroes`.`_default`.`Hero`
Elasticsearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run -p 9200:9200 -p 9300:9300 \
-e "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
-e "xpack.security.enabled=false" \
-e "discovery.type=single-node" \
elasticsearch:8.7.1InfluxDB is a time-series database designed to store and query data that changes over time.
-
Install Docker: https://www.docker.com/
-
Run InfluxDB 3 Core:
docker run -d --name influxdb-instance -p 8181:8181 influxdb:3.11.0-core influxdb3 serve --node-id jnosql --object-store memory --without-auth-
Create the
metricsdatabase:
docker exec influxdb-instance influxdb3 create database --host http://localhost:8181 metrics-
Configure Eclipse JNoSQL:
jnosql.timeseries.database=metrics
jnosql.influxdb.url=http://localhost:8181
jnosql.influxdb.token=jnosql-influxdb-test-token|
Note
|
This tutorial starts InfluxDB with --without-auth to keep the local setup simple. Therefore, no authentication token needs to be generated. The token property is provided as a placeholder for the InfluxDB driver configuration.
|
InfluxDB 3 Explorer provides a browser-based interface for querying and visualizing data stored in InfluxDB 3 Core.
docker run -d --name influxdb3-explorer -p 8888:8080 influxdata/influxdb3-ui:1.9.0Open:
http://localhost:8888Configure Explorer to connect to:
http://host.docker.internal:8181and use the metrics database.
Apache IoTDB is a time-series database designed for IoT data management and analysis.
-
Install Docker: https://www.docker.com/
-
Run Apache IoTDB:
docker run -d --name iotdb-instance -p 6667:6667 -e dn_rpc_address=0.0.0.0 apache/iotdb:2.0.11-standalone-
Create the
jnosqldatabase:
docker exec -it iotdb-instance \
/iotdb/sbin/start-cli.sh \
-h 127.0.0.1 \
-p 6667 \
-u root \
-pw root \
-sql_dialect table \
-e "CREATE DATABASE IF NOT EXISTS jnosql"Apache IoTDB will be available through its native RPC endpoint at:
localhost:6667Configure Eclipse JNoSQL using microprofile-config.properties:
jnosql.timeseries.database=jnosql
jnosql.iotdb.host=localhost
jnosql.iotdb.port=6667
jnosql.iotdb.username=root
jnosql.iotdb.password=root
jnosql.iotdb.enable.redirection=false|
Note
|
For the Docker-based tutorial, jnosql.iotdb.enable.redirection=false is recommended because the address advertised by the container may not be reachable through the mapped host port.
|
QuestDB is a high-performance time-series database designed for fast ingestion and SQL analytics over time-oriented data.
This sample demonstrates Eclipse JNoSQL Time Series support with QuestDB using both:
-
TimeSeriesTemplate -
Jakarta Data repository support
-
Install Docker: https://www.docker.com/
-
Run QuestDB:
docker run -d \
--name questdb-instance \
-p 9000:9000 \
questdb/questdb:10.0.1QuestDB exposes its Web Console and HTTP services on port 9000. The Eclipse JNoSQL driver also connects through this endpoint.
Open the QuestDB Web Console in your browser:
http://localhost:9000No database creation step is required for this sample.
Configure Eclipse JNoSQL using microprofile-config.properties:
jnosql.timeseries.database=qdb
jnosql.questdb.url=ws::addr=localhost:9000;The jnosql.timeseries.database property defines the logical database used by the Time Series manager.
The QuestDB connection URL follows the QuestDB client format:
ws::addr=localhost:9000;The JNoSQL QuestDB test configuration uses this same URL format and the qdb database.
QuestDB includes its own Web Console, so no additional container is required.
Open:
http://localhost:9000From the SQL editor, you can inspect the sensor data written by Eclipse JNoSQL.
For example:
SELECT *
FROM SensorReading
ORDER BY id DESC;Or retrieve the latest reading for a specific sensor:
SELECT *
FROM SensorReading
WHERE sensor = 'sensor-01'
ORDER BY id DESC
LIMIT 1;Neo4j is a graph database management system developed by Neo4j, Inc. The data elements Neo4j stores are nodes, edges connecting them, and attributes of nodes and edges.
-
Install docker: https://www.docker.com/
-
Run docker command:
docker run --publish=7474:7474 --publish=7687:7687 --env NEO4J_AUTH=neo4j/admin123 neo4j:5.26.3JanusGraph is an open source, distributed graph database under The Linux Foundation. JanusGraph is available under the Apache License 2.0. The project is supported by IBM, Google, Hortonworks and Grakn Labs. JanusGraph supports various storage backends.











