immudb - world’s fastest immutable database

immudb License

Build Status Go Report Card Coverage Homebrew Mentioned in Awesome Go

Note: The master branch is the joint point for all ongoing development efforts. Thus it may be in an unstable state and should not be used in production deployments. Please use the latest release in order to get stable binaries.

Slack Discuss at immudb@googlegroups.com Immudb Careers

Don't forget to ⭐ this repo if you like immudb!

🎉 2M+ pulls from docker hub!

Free Trusted Timestamp: Tamperproof provenance for your code and CI/CD pipeline #timestamp

Only 3 weeks left: immudb Coding Challenge - Winter 2020 Edition #immuchallenge


immudb is not a blockchain, immudb is the lightweight, high-speed immutable database with built-in cryptographic proof and verification. With immudb you can track changes in sensitive data in your transactional databases and then record those changes permanently in a tamperproof immudb database. This allows you to keep an indelible history of sensitive data, for example debit/credit card transactions.

Traditional DB transactions and logs are hard to scale and are mutable. So there is no way to know for sure if your data has been compromised.

As such, immudb provides unparalleled insights retroactively of changes to your sensitive data, even if your perimeter has been compromised. immudb guarantees immutability by using cryptographic data structures internally.

immudb gives you the same cryptographic verification of the integrity of data written with SHA-256 like a classic blockchain without the cost and complexity associated with blockchains today.

immudb has 4 main benefits:

  1. immudb is immutable. You can add records, but never change or delete records.
  2. Data stored in immudb is cryptographically coherent and verifiable, like blockchains, just without all the complexity and at high speed.
  3. Anyone can get started with immudb in minutes. Whether you're using node.js, Java, Python, Go, .Net, or any other language. It's very easy to use and you can have your immutable database running in just a few minutes.
  4. Finally, immudb is Open Source. You can run it on premise, or in the cloud. It's completely free. immudb is governed by the Apache 2.0 License.

immudb can be ran on Linux, FreeBSD, Windows, and MacOS, along with other systems derived from them, such as Kubernetes and Docker.

Designed for maximum performance

  • 4 CPU cores
  • Intel(R) Xeon(R) CPU E3-1275 v6 @ 3.80GHz
  • 64 GB memory
  • SSD

sequential write

Concurrency: 128
Iterations: 1000000
Elapsed t.: 3.06 sec
Throughput: 326626 tx/sec

batch write (async commit)

Concurrency: 16
Iterations: 1000000
Elapsed t.: 0.36 sec
Throughput: 2772181 tx/sec

immudb High-level

immudb Highlevel

We are hiring!

Tweet about immudb!

Contents

  1. Quickstart - Get immudb up and running in seconds
  2. Using immudb - Official SDKs and REST-based client
  3. CLI tools - Using immuadmin and immuclient
  4. News - The latest news about immudb
  5. Tech specs - Technical details of the system in a nutshell
  6. Real world examples - Read about how others use immudb
  7. Multiple databases - Multiple databases
  8. Documentation - Read the documentation
  9. Community - Discuss immudb with others and get support
  10. License - Check immudb's licencing

Quickstart

Getting immudb up and running is quite simple. Choose any of following options:

  1. Running immudb in Docker
  2. Download immudb release binary
  3. Build immudb by yourself
  4. Running as a service

Running immudb in Docker

  1. Pull immudb Docker Image from Docker Hub:
docker pull codenotary/immudb:latest
  1. Run immudb in a container:
docker run -it -d -p 3322:3322 -p 9497:9497 --name immudb codenotary/immudb:latest

immudb should be up and running, you can check the container logs:

docker logs immudb

Download immudb release binary

Download latest release binaries from here. Then just run immudb as follows:

# run immudb in the foreground
./immudb

# run immudb in the background
./immudb -d

To stop immudb in that case you need to find the process ps -ax | grep immudb and then kill -15 <pid>. Windows PowerShell would be Get-Process immudb* | Stop-Process.

Using non-default configuration:

immudb - the lightweight, high-speed immutable database for systems and applications.
Environment variables:
  IMMUDB_DIR=.
  IMMUDB_NETWORK=tcp
  IMMUDB_ADDRESS=0.0.0.0
  IMMUDB_PORT=3322
  IMMUDB_DBNAME=immudb
  IMMUDB_PIDFILE=
  IMMUDB_LOGFILE=
  IMMUDB_MTLS=false
  IMMUDB_AUTH=true
  IMMUDB_MAX_RECV_MSG_SIZE=4194304
  IMMUDB_DETACHED=false
  IMMUDB_CONSISTENCY_CHECK=true
  IMMUDB_PKEY=./tools/mtls/3_application/private/localhost.key.pem
  IMMUDB_CERTIFICATE=./tools/mtls/3_application/certs/localhost.cert.pem
  IMMUDB_CLIENTCAS=./tools/mtls/2_intermediate/certs/ca-chain.cert.pem
  IMMUDB_DEVMODE=true
  IMMUDB_MAINTENANCE=false
  IMMUDB_ADMIN_PASSWORD=immudb
  IMMUDB_SIGNING_KEY=
  IMMUDB_SYNCED=true
