Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/torodb/server
ToroDB Server is an open source NoSQL database that runs on top of a RDBMS. Compatible with MongoDB protocol and APIs, but with support for native SQL, atomic operations and reliable and durable backends like PostgreSQL
https://github.com/torodb/server
mongodb nosql nosql-transactions torodb
Last synced: about 2 months ago
JSON representation
ToroDB Server is an open source NoSQL database that runs on top of a RDBMS. Compatible with MongoDB protocol and APIs, but with support for native SQL, atomic operations and reliable and durable backends like PostgreSQL
- Host: GitHub
- URL: https://github.com/torodb/server
- Owner: torodb
- License: agpl-3.0
- Created: 2017-03-27T13:33:08.000Z (almost 8 years ago)
- Default Branch: devel
- Last Pushed: 2017-07-03T09:34:53.000Z (over 7 years ago)
- Last Synced: 2024-08-09T13:15:07.194Z (6 months ago)
- Topics: mongodb, nosql, nosql-transactions, torodb
- Language: Java
- Homepage: https://www.torodb.com/
- Size: 13.4 MB
- Stars: 113
- Watchers: 5
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-GNU_AGPLv3.txt
Awesome Lists containing this project
README
ToroDB
======ToroDB is an open source project that turns your RDBMS into a
MongoDB-compatible server, supporting the MongoDB query API and
MongoDB's replication, but storing your data into a reliable and trusted
ACID database. ToroDB currently supports PostgreSQL as a backend, but
others will be added in the future.ToroDB natively implements the MongoDB protocol, so you can use it with
MongoDB tools and drivers, and features a document-to-relational mapping
algorithm that transforms the JSON documents into relational tables.
ToroDB also offers a native SQL layer and automatic data normalization
and partitioning based on JSON documents' implicit schema.ToroDB follows a RERO (Release Early, Release Often) policy. Current version is
considered a "developer preview" and hence is not suitable for
production use. Use at your own risk. However, any feedback,
contributions, help and/or patches are very welcome. Please join the
[torodb-dev][8] mailing list for further discussion.For more information, please see [ToroDB's website][1], this
[latest presentation][7] or this [video recording of a presentation][11] about
ToroDB.## Requisites
ToroDB is written in Java and requires:
* A suitable JRE, version 7 or higher. It has been mainly tested with Oracle JRE 8.
* A [PostgreSQL][2] database, version 9.4 or higher. [Download][9].## Download/Installation
### Download the compiled file
You may download the latest version (v. 0.40-alpha2) of ToroDB from
[the release page](https://github.com/torodb/torodb/releases/latest) on the
following packaging formats:
* [tar.bz2](https://github.com/torodb/torodb/releases/download/v0.40-alpha2/torodb.tar.bz2)
* [zip](https://github.com/torodb/torodb/releases/download/v0.40-alpha2/torodb.zip)See below for instructions on how to run it.
You can also find binary files on [ToroDB's maven repository][3].
### Compile and install from sources
To get the latest version, you may compile ToroDB yourself. All the project is written in Java and managed with Maven, so you need a javac and maven.
ToroDB is based on the [Mongo Wire Protocol library][5] (mongowp), which is another library built by [8Kdata][6] to help construct programs that speak the MongoDB protocol. You may also compile this library yourself, or let maven download it from the repository automatically.
Just run `mvn package -P assembler` on the root directory and execute it from
`torodb/target/appassembler/bin` or choose your prefered packaging format from
`torodb/target/dist/`.### Compile and create docker image
To build the docker image the first time run `mvn package -P docker,assembler -Ddocker.skipbase=false` on the root directory.
Next time you will be able to build the torodb docker image running `mvn package -P docker,assembler`.
To run docker containers of ToroDB with PostgreSQL backend just run `mvn docker:run -P docker,assembler -pl :standalone`. You will have now ToroDB running on port 27018 and will be able to watch created table connection to PostgreSQL on port 15432 (user: postgres, password: postgres, database: torod).
## Running ToroDB
ToroDB needs either a configuration file or some command-line parameters
to run. But it can also run without any of them if you follow some
conventions.Before running ToroDB it is necessary to configure the RDBMS with the
ToroDB user that will be responsible to create namespaces, required data
types, tables and indexes.Create user torodb (this is default user name, see ToroDB configuration
to use a different name):=# CREATE USER torodb WITH SUPERUSER PASSWORD '';
Create the database torod (this is default database name, see ToroDB
configuration to use a different name):=# CREATE DATABASE torod OWNER torodb;
The script $TOROHOME/bin/torodb (or torodb.bat) will run ToroDB. ToroDB can be
configured by a configuration file written in YAML or XML formats by
passing arguments -c or -x, respectively, to the script
$TOROHOME/bin/torodb. For example, to run ToroDB with configuration file
torodb.yml, run:$ $TOROHOME/bin/torodb -c torodb.yml
To print default configuration script in YAML or XML format use the
arguments -l an -lx respectively. For example to generate default YAML
configuration file:$ $TOROHOME/bin/torodb -l > torodb.yml
ToroDB connects to the backend database using user torodb (that has been
created in previous step). By default ToroDB reads the file
$HOME/.toropass (file path can be configured in the configuration), if
it exists, that stores the password in PostgreSQL's [.pgpass][4] syntax. The
password can also be specified in clear text in the configuration file or
will be asked at the prompt if the argument -W is issued.To get general help, pass --help argument:
$ $TOROHOME/bin/torodb --help
Use --help-param to get help on all available parameters of the
configuration file:$ $TOROHOME/bin/torodb --help-param
If you setup a .toropass, use torodb as the user and torod as the
database, ToroDB will run without a configuration file (with the rest of
the configuration values with their respective defaults).Once ToroDB is running, connect to it with a normal MongoDB client,
like:$ mongo localhost:27018/torod
## Are you a developer? Want to contribute? Questions about the source code?
Please see [CONTRIBUTING][10].
## Code QA
* Master branch:
[![Build Status](https://travis-ci.org/torodb/server.svg?branch=master)](https://travis-ci.org/torodb/server)
[![Codacy Badge](https://api.codacy.com/project/badge/grade/ba76a3307733492c97c0dfc13beae2c0?branch=master)](https://www.codacy.com/app/torodb/server?utm_source=github.com&utm_medium=referral&utm_content=torodb/server&utm_campaign=Badge_Grade)
[![Codacy Coverage](https://api.codacy.com/project/badge/coverage/ba76a3307733492c97c0dfc13beae2c0?branch=master)](https://www.codacy.com/app/torodb/server?utm_source=github.com&utm_medium=referral&utm_content=torodb/server&utm_campaign=Badge_Grade)
* Devel branch:
[![Build Status](https://travis-ci.org/torodb/server.svg?branch=devel)](https://travis-ci.org/torodb/server)
[![Codacy Badge](https://api.codacy.com/project/badge/grade/ba76a3307733492c97c0dfc13beae2c0?branch=devel)](https://www.codacy.com/app/torodb/server?utm_source=github.com&utm_medium=referral&utm_content=torodb/server&utm_campaign=Badge_Grade)
[![Codacy Coverage](https://api.codacy.com/project/badge/coverage/ba76a3307733492c97c0dfc13beae2c0?branch=devel)](https://www.codacy.com/app/torodb/server?utm_source=github.com&utm_medium=referral&utm_content=torodb/server&utm_campaign=Badge_Grade)[1]: http://www.torodb.com
[2]: http://www.postgresql.org
[3]: https://oss.sonatype.org/content/groups/public/com/torodb/torodb/
[4]: http://www.postgresql.org/docs/9.4/static/libpq-pgpass.html
[5]: https://github.com/8kdata/mongowp
[6]: http://www.8kdata.com
[7]: http://www.slideshare.net/8kdata/torodb-internals-how-to-create-a-nosql-database-on-top-of-sql-55275036
[8]: https://groups.google.com/forum/#!forum/torodb-dev
[9]: http://www.postgresql.org/download/
[10]: https://github.com/torodb/torodb/blob/master/CONTRIBUTING.md
[11]: https://www.youtube.com/watch?v=C2XuOhLrblo