{"id":13989202,"url":"https://github.com/torodb/server","last_synced_at":"2026-02-11T23:44:27.763Z","repository":{"id":86345052,"uuid":"86339169","full_name":"torodb/server","owner":"torodb","description":"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","archived":false,"fork":false,"pushed_at":"2017-07-03T09:34:53.000Z","size":14015,"stargazers_count":114,"open_issues_count":1,"forks_count":20,"subscribers_count":5,"default_branch":"devel","last_synced_at":"2024-11-29T08:38:17.604Z","etag":null,"topics":["mongodb","nosql","nosql-transactions","torodb"],"latest_commit_sha":null,"homepage":"https://www.torodb.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torodb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-GNU_AGPLv3.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-27T13:33:08.000Z","updated_at":"2024-11-22T04:19:58.000Z","dependencies_parsed_at":"2023-03-17T18:00:45.101Z","dependency_job_id":null,"html_url":"https://github.com/torodb/server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/torodb/server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torodb%2Fserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torodb%2Fserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torodb%2Fserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torodb%2Fserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torodb","download_url":"https://codeload.github.com/torodb/server/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torodb%2Fserver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266475113,"owners_count":23934884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","nosql","nosql-transactions","torodb"],"created_at":"2024-08-09T13:01:33.477Z","updated_at":"2026-02-11T23:44:27.708Z","avatar_url":"https://github.com/torodb.png","language":"Java","funding_links":[],"categories":["Java","数据库"],"sub_categories":[],"readme":"ToroDB\n======\n\nToroDB is an open source project that turns your RDBMS into a\nMongoDB-compatible server, supporting the MongoDB query API and\nMongoDB's replication, but storing your data into a reliable and trusted\nACID database. ToroDB currently supports PostgreSQL as a backend, but\nothers will be added in the future.\n\nToroDB natively implements the MongoDB protocol, so you can use it with\nMongoDB tools and drivers, and features a document-to-relational mapping\nalgorithm that transforms the JSON documents into relational tables.\nToroDB also offers a native SQL layer and automatic data normalization\nand partitioning based on JSON documents' implicit schema.\n\nToroDB follows a RERO (Release Early, Release Often) policy. Current version is\nconsidered a \"developer preview\" and hence is not suitable for\nproduction use. Use at your own risk. However, any feedback,\ncontributions, help and/or patches are very welcome. Please join the\n[torodb-dev][8] mailing list for further discussion.\n\nFor more information, please see [ToroDB's website][1], this \n[latest presentation][7] or this [video recording of a presentation][11] about \nToroDB.\n\n## Requisites\n\nToroDB is written in Java and requires:\n\n* A suitable JRE, version 7 or higher. It has been mainly tested with Oracle JRE 8.\n* A [PostgreSQL][2] database, version 9.4 or higher. [Download][9].\n\n\n## Download/Installation\n\n### Download the compiled file\n\nYou may download the latest version (v. 0.40-alpha2) of ToroDB from \n[the release page](https://github.com/torodb/torodb/releases/latest) on the \nfollowing packaging formats:\n * [tar.bz2](https://github.com/torodb/torodb/releases/download/v0.40-alpha2/torodb.tar.bz2)\n * [zip](https://github.com/torodb/torodb/releases/download/v0.40-alpha2/torodb.zip)\n\nSee below for instructions on how to run it.\n\nYou can also find binary files on [ToroDB's maven repository][3].\n\n\n### Compile and install from sources\n\nTo 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.\n\nToroDB 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.\n\nJust run `mvn package -P assembler` on the root directory and execute it from \n`torodb/target/appassembler/bin` or choose your prefered packaging format from\n`torodb/target/dist/`.\n\n### Compile and create docker image\n\nTo build the docker image the first time run `mvn package -P docker,assembler -Ddocker.skipbase=false` on the root directory.\n\nNext time you will be able to build the torodb docker image running `mvn package -P docker,assembler`.\n\nTo 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).\n\n## Running ToroDB\n\nToroDB needs either a configuration file or some command-line parameters\nto run. But it can also run without any of them if you follow some\nconventions.\n\nBefore running ToroDB it is necessary to configure the RDBMS with the\nToroDB user that will be responsible to create namespaces, required data\ntypes, tables and indexes. \n\nCreate user torodb (this is default user name, see ToroDB configuration\nto use a different name):\n\n    =# CREATE USER torodb WITH  SUPERUSER PASSWORD '\u003cyour-password\u003e';\n\nCreate the database torod (this is default database name, see ToroDB\nconfiguration to use a different name):\n\n    =# CREATE DATABASE torod OWNER torodb;\n\nThe script $TOROHOME/bin/torodb (or torodb.bat) will run ToroDB. ToroDB can be\nconfigured by a configuration file written in YAML or XML formats by\npassing arguments -c or -x, respectively, to the script\n$TOROHOME/bin/torodb. For example, to run ToroDB with configuration file\ntorodb.yml, run:\n\n    $ $TOROHOME/bin/torodb -c torodb.yml\n\nTo print default configuration script in YAML or XML format use the\narguments -l an -lx respectively. For example to generate default YAML\nconfiguration file:\n\n    $ $TOROHOME/bin/torodb -l \u003e torodb.yml\n\nToroDB connects to the backend database using user torodb (that has been\ncreated in previous step). By default ToroDB reads the file\n$HOME/.toropass (file path can be configured in the configuration), if\nit exists, that stores the password in PostgreSQL's [.pgpass][4] syntax. The\npassword can also be specified in clear text in the configuration file or\nwill be asked at the prompt if the argument -W is issued.\n\nTo get general help, pass --help argument:\n\n    $ $TOROHOME/bin/torodb --help\n\nUse --help-param to get help on all available parameters of the\nconfiguration file:\n\n    $ $TOROHOME/bin/torodb --help-param\n\nIf you setup a .toropass, use torodb as the user and torod as the\ndatabase, ToroDB will run without a configuration file (with the rest of\nthe configuration values with their respective defaults).\n\nOnce ToroDB is running, connect to it with a normal MongoDB client,\nlike:\n\n    $ mongo localhost:27018/torod\n\n\n## Are you a developer? Want to contribute? Questions about the source code?\n\nPlease see [CONTRIBUTING][10].\n\n## Code QA\n * Master branch: \n[![Build Status](https://travis-ci.org/torodb/server.svg?branch=master)](https://travis-ci.org/torodb/server)\n[![Codacy Badge](https://api.codacy.com/project/badge/grade/ba76a3307733492c97c0dfc13beae2c0?branch=master)](https://www.codacy.com/app/torodb/server?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=torodb/server\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Coverage](https://api.codacy.com/project/badge/coverage/ba76a3307733492c97c0dfc13beae2c0?branch=master)](https://www.codacy.com/app/torodb/server?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=torodb/server\u0026amp;utm_campaign=Badge_Grade)\n * Devel branch:\n[![Build Status](https://travis-ci.org/torodb/server.svg?branch=devel)](https://travis-ci.org/torodb/server)\n[![Codacy Badge](https://api.codacy.com/project/badge/grade/ba76a3307733492c97c0dfc13beae2c0?branch=devel)](https://www.codacy.com/app/torodb/server?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=torodb/server\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Coverage](https://api.codacy.com/project/badge/coverage/ba76a3307733492c97c0dfc13beae2c0?branch=devel)](https://www.codacy.com/app/torodb/server?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=torodb/server\u0026amp;utm_campaign=Badge_Grade)\n\n[1]: http://www.torodb.com\n[2]: http://www.postgresql.org\n[3]: https://oss.sonatype.org/content/groups/public/com/torodb/torodb/\n[4]: http://www.postgresql.org/docs/9.4/static/libpq-pgpass.html\n[5]: https://github.com/8kdata/mongowp\n[6]: http://www.8kdata.com\n[7]: http://www.slideshare.net/8kdata/torodb-internals-how-to-create-a-nosql-database-on-top-of-sql-55275036\n[8]: https://groups.google.com/forum/#!forum/torodb-dev\n[9]: http://www.postgresql.org/download/\n[10]: https://github.com/torodb/torodb/blob/master/CONTRIBUTING.md\n[11]: https://www.youtube.com/watch?v=C2XuOhLrblo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorodb%2Fserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorodb%2Fserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorodb%2Fserver/lists"}