Welcome to the world of JetBrains Xodus, an ultra-sleek transactional schema-less embedded database built on Java and Kotlin. Whether you’re diving into hardware-integration or simply managing data effectively, Xodus is here to make your life easier!
Why Use JetBrains Xodus?
- Transactional and fully ACID-compliant for safe data handling.
- High concurrency with non-blocking reads thanks to Multi-Version Concurrency Control (MVCC).
- Schema-less and agile, eliminating pesky schema migrations.
- Embedded storage, simplifying installation and administration.
- Written in pure Java and Kotlin for a seamless experience.
- Free and licensed under the Apache 2.0 license.
Getting Started
To jump on the Xodus bandwagon, you’ll first define your project dependencies. Here’s how you can do that based on the build tool you’re using:
Using Maven
<dependency>
<groupId>org.jetbrains.xodus</groupId>
<artifactId>xodus-openAPI</artifactId>
<version>2.0.1</version>
</dependency>
Using Gradle
dependencies {
implementation("org.jetbrains.xodus:xodus-openAPI:2.0.1")
}
For detailed information on managing dependencies, refer to the Xodus documentation.
Understanding Xodus API Layers
Xodus operates using two main API layers: Environments and Entity Stores. Let’s break it down with an analogy!
Imagine you’re a librarian in a massive library:
- Environments are like different sections of the library where you manage books without mixing genres — this space ensures everything is organized as you put books in or take them out, maintaining your library’s integrity.
- Entity Stores are akin to individual book records where you can create, restore, or modify an entry, similar to writing in a book’s record whenever you make changes to it!
Implementing Environments
To work with environments, add the following dependency:
dependency
groupId org.jetbrains.xodus
artifactId xodus-environment
version 2.0.1
Now you’re ready to use it!
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!"));
});
}
Implementing Entity Stores
Adding support for entity stores involves the following dependencies:
dependencies {
implementation("org.jetbrains.xodus:xodus-entity-store:2.0.1")
implementation("org.jetbrains.xodus:xodus-environment:2.0.1")
implementation("org.jetbrains.xodus:xodus-vfs:2.0.1")
}
Now let’s see how to utilize it:
try (PersistentEntityStore entityStore = PersistentEntityStores.newInstance("home/me/myAppData")) {
entityStore.executeInTransaction(txn -> {
final Entity message = txn.newEntity("Message");
message.setProperty("hello", "World!");
});
}
Building from Source
To get started with building Xodus, ensure you have Gradle and JDK 1.8 or higher. Run the following command:
./gradlew build
If you would like to build without executing tests, simply adjust your command as follows:
./gradlew assemble
Troubleshooting
If you encounter any issues while using JetBrains Xodus, here are a few troubleshooting tips:
- Ensure that your dependencies are correctly specified and match the version numbers.
- Check permissions on your application data directory; you may need to adjust access rights.
- Look into the logs generated by your application for specific error messages.
- If you’re still stuck, feel free to reach out to the community or report an issue here.
- For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Find Out More
For further exploration, visit the Xodus wiki or check out the issue tracker.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.
Now, get out there and start harnessing the power of JetBrains Xodus for your projects!