Usage:
  immudb [flags]
  immudb [command]

Available Commands:
  help        Help about any command
  version     Show the immudb version

Flags:
  -a, --address string          bind address (default "0.0.0.0")
      --admin-password string   admin password (default is 'immudb') as plain-text or base64 encoded (must be prefixed with 'enc:' if it is encoded) (default "immudb")
  -s, --auth                    enable auth
      --certificate string      server certificate file path (default "./tools/mtls/3_application/certs/localhost.cert.pem")
      --clientcas string        clients certificates list. Aka certificate authority (default "./tools/mtls/2_intermediate/certs/ca-chain.cert.pem")
      --config string           config file (default path are configs or $HOME. Default filename is immudb.toml)
      --consistency-check       enable consistency check monitor routine. To disable: --consistency-check=false (default true)
  -d, --detached                run immudb in background
      --devmode                 enable dev mode: accept remote connections without auth
      --dir string              data folder (default "./data")
      --max-recv-msg-size       max message size in bytes the server can receive
  -h, --help                    help for immudb
      --logfile string          log path with filename. E.g. /tmp/immudb/immudb.log
      --maintenance             override the authentication flag
  -m, --mtls                    enable mutual tls
      --no-histograms           disable collection of histogram metrics like query durations
      --pidfile string          pid path with filename. E.g. /var/run/immudb.pid
      --pkey string             server private key path (default "./tools/mtls/3_application/private/localhost.key.pem")
  -p, --port int                port number (default 3322)
      --signingKey string       signature private key path. If a valid one is provided, it enables the cryptographic signature of the root. E.g. "./../test/signer/ec3.key"


Use "immudb [command] --help" for more information about a command.

Build the binaries yourself

To build the binaries yourself, simply clone this repo and run

make all
Linux (by component)
GOOS=linux GOARCH=amd64 make immuclient-static immuadmin-static immudb-static
MacOS (by component)
GOOS=darwin GOARCH=amd64 make immuclient-static immuadmin-static immudb-static
Windows (by component)
GOOS=windows GOARCH=amd64 make immuclient-static immuadmin-static immudb-static
Freebsd (by component)
GOOS=freebsd GOARCH=amd64 make immuclient-static immuadmin-static immudb-static

If you want to build the container images yourself, simply clone this repo and run

docker build -t myown/immudb:latest -f Dockerfile .

And then run immudb as described when pulling official immudb Docker image.

Run immudb as a service

Service installation and management are supported on Linux, Windows, OSX and FreeBSD operating systems.

# install immudb service
sudo ./immudb service install

# uninstall immudb service
sudo ./immudb service uninstall

# check current immudb service status
sudo ./immudb service  status

# stop immudb service
sudo ./immudb service  stop

# start immudb service
sudo ./immudb service start

The linux service is using the following defaults:

File or configuration location
executable /usr/sbin/immudb
configuration file /etc/immudb/immudb.toml
all data files /var/lib/immudb
pid file /var/lib/immudb/immudb.pid
log file /var/log/immudb/immudb.log

The FreeBSD service is using the following defaults:

File or configuration location
executable /usr/sbin/immudb
configuration file /etc/immudb/immudb.toml
all data files /var/lib/immudb
pid file /var/lib/immudb/immudb.pid
log file /var/log/immudb/immudb.log

The Windows service is using the following defaults:

File or configuration location
executable Program Files\Immudb\immudb.exe
configuration file ProgramData\Immudb\config\immudb.toml
all data files ProgramData\Immudb\
pid file ProgramData\Immudb\config\immudb.pid
log file ProgramData\Immudb\config\immudb.log

Using immudb

Integrate immudb into your application using official SDKs already available for the following programming languages:

  1. Java immudb4j
  2. Golang immudb-go
  3. .net immudb4dotnet
  4. Python immudb-py
  5. Node.js immudb-node

We've developed a "language-agnostic SDK" which exposes a REST API for easy consumption by any application. immugw may be convenient tool when SDKs are not available for the programming language you're using, for experimentation, or just because you prefer your app only uses REST endpoints.

For a super quick start, please follow step by step guides for each SDK or pick a basic running sample from immudb-client-examples. Otherwise, you can use the immudb CLI tools described below.

CLI tools

  • immuclient is the CLI client for immudb. You can read, write data into immudb from the commandline using direct or interactive mode.
  • immuadmin is the admin CLI for immudb. You can manage immudb and get statistics as well as runtime information.

The latest release binaries can be found here

immuclient

Simply run ./immuclient on the same machine or ./immuclient -a <immudb-host>

