Skip to content

evitaDB is a specialized database with an easy-to-use API for e-commerce systems. It is a low-latency NoSQL in-memory engine that handles all the complex tasks that e-commerce systems have to deal with on a daily basis. evitaDB is expected to act as a fast secondary lookup/search index used by front stores.

License

Notifications You must be signed in to change notification settings

FgForrest/evitaDB

Repository files navigation


evitaDB

Visit evitadb.io for the full documentation, examples and guides.

         

Blog   Documentation   Research   Twitter   Discord   GitHub   RSS news feed   PGP public key   Latest performance results

evitaDB is a specialized database with easy-to-use API for e-commerce systems. It is a low-latency NoSQL in-memory engine that handles all the complex tasks that e-commerce systems have to deal with on a daily basis. evitaDB is expected to act as a fast secondary lookup/search index used by front stores.

We aim for an order of magnitude better latency (10x faster or better) for common e-commerce tasks than other SQL or NoSQL database solutions on the same hardware specification. evitaDB should not be used for storing and processing primary data.

Why should you consider using evitaDB instead of Elasticsearch, MongoDB or relational database?

  • evitaDB is a database specialized for e-commerce tasks and has everything you need to implement an e-commerce catalog

  • evitaDB is more performant than Elasticsearch or PostgreSQL on the same HW sizing in typical e-commerce scenarios

  • evitaDB has a ready to use API from the day one:

    • GraphQL - targets rich JavaScript front-ends
    • REST - targets server side applications
    • gRPC - targets fast inter-server communication used in microservices architecture and is used for the evitaDB client drivers

What's current status of evitaDB?

evitaDB is currently under active development. evitaDB is supported by the company FG Forrest, which specializes in the development of e-commerce stores for large clients in the Czech Republic and abroad. evitaDB concepts have been proven to work well in production systems with annual sales exceeding 50 million €.

Engineers from FG Forrest cooperate with academic team from University of Hradec Králové, so our statements about evitaDB performance are backed by thorough (and unbiased) testing and research. All proofs can be found in this repository, and you can run tests on your HW to verify our conclusions.

What's the license of the evitaDB

evitaDB is licensed under the Business Source License 1.1. Technically, it is not an open source license, but is an open source friendly license, because it automatically converts to one after a period of time specified in the license.

We're fans of open source, and we've benefited a lot from open source software (even the database engine uses some of it). The database implementation has taken thousands of man-days and, if successful, will take several thousand more. We were lucky to get an EU grant that partially funded the initial implementation, but we need to build a self-sustaining project in the long run. Our company uses evitaDB for its own commercial projects, so the development of the database is guaranteed, but without additional income the development would be limited. That's why we have chosen this type of license, but in the end we allow you - our users - almost any use.

In a nutshell:

  • the BSL license covers a period of 4 years from the date of the software release
  • 4 year old version of evitaDB becomes permissive Apache License, v.2
  • both BSL and Apache licenses allow you to use evitaDB for OSS and/or commercial projects free of charge
  • there is one exception - you may not offer and sell evitaDB as a service to third parties

That's it.

Read license FAQ

Prerequisities

To checkout Git repository on Windows you need to have long paths enabled:

git config --system core.longpaths true

evitaDB requires and is tested on OpenJDK 17.

Java applications support multiple platforms depending on the JRE/JDK vendor. All major hardware architectures (x86_64, ARM64) and operating systems (Linux, MacOS, Windows) are supported. Due to the size of our team, we regularly test evitaDB only on the Linux AMD64 platform (which you can also use on Windows thanks to the Windows Linux Subsystem). The performance can be worse, and you may experience minor problems when running evitaDB on other (non-Linux) environments. Please report any bugs you might encounter, and we'll try to fix them as soon as possible.

How to build evitaDB

evitaDB is built using Maven. You can build the entire project by running the following command in the root directory of the project:

mvn clean install

Maven setup

The build uses Maven toolchains to select the correct JDK version. You must have JDK 17 installed and configured in your in your Maven toolchains. You can find more information about Maven toolchains in the Maven Documentation.

In short, you need ~/.m2/toolchains.xml in your home directory next to ~/.m2/settings.xml:

<?xml version="1.0" encoding="UTF8"?>
<toolchains xmlns="http://maven.apache.org/POM/4.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 https://maven.apache.org/xsd/toolchains-1.1.0.xsd">
  <toolchain>
    <type>jdk</type>
    <provides>
      <version>17</version>
      <vendor>openjdk</vendor>
      <id>jdk17</id>
    </provides>
    <configuration>
      <jdkHome>/path/to/your/jdk17/installation/directory</jdkHome>
    </configuration>
  </toolchain>
</toolchains>

