GithubHelp home page GithubHelp logo

mohammadfarari1360 / xodus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jetbrains/xodus

1.0 0.0 0.0 11.06 MB

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

License: Apache License 2.0

Java 56.61% Kotlin 43.37% FreeMarker 0.02%

xodus's Introduction

official JetBrains project Maven Central Last Release License Pure Java + Kotlin Stack Overflow

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack, an issue tracking and project management tool. Xodus is also used in JetBrains Hub, the user management platform for JetBrains' team tools, and in some internal JetBrains projects.

  • Xodus is transactional and fully ACID-compliant.
  • Xodus is highly concurrent. Reads are completely non-blocking due to MVCC and true snapshot isolation.
  • Xodus is schema-less and agile. It does not require schema migrations or refactorings.
  • Xodus is embedded. It does not require installation or administration.
  • Xodus is written in pure Java and Kotlin.
  • Xodus is free and licensed under Apache 2.0.

Hello Worlds!

To start using Xodus, define dependencies:

<!-- in Maven project -->
<dependency>
    <groupId>org.jetbrains.xodus</groupId>
    <artifactId>xodus-openAPI</artifactId>
    <version>2.0.1</version>
</dependency>
// in Gradle project
dependencies {
    compile 'org.jetbrains.xodus:xodus-openAPI:2.0.1'
}

Read more about managing dependencies.

There are three different ways to deal with data, which results in three different API layers: Environments, Entity Stores and Virtual File Systems.

Environments

Add dependency on org.jetbrains.xodus:xodus-environment:2.0.1.

try (Environment env = Environments.newInstance("/home/me/.myAppData")) {
    env.executeInTransaction(txn -> {
        final Store store = env.openStore("Messages", StoreConfig.WITHOUT_DUPLICATES, txn);
        store.put(txn, StringBinding.stringToEntry("Hello"), StringBinding.stringToEntry("World!"));
    });
}

Entity Stores

Add dependency on org.jetbrains.xodus:xodus-entity-store:2.0.1, org.jetbrains.xodus:xodus-environment:2.0.1 and org.jetbrains.xodus:xodus-vfs:2.0.1.

try (PersistentEntityStore entityStore = PersistentEntityStores.newInstance("/home/me/.myAppData")) {
    entityStore.executeInTransaction(txn -> {
        final Entity message = txn.newEntity("Message");
        message.setProperty("hello", "World!");
    });
}

Virtual File Systems

Add dependency on org.jetbrains.xodus:xodus-vfs:2.0.1 and org.jetbrains.xodus:xodus-environment:2.0.1.

try (Environment env = Environments.newInstance("/home/me/.myAppData")) {
    final VirtualFileSystem vfs = new VirtualFileSystem(env);
    env.executeInTransaction(txn -> {
        final File file = vfs.createFile(txn, "Messages");
        try (DataOutputStream output = new DataOutputStream(vfs.writeFile(txn, file))) {
            output.writeUTF("Hello ");
            output.writeUTF("World!");
        } catch (IOException e) {
            throw new ExodusException(e);
        }
    });
    vfs.shutdown();
}

Building from Source

Gradle is used to build, test, and publish. JDK 1.8 or higher is required. To build the project, run:

./gradlew build

To assemble JARs and skip running tests, run:

./gradlew assemble

Join our Xodus community!

If you are interested in Xodus, consider joining our Xodus community. Tell us about exciting applications you are building, ask for help, or just chat with friends ๐Ÿ˜ƒ

Find out More

xodus's People

Contributors

alexstaeding avatar andrii0lomakin avatar anna2390 avatar buildingdragons avatar denvned avatar dreierf avatar hannes-transentials avatar heiko-braun avatar henryju avatar jansorg avatar jk1 avatar jstuyts avatar lehvolk avatar leonya avatar leostryuk avatar leventov avatar marcelmay avatar mazine avatar morj avatar olegstepanov avatar orangy avatar pavel-nikolaev avatar penemue avatar purus avatar scotta451 avatar vadimgurov avatar virusbear avatar yusuke avatar zeckson avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.