CLI client for immudb - the lightweight, high-speed immutable database for systems and applications.
Environment variables:
  IMMUCLIENT_IMMUDB_ADDRESS=127.0.0.1
  IMMUCLIENT_IMMUDB_PORT=3322
  IMMUCLIENT_AUTH=true
  IMMUCLIENT_MTLS=false
  IMMUCLIENT_MAX_RECV_MSG_SIZE=4194304
  IMMUCLIENT_SERVERNAME=localhost
  IMMUCLIENT_PKEY=./tools/mtls/4_client/private/localhost.key.pem
  IMMUCLIENT_CERTIFICATE=./tools/mtls/4_client/certs/localhost.cert.pem
  IMMUCLIENT_CLIENTCAS=./tools/mtls/2_intermediate/certs/ca-chain.cert.pem
  IMMUCLIENT_SERVER_SIGNING_PUB_KEY=

IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.

Usage:
  immuclient [flags]
  immuclient [command]

Available Commands:
  audit-mode        Starts immuclient as daemon in auditor mode. Run 'immuclient audit-mode help' or use -h flag for details
  check-consistency Check consistency for the specified index and hash
  count             Count keys having the specified value
  current           Return the last merkle tree root and index stored locally
  get               Get item having the specified key
  getByIndex        Return an element by index
  getRawBySafeIndex Return an element by index
  help              Help about any command
  history           Fetch history for the item having the specified key
  inclusion         Check if specified index is included in the current tree
  iscan             Iterate over all elements by insertion order
  it                Starts immuclient in CLI mode. Use 'help' or -h flag on the shell for details
  login             Login using the specified username and password
  logout
  rawsafeget        Get item having the specified key, without parsing structured values
  rawsafeset        Set a value for the item having the specified key, without setup structured values
  reference         Add new reference to an existing key
  safeget           Get and verify item having the specified key
  safereference     Add and verify new reference to an existing key
  safeset           Add and verify new item having the specified key and value
  safezadd          Add and verify new key with score to a new or existing sorted set
  scan              Iterate over keys having the specified prefix
  set               Add new item having the specified key and value
  status            Ping to check if server connection is alive
  use               Select database
  version           Show the immuclient version
  zadd              Add new key with score to a new or existing sorted set
  zscan             Iterate over a sorted set

Flags:
      --audit-password string    immudb password used to login during audit; can be plain-text or base64 encoded (must be prefixed with 'enc:' if it is encoded)
      --audit-signature string   audit signature mode. ignore|validate. If 'ignore' is set auditor doesn't check for the root server signature. If 'validate' is set auditor verify that the root is signed properly by immudb server. Default value is 'ignore'
      --audit-username string    immudb username used to login during audit
      --certificate string       server certificate file path (default "./tools/mtls/4_client/certs/localhost.cert.pem")
      --clientcas string         clients certificates list. Aka certificate authority (default "./tools/mtls/2_intermediate/certs/ca-chain.cert.pem")
      --config string            config file (default path are configs or $HOME. Default filename is immuclient.toml)
      --dir string               Main directory for audit process tool to initialize (default "/tmp")
      --max-recv-msg-size        max message size in bytes the client can receive
  -h, --help                     help for immuclient
  -a, --immudb-address string    immudb host address (default "127.0.0.1")
  -p, --immudb-port int          immudb port number (default 3322)
  -m, --mtls                     enable mutual tls
      --pkey string              server private key path (default "./tools/mtls/4_client/private/localhost.key.pem")
      --prometheus-host string   Launch host of the Prometheus exporter. (default "0.0.0.0")
      --prometheus-port string   Launch port of the Prometheus exporter. (default "9477")
      --roots-filepath string    Filepath for storing root hashes after every successful audit loop. Default is tempdir of every OS. (default "/tmp/")
      --servername string        used to verify the hostname on the returned certificates (default "localhost")
      --tokenfile string         authentication token file (default path is $HOME or binary location; default filename is token) (default "token")
      --value-only               returning only values for get operations

Use "immuclient [command] --help" for more information about a command.

immuadmin

For security reasons we recommend using immuadmin only on the same system as immudb. User management is restricted to localhost usage. Simply run ./immuadmin on the same machine.

CLI admin client for immudb - the lightweight, high-speed immutable database for systems and applications.

Environment variables:
  IMMUADMIN_IMMUDB_ADDRESS=127.0.0.1
  IMMUADMIN_IMMUDB_PORT=3322
  IMMUADMIN_MTLS=true
  IMMUADMIN_SERVERNAME=localhost
  IMMUADMIN_PKEY=./tools/mtls/4_client/private/localhost.key.pem
  IMMUADMIN_CERTIFICATE=./tools/mtls/4_client/certs/localhost.cert.pem
  IMMUADMIN_CLIENTCAS=./tools/mtls/2_intermediate/certs/ca-chain.cert.pem

Usage:
  immuadmin [command]

