-
Notifications
You must be signed in to change notification settings - Fork 109
Home
Welcome to JetBrains Xodus. These wiki pages provide a brief introduction to Xodus concepts and features. Xodus stands for exodus, whatever that means, and is pronounced as exodus.
Xodus is transactional schemaless embedded pure-java high performant database. It is successfully used in several JetBrains server-side products, one of them is YouTrack.
- Xodus transactions have a full set of properties that guarantee that they are processed reliably: atomicity, consistency, isolation & durability. Therefore Xodus is a general-purpose database which can be used in traditional database applications having high requirements to consistency and isolation.
- On the other hand Xodus is schemaless, and that makes it disparate to traditional database applications which require database schema. Xodus is enough flexible to avoid migrations, schema refactorings, etc. That makes developer's life much easier when applications should be compatible with different versions of database.
- Embedded database exists within your application. Main features of embedded database are zero deployment and zero administration. It requires no dedicated server to store and access data (like SQL server) which is necessary to deploy and administer. Applications that use Xodus have no overhead on establishing connections with database server, SQL parsing, etc.
- Xodus is multiplatform as Java is. It is written in Java and only Java. So any application written in Java that uses Xodus is portable to any platform which is able to run Java virtual machine.
Xodus supports the only isolation level, snapshot isolation. It doesn't allow dirty reads, read-committed, repetable-read or serializable isolation. In a transaction, snapshot isolation guarantees that all reads will see a consistent snapshot of the whole database.
Snapshot isolation follows from the log-structured design of Xodus. In log-structured databases, all changes are written sequentially in a log, which is an infinite sequence of .xd files. Any data stored in the log will never be modified. So any change is appended to the log creating new version of the data. Any committed transaction creates new snapshot (version) of the database, and any new transaction created just after commit holds (references) this snapshot. Thus, Xodus database can be represented as a persistent functional data structure which naturally provides lock-free multi-version concurrency control (MVCC).
Main JetBrains' YouTrack instance contains issues database for more than 10 years. Total number of issues is near one million, physical database size exceeds 80Gb. YouTrack runs on a moderate 8-CPU server with Java heap 20Gb. Xodus provides outstading performance due to quite compact data storing, lock-free reads and lock-free optimistic writes, intelligent lock-free caching.
There are three essencially different ways to deal with data, which give three different kinds of API.
- Environment represents a transactional key-value storage placed on a physical storage.
- Entity Store describes data model as a kit of named entities with named properties and named entity relations.
- Virtual File System transactionally deals with files and streams.