How this repository is organized

  • documentation: research documents, documentation, specifications
  • evita_common: shared functions, exceptions, data types, and common utilities
  • evita_query: query language (EvitaQL), query parser, and utilities for query handling
  • evita_api: public API of evitaDB including data type conversions and basic structures
  • evita_engine: implementation of the database engine core
  • evita_store: storage layer implementation
    • evita_store_key_value: key-value store implementation with binary serialization using Kryo library
    • evita_store_entity: entity storage format and Kryo serialization (shared between server and Java client)
    • evita_store_server: server data structures persistence implementation
    • evita_traffic_engine: traffic engine recorder for storing traffic data
  • evita_export: export services
    • evita_export_fs: export service implementation for local file system
    • evita_export_s3: export service implementation for S3-compatible storage
  • evita_external_api: web API implementations
    • evita_external_api_core: shared logic for all web APIs, Armeria HTTP server integration, and common utilities
    • evita_external_api_graphql: GraphQL API implementation
    • evita_external_api_grpc: gRPC API implementation
      • shared: shared classes between gRPC server and Java client (generated gRPC stubs)
      • server: gRPC server implementation
      • client: Java driver for client/server usage scenario
      • client_observability: Java driver observability capabilities (OpenTelemetry integration)
      • client_all_in_one: Java driver with all dependencies shaded to avoid conflicts (larger JAR due to gRPC and Armeria dependencies)
    • evita_external_api_rest: REST API implementation with OpenAPI/Swagger support
    • evita_external_api_system: System API for server management and monitoring
    • evita_external_api_lab: evitaLab GUI client server support
    • evita_external_api_observability: Observability API with Prometheus metrics and OpenTelemetry tracing
  • evita_db: Maven POM bundle for embedded evitaDB usage scenario
  • evita_server: standalone server with all APIs bundled
  • evita_test: test modules
    • evita_test_support: utility classes that make writing integration tests with evitaDB easier
    • evita_functional_tests: test suite verifying functional correctness of standard and edge cases of the API
    • evita_performance_tests: JMH-based performance tests generating statistics for common operations
  • jacoco: Maven POM that allows to aggregate test coverage for entire project

Module dependency graph

flowchart TD
    subgraph core["Core Modules"]
        common[evita_common]
        query[evita_query]
        api[evita_api]
        engine[evita_engine]
    end

    subgraph store["Storage Layer"]
        store_kv[evita_store_key_value]
        store_entity[evita_store_entity]
        store_server[evita_store_server]
        traffic[evita_traffic_engine]
    end

    subgraph export["Export"]
        export_fs[evita_export_fs]
        export_s3[evita_export_s3]
    end

    subgraph external["External APIs"]
        api_core[evita_external_api_core]
        api_graphql[evita_external_api_graphql]
        api_rest[evita_external_api_rest]
        api_system[evita_external_api_system]
        api_observability[evita_external_api_observability]
        api_lab[evita_external_api_lab]
        subgraph grpc["gRPC"]
            grpc_shared[grpc_shared]
            grpc_server[grpc_server]
            grpc_client[java_driver]
            grpc_client_obs[java_driver_observability]
            grpc_client_aio[java_driver_all_in_one]
        end
    end

    subgraph bundles["Bundles"]
        db[evita_db]
        server[evita_server]
    end

    subgraph testing["Testing"]
        test_support[evita_test_support]
        func_tests[evita_functional_tests]
        perf_tests[evita_performance_tests]
    end

    %% Core dependencies
    query --> common
    api --> common
    api --> query
    engine --> common
    engine --> query
    engine --> api

    %% Storage dependencies
    store_kv --> common
    store_kv --> engine
    store_entity --> store_kv
    store_entity --> engine
    store_server --> store_entity
    store_server --> store_kv
    store_server --> engine
    traffic --> engine
    traffic --> store_kv
    traffic --> store_server

    %% Export dependencies
    export_fs --> engine
    export_fs --> api
    export_s3 --> engine
    export_s3 --> api

    %% External API dependencies
    api_core --> api
    api_core --> engine
    grpc_shared --> api
    grpc_shared --> query
    grpc_server --> api_core
    grpc_server --> grpc_shared
    grpc_client --> api
    grpc_client --> grpc_shared
    grpc_client_obs --> api
    grpc_client_obs -.-> grpc_client
    grpc_client_aio --> grpc_client
    api_graphql --> api_core
    api_graphql --> store_server
    api_rest --> api_core
    api_rest --> store_server
    api_system --> api_core
    api_system --> store_server
    api_observability --> api_core
    api_observability --> store_server
    api_observability --> traffic
    api_observability --> grpc_server
    api_observability --> api_graphql
    api_observability --> api_rest
    api_lab --> api_core
    api_lab --> api_graphql
    api_lab --> api_rest
    api_lab --> api_system
    api_lab --> grpc_server
    api_lab --> api_observability

    %% Bundle dependencies
    db --> engine
    db --> store_server
    db --> store_entity
    server --> engine
    server --> store_kv
    server --> store_entity
    server --> store_server
    server --> export_fs
    server --> export_s3
    server --> traffic
    server --> api_core
    server --> api_graphql
    server --> api_rest
    server --> grpc_server
    server --> api_system
    server --> api_lab
    server --> api_observability

    %% Test dependencies
    test_support --> server
    test_support --> grpc_client
    func_tests -.-> test_support
    perf_tests --> test_support
Loading

Quality requirements for the code

In order code to be accepted it will fulfill following criteria:

  • line coverage with unit tests will be >= 70%
  • all classes and methods will have comprehensible JavaDoc
  • there will be no TODO statements in the code
  • there will be no commented out code

Standing on giants' shoulders

evitaDB uses the following open source projects:

  • RoaringBitmap by Daniel Lemire, Richard Statin and others
  • Kryo by Nathan Sweet, Thomas Heigl, Martin Grotzke and others
  • Netty and Armeria by Trustin Lee, Norman Mauer, Ikhun Um and others
  • Logback by Ceki Gülcü and others
  • Jackson by Tatu Saloranta and others
  • gRPC Java by Eric Anderson, Carl Mastrangelo, ZHANG Dapeng, Kun Zhang and others
  • GraphQL Java by Andreas Marek, Brad Baker and others
  • Byte Buddy by Rafael Winterhalter and others
  • MinIO Java by Anand Babu Periasamy and others

And many others. We are grateful for their work.


Icons sourced at Icons8.com

About

evitaDB is a specialized database with an easy-to-use API for e-commerce systems. It is a low-latency NoSQL in-memory engine that handles all the complex tasks that e-commerce systems have to deal with on a daily basis. evitaDB is expected to act as a fast secondary lookup/search index used by front stores.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 10

Languages