Available Commands:
  backup      Make a copy of the database files and folders
  database    Issue all database commands
  dump        Dump database content to a file
  help        Help about any command
  login       Login using the specified username and password (admin username is immudb)
  logout
  print       Print merkle tree
  restore     Restore the database from a snapshot archive or folder
  set         Update server config items: auth (none|password|cryptosig), mtls (true|false)
  stats       Show statistics as text or visually with the '-v' option. Run 'immuadmin stats -h' for details.
  status      Show heartbeat status
  user        Issue all user commands
  version     Show the immuadmin version

Flags:
      --certificate string      server certificate file path (default "./tools/mtls/4_client/certs/localhost.cert.pem")
      --clientcas string        clients certificates list. Aka certificate authority (default "./tools/mtls/2_intermediate/certs/ca-chain.cert.pem")
      --config string           config file (default path is configs or $HOME; default filename is immuadmin.toml)
  -h, --help                    help for immuadmin
  -a, --immudb-address string   immudb host address (default "127.0.0.1")
  -p, --immudb-port int         immudb port number (default 3322)
  -m, --mtls                    enable mutual tls
      --pkey string             server private key path (default "./tools/mtls/4_client/private/localhost.key.pem")
      --servername string       used to verify the hostname on the returned certificates (default "localhost")
      --tokenfile string        authentication token file (default path is $HOME or binary location; the supplied value will be automatically suffixed with _admin; default filename is token_admin) (default "token")

Use "immuadmin [command] --help" for more information about a command.

Docker

All cli components are also available as docker images on dockerhub.com.

Component Container image
immuadmin https://hub.docker.com/r/codenotary/immuadmin
immuclient https://hub.docker.com/r/codenotary/immuclient

Run immuadmin

You can either find immuadmin in the immudb container (/usr/local/bin/immuadmin) or run the docker container to connect to the local immudb.

docker run -it --rm --name immuadmin codenotary/immuadmin:latest status

Run immuclient

You can either find immuclient in the immudb container (/usr/local/bin/immuclient) or run the docker container to connect to the local or remote immudb.

docker run -it --rm --name immuclient codenotary/immuclient:latest -a <immudb-host>

Build the container images yourself

If you want to build the container images yourself, simply clone this repo and run

docker build -t myown/immuadmin:latest -f Dockerfile.immuadmin .
docker build -t myown/immuclient:latest -f Dockerfile.immuclient .

News

January 8th, 2021 - immudb v0.9.0 released!

Release v0.9.0 first release with our newly designed storage layer, super fast cryptographic data-structured!

December 29th, 2020 - immudb v0.9.0-RC2 released!

Release v0.9.0-RC2 is 7 times faster data writes than the former version 0.8.0 and instant cryptographic proof!

December 22th, 2020 - immudb v0.9.0-RC1 released!

Release v0.9.0-RC1 integrates our new embeddable cryptographic-proof storage engine!

September 15th, 2020 - immudb v0.8.0 released!

Release v0.8.0 Multi-key insertion, crypto signature, immugw moved to a separate repository, bug fixes & enhancements

August 21th, 2020 - Updated and New SDKs!

SDKs for Java, Golang, .net, Python and Node are fully compatible with latest immudb release v0.8.0:

  1. immudb4j immudb4j
  2. Golang immudb-go
  3. .net immudb4dotnet
  4. Python immudb-py
  5. Node.js immudb-node

August 20th, 2020 - immudb4j v0.1.7 in GitHub Packages!

immudb4j v0.1.7 Token-based authentication, multi-database and transactional support. Compatible with latest immudb release v0.7.1

August 17th, 2020 - immudb v0.7.1 released!

Release v0.7.1 Bug Fixes & Enhancements

August 10th, 2020 - immudb v0.7.0 released!

Release v0.7.0 multi-database support, more resilience, even better performance, improved documentation

June 16th, 2020 - immudb v0.6.2 released!

Release v0.6.2 ringbuffer management fix, improved user management for automatic deployment, improved container support

June 9th, 2020 - immudb v0.6.1 released!

Release v0.6.1 fixes some important bugs and has many improvements - we recommend updating to it

May 28, 2020 - immudb v0.6.0 GA released!

We're thrilled to announce our GA Release v0.6.0 that contains many improvements, bug fixes and new audit features.

May 19, 2020 - immudb v0.6.0-rc2 released!

Release v0.6.0-rc2 is our second public release and contains an all new immuclient CLI as well as a built-in Trust Checker that does a server based continous consistency check.

May 11, 2020 - immudb v0.6.0-rc1 released!

Release v0.6.0-rc1 is our first release to the public. While we were using immudb for quite some time in the codenotary.io platform, we're thrilled to finally release it to the Open Source community (Apache 2 license).

The release contains 2 components, the main immutable database immudb and the admin CLI tool immuadmin. immudb is ready to be used on Linux as well as Microsoft Windows.

Tech specs

Topic Description
DB Model Key-Value store with 3D access (key-value-index)
Data scheme schema-free
Implementation design LSM tree with value log and parallel Merkle Tree
Implementation language Go
Server OS(s) BSD, Linux, OS X, Solaris, Windows
Embeddable Yes, optionally
Server APIs gRPC (using protocol buffers); immudb RESTful;
Partition methods Sharding
Consistency concepts Eventual Consistency Immediate Consistency
Transaction concepts ACID with Snapshot Isolation (SSI)
Durability Yes
Snapshots Yes
High Read throughput Yes
High Write throughput Yes
Optimized for SSD Yes

Real world examples

We already learned about the following use cases from users:

  • use immudb to immutably store every update to sensitive database fields (credit card or bank account data) of an existing application database
  • store CI/CD recipes in immudb to protect build and deployment pipelines
  • store public certificates in immudb
  • use immudb as an additional hash storage for digital objects checksums
  • store log streams (i. e. audit logs) tamperproof

Companies using immudb

Opvizor - immutable log (syslog) solution for VMware vSphere

eSoftThings

Greentube

TA Capital

tinaba

Multiple databases

It is possible to create and use many databases. There is no hardcoded limit on the number of database immudb can handle, but keep in mind that for every database created, 4 more file descriptor will be used. Also, the database name must be shorter that 128 bytes, in order to comply with filesystem limitations. This is because every database is stored in a directory which has the same name of the database. For the same reason, special characters (such as /) in the database name must be avoided.

The default number of open file per process on modern linux systems is usually 1024. Thats mean that without increasing that number, immudb is limited to about 250 databases. It's easy to increase that limit.

If you are using systemd services, you only need to set LimitNOFILE=65536 in the service file, and restart the service.

With systemV init, you have to put ulimit -n 65536 in your init file, before launching immudb.

It is also possible to modify /etc/security/limits.conf, which sets the system defaults.

If you are using a dedicated immudb user, just add:

# /etc/security/limits.conf
immudb    hard    nofile      65536
immudb    soft    nofile      65536

Documentation

Lot of useful documentation and step by step guides can be found at https://docs.immudb.io/

Community

We welcome contributions. Feel free to join the team!

To report bugs or get help, use GitHub's issues.

License

immudb is Apache v2.0 License.

immudb re-distributes other open-source tools and libraries - Acknowledgements.

Comments
  • build fails on AArch64, Fedora 33

    build fails on AArch64, Fedora 33

    [jw@cn06 immudb]$ sudo make VERBOSE=1 -j1 all go build -v -ldflags '-s -X "github.com/codenotary/immudb/cmd/version.Version=0.9.2" -X "github.com/codenotary/immudb/cmd/version.Commit=b9ebfe19487a500a35a8e3ffa1158c195663844c" -X "github.com/codenotary/immudb/cmd/version.BuiltBy=" -X "github.com/codenotary/immudb/cmd/version.BuiltAt=1618902229"' ./cmd/immudb go: github.com/gizak/termui/[email protected]: reading github.com/gizak/termui/go.mod at revision v3.1.0: unknown revision v3.1.0 make: *** [Makefile:58: immudb] Error 1 [jw@cn06 immudb]$

  • About the safeness of immudb

    About the safeness of immudb

    It seems anyone can use rawsafeset command to set what ever value to what ever key, so if the server is compromised and the hacker can change values easily.

    This seems contradicting the claim that :

    You can only add records, but never change or delete records.

    Is there anything I missed?

  • Limits on number of databases

    Limits on number of databases

    I'm attempting to create a large number of databases. However, when I've created about 128, then things just stop working.

    I'm using 0.7.0, and going through the rest gateway.

    Is there any known limit to the number of databases that can be supported? I'm hoping to create thousands for my usecase.

  • Structured value

    Structured value

    There is currently no rule or protocol to manage meaningful data in the communication between immudb and clients. This task aim to setup a first iteration to provide a structured value with 2 property: timestamp and payload setup by clients and managed by immudb.

    Like other databases(ex mongodb) our strategy will be to setup structured values client side. This will be done inside our drivers(SDKs) or immugw. This give us 3 advantages: 1) immudb will remain simple. It will deal only with a raw bytestream as value. By this fact we will don't have to modify too much things inside the core 2) performance don't will decrease, memory usage will not increase. We don't have to open value to save timestamp serverside. In case somebody start to send us huge messages this will be a great advantage. 3) timestamp will be tamperproof because it's inserted inside value and it will be used to produce the hash for the merkletree

    Main task To deal with raw structure server side we would like to use google.protobuf.Any as type of value inside KeyValue message

    message KeyValue {
    	bytes key = 1;
    	bytes value = 2;
    }
    

    will be

    message KeyValue {
    	bytes key = 1;
    	google.protobuf.Any value = 2;
    }
    

    In another value.proto file we define the message structure

    message StructuredValue { uint64 timestamp = 1 bytes payload = 2; }

    After that you will have to do a small refactor inside immudb. The inner type of any is []Byte, so you shouldn't have any problems because the old value is of the same type.

    Client side Client side the implementation will be based on following pseudo code:

    sv = new StructuredValue
    sv.timestamp = getOsTimestamp
    sv.payload = payloadByteArray
    Any.pack(sv)
    safesendObject = {
      "kv": {
        "key": "string",
        "value": sv
      },
      "rootIndex": {
        "index": "..."
      }
    }
    client.safeSend(safesendObject)
    

    Please add a test that proofs that an element can be correctly deserialized serverside. This is needed because we will need to deserialize messages in future tasks(auth, crypto Signatures, audit ecc... )

    Implementation in Immugw Immugw is an intelligent gateway in front of immudb. It make as a proxy but it simplify safeSet and safeGet calls providing autonomously the root index and, after retrieving data, it make all the verification needed in order to ensure that immudb is not been tampered. It can ran on the same machine in which the client is running, in a 3th machine between the client and immudb or just in the same machine of immudb(with a lower security). We need to provide the timestamp generation inside immugw for safeset, set and batch set. The client which is consuming immugw safeSet endpoints is completly unaware of the generation. In the safeget, get, scan and history methods the structured value has to be returned exploded in json. Please provide unit tests and api tests on safeGet and safeSet methods.

    Implementation in immu client Same approch has to be done for immu client for method get, set, scan and history. Theese methods has to return timestamp in set scan and history and setup the structured value in set.

    Implementation in JS-SDK, Python-SDK, .Net-SDK and JAVA-SDK Please provide the same approch for safeSet and Get methods in our SDKs. Provide also integration tests

    Useful tips.

    To rebuild schema.pb.go and schema.pb.gw.go:

    make build/codegen
    

    If you like to test easily immugw and immud take a look at this repo -> https://github.com/mmeloni/immudbdemo

    Please use Conventional Commits -> feat(pkg/subPackage...):{commit message}

  • Soft delete

    Soft delete

    What would you like to be added or enhanced

    User should be able to perform deletion as in SQL standard

    Why is this needed immugorm

    Additional context

    It's not a standard delete as we are dealing with immutability, the data should be in db but it's not being retrieved with simple read queries - also some work on indexing is needed.

  • Enhance metrics for DB size and number of entries to support multiple databases and add CORS to metrics endpoints

    Enhance metrics for DB size and number of entries to support multiple databases and add CORS to metrics endpoints

    closes #730 Examples from the response of the /metrics endpoint:


    • [x] DB sizes
    # HELP immudb_db_size_bytes Database size in bytes.
    # TYPE immudb_db_size_bytes gauge
    immudb_db_size_bytes{db="cnlcdata"} 61044
    immudb_db_size_bytes{db="cnlcinternalledger"} 20600
    immudb_db_size_bytes{db="cnlcsyslogledger"} 2156
    immudb_db_size_bytes{db="defaultdb"} 20612
    immudb_db_size_bytes{db="lcledgeronekkgeln"} 107992
    immudb_db_size_bytes{db="systemdb"} 11158
    

    ⚠️ The db sizes are NOT the actual size that is occupied on the disk. I tried to do it, initially, but it only worked on Linux (using Fstat from golang.org/x/sys package). I already spent to much time trying to find out how to do it in a cross-platform way, so i resorted to the same approach that is on master which uses os.FileInfo.Size().


    • [x] Number of entries
    # HELP immudb_number_of_stored_entries Number of key-value entries currently stored by the database.
    # TYPE immudb_number_of_stored_entries gauge
    immudb_number_of_stored_entries{db="cnlcdata"} 34
    immudb_number_of_stored_entries{db="cnlcinternalledger"} 0
    immudb_number_of_stored_entries{db="cnlcsyslogledger"} 0
    immudb_number_of_stored_entries{db="defaultdb"} 0
    immudb_number_of_stored_entries{db="lcledgeronekkgeln"} 111
    immudb_number_of_stored_entries{db="systemdb"} 11
    

    ⚠️ The number of entries are actually the latest transaction ID of each database, as i am not aware of any other (better) way of "counting" all entries.


    • [x] Update immuadmin stats command to correctly handle the new metrics format above (both for the default graphical mode and the --text mode). ⚠️ Instead of the defaultdb, the stats command now shows data for the database which has the most entries (i.e. it's assuming that that one is the one which would be of most interest for the user). In the future we should enhance it to show stats for the specified db - e.g. with a new flag --db.

    • [x] I've also added CORS to metrics endpoints in a separate commit c15b64042101db0eaa3996a14ba7b320eb405f51 (i closed the separate PR #757 that i created for that)

  • Add /initz, /readyz, /livez and /version endpoints for immudb and immuclient auditor

    Add /initz, /readyz, /livez and /version endpoints for immudb and immuclient auditor

    This issue contains more details.

    ℹ️ /initz is intended to be used for startup probes, /readyz for readiness probes and /livez for liveness probes.

    ~There is an open point though:~

    • ~❓ what checks should be done in the code which is executed for GET initz, /readyz and livez (of immudb) in order to determine if immudb is healthy or not?~

    UPDATE: right now these endpoints will always return 200 OK.

    ℹ️ For auditor's GET /initz, /readyz and /livez (which are implemented identically right now), a Health command is issued to immudb and if there's no error and response contains Status true, then 200 OK is responded, otherwise 503 Service Unavailable.

  • Any document about embedding immudb?

    Any document about embedding immudb?

    Dear developers,

    Where can i find more info about embedding immudb in a Go project? Besides some issues mention using the "embedded" package, no other info on website and github repo.

  • lock on the db files

    lock on the db files

    It should not be possible to edit the DB files. We need a lock on them.

    We also need a security mechanism to detect that data is not lost. Check with mmap. Also be aware of NFS.

  • UPSERT with secondary indexes

    UPSERT with secondary indexes

    This PR aims to remove the current limitation of UPSERT ("upsert is only supported in tables without secondary indexes")

    This implementation leverage new metadata record in the underlying store. Meaning this change preserves backward-compatibility.

  • Running as a service - mac

    Running as a service - mac

    What happened I want to run immudb as a service on macOS 11.2.3, I am following official docs It is failing when I run immudb service install in terminal. Below is the log:

    xeuser@AE_C02Z94A6LVCG ~ % sudo immudb service install 
    Error: exec: "groupadd": executable file not found in $PATH
    Usage:
      immudb service [install uninstall start stop restart status] [flags]
    
    Examples:
    Install the immutable database
    sudo ./immudb service install    -  Installs the daemon
    sudo ./immudb service stop       -  Stops the daemon
    sudo ./immudb service start      -  Starts initialized daemon
    sudo ./immudb service restart    -  Restarts daemon
    sudo ./immudb service uninstall  -  Removes daemon and its setup
    Uninstall immudb after 20 second
    sudo ./immudb service install --time 20 immudb
    
    Flags:
      -h, --help       help for service
      -t, --time int   number of seconds to wait before stopping | restarting the service
    
    Global Flags:
          --config string   config file (default path are configs or $HOME. Default filename is immudb.toml)
    
    exec: "groupadd": executable file not found in $PATH
    

    As far as I understand it is trying to use linux command groupadd but that doesnot exists in mac due to security reasons.

    What you expected to happen It was expected to be installed without issues, it could perhaps use currently logged in user instead of trying to run groupadd

    How to reproduce it (as minimally and precisely as possible) Run sudo immudb service install in macOS after setting immudb path in .bashrc or .zshrc

    Environment

    xeuser@AE_C02Z94A6LVCG ~ % immudb version
    immudb 1.0.0
    Commit  : fb5398fe7b7d69dd352685d477fbd01a86b64568
    Built by: [email protected]
    Built at: Fri, 21 May 2021 16:29:30 IST
    
  • tbtree optimizations

    tbtree optimizations

    This PR introduces optimizations in bulk insertions by following an optimistic concurrent approach. KV pairs to be inserted are first distributed among corresponding nodes and insertion takes place at the same time, finally the new list of nodes is built up.

  • chore(deps): bump github.com/jaswdr/faker from 1.4.3 to 1.16.0

    chore(deps): bump github.com/jaswdr/faker from 1.4.3 to 1.16.0

    Bumps github.com/jaswdr/faker from 1.4.3 to 1.16.0.

    Release notes

    Sourced from github.com/jaswdr/faker's releases.

    v1.16.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jaswdr/faker/compare/v1.15.0...v1.16.0

    v1.15.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jaswdr/faker/compare/v1.14.1...v1.15.0

    v1.14.1

    What's Changed

    Full Changelog: https://github.com/jaswdr/faker/compare/v1.14.0...v1.14.1

    v1.14.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/jaswdr/faker/compare/v1.13.0...v1.14.0

    v1.13.0

    What's Changed

    ... (truncated)

    Commits
    • 498a0ce Replace empty slice literal with var (#128)
    • cfcb392 [FEATURE] Add methods for uints (#127)
    • 062deca Add countryCode (#126)
    • d9e5b3b Update README.md: removes faker import confusion (#124)
    • 56db629 Fixes value assigned to a variable is never read before being overwritten in ...
    • 65aac8d Fix return value by explicitly returning nil (#119)
    • 89ca78e Types of function parameters can be combined (#118)
    • bf6b8d8 Simplify the string concatenation operation (#117)
    • 5b35065 Format code with gofmt and gofumpt (#114)
    • 7605ba2 Fix check for empty string (#116)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • read-only transactions

    read-only transactions

    This PR introduces support for read-only transactions.

    The benefit of this type of transactions is that MVCC validations are disabled for this type of transactions. It means, read-only transactions should be faster and lighter than read-write ones.

    Note: This PR may be reviewed after PR #1470

  • Optimization: snapshot reuse

    Optimization: snapshot reuse

    This PR is aimed to improve performance by reusing snapshots.

    Transaction creation can be parametrized with conditions under which snapshots can be reused.

    MVCC validations are in place, it means, if a read conflict is detected, it will be raised and the transaction may need to re-started.

    Note: This PR may be reviewed after PR #1468

Owl is a db manager platform,committed to standardizing the data, index in the database and operations to the database, to avoid risks and failures.

Owl is a db manager platform,committed to standardizing the data, index in the database and operations to the database, to avoid risks and failures. capabilities which owl provides include Process approval、sql Audit、sql execute and execute as crontab、data backup and recover .

Nov 9, 2022
This is a simple graph database in SQLite, inspired by "SQLite as a document database".

About This is a simple graph database in SQLite, inspired by "SQLite as a document database". Structure The schema consists of just two structures: No

Jan 3, 2023
Hard Disk Database based on a former database

Hard Disk Database based on a former database

Nov 1, 2021
Simple key value database that use json files to store the database

KValDB Simple key value database that use json files to store the database, the key and the respective value. This simple database have two gRPC metho

Nov 13, 2021
Beerus-DB: a database operation framework, currently only supports Mysql, Use [go-sql-driver/mysql] to do database connection and basic operations

Beerus-DB · Beerus-DB is a database operation framework, currently only supports Mysql, Use [go-sql-driver/mysql] to do database connection and basic

Oct 29, 2022
An embedded key/value database for Go.

bbolt bbolt is a fork of Ben Johnson's Bolt key/value store. The purpose of this fork is to provide the Go community with an active maintenance and de

Jan 1, 2023
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support

BuntDB is a low-level, in-memory, key/value store in pure Go. It persists to disk, is ACID compliant, and uses locking for multiple readers and a sing

Dec 30, 2022
CockroachDB - the open source, cloud-native distributed SQL database.
CockroachDB - the open source, cloud-native distributed SQL database.

CockroachDB is a cloud-native SQL database for building global, scalable cloud services that survive disasters. What is CockroachDB? Docs Quickstart C

Jan 2, 2023
ACID key-value database.

Coffer Simply ACID* key-value database. At the medium or even low latency it tries to provide greater throughput without losing the ACID properties of

Dec 7, 2022
A decentralized, trusted, high performance, SQL database with blockchain features
A decentralized, trusted, high performance, SQL database with blockchain features

中文简介 CovenantSQL(CQL) is a Byzantine Fault Tolerant relational database built on SQLite: ServerLess: Free, High Availabile, Auto Sync Database Service

Jan 3, 2023
Native GraphQL Database with graph backend
Native GraphQL Database with graph backend

The Only Native GraphQL Database With A Graph Backend. Dgraph is a horizontally scalable and distributed GraphQL database with a graph backend. It pro

Jan 4, 2023
EliasDB a graph-based database.
EliasDB a graph-based database.

EliasDB EliasDB is a graph-based database which aims to provide a lightweight solution for projects which want to store their data as a graph. Feature

Jan 4, 2023
LevelDB key/value database in Go.

This is an implementation of the LevelDB key/value database in the Go programming language. Installation go get github.com/syndtr/goleveldb/leveldb R

Jan 1, 2023
A high performance NoSQL Database Server powered by Go
A high performance NoSQL Database Server powered by Go

LedisDB Ledisdb is a high-performance NoSQL database library and server written in Go. It's similar to Redis but store data in disk. It supports many

Dec 26, 2022
Lightweight RESTful database engine based on stack data structures
Lightweight RESTful database engine based on stack data structures

piladb [pee-lah-dee-bee]. pila means stack or battery in Spanish. piladb is a lightweight RESTful database engine based on stack data structures. Crea

Nov 27, 2022
The Prometheus monitoring system and time series database.

Prometheus Visit prometheus.io for the full documentation, examples and guides. Prometheus, a Cloud Native Computing Foundation project, is a systems

Dec 31, 2022
The lightweight, distributed relational database built on SQLite.
The lightweight, distributed relational database built on SQLite.

rqlite is a lightweight, distributed relational database, which uses SQLite as its storage engine. Forming a cluster is very straightforward, it grace

Jan 5, 2023
A tiny Golang JSON database

Scribble A tiny JSON database in Golang Installation Install using go get github.com/nanobox-io/golang-scribble. Usage // a new scribble driver, provi

Dec 31, 2022
TiDB is an open source distributed HTAP database compatible with the MySQL protocol
TiDB is an open source distributed HTAP database compatible with the MySQL protocol

Slack Channel Twitter: @PingCAP Reddit Mailing list: lists.tidb.io For support, please contact PingCAP What is TiDB? TiDB ("Ti" stands for Titanium) i

Jan 9, 2023