{"id":13672182,"url":"https://github.com/alex-dukhno/isomorphicdb","last_synced_at":"2025-04-27T21:32:19.157Z","repository":{"id":46723844,"uuid":"258554917","full_name":"alex-dukhno/isomorphicdb","owner":"alex-dukhno","description":"The core repository of implementing PostgreSQL compatible distributed database in Rust","archived":true,"fork":false,"pushed_at":"2021-09-28T11:23:18.000Z","size":2732,"stargazers_count":224,"open_issues_count":53,"forks_count":20,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-11-11T10:42:18.704Z","etag":null,"topics":["database","postgresql","relational-databases","sql"],"latest_commit_sha":null,"homepage":"http://isomorphicdb.io/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alex-dukhno.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-24T15:44:20.000Z","updated_at":"2024-09-11T06:05:16.000Z","dependencies_parsed_at":"2022-09-11T23:41:45.569Z","dependency_job_id":null,"html_url":"https://github.com/alex-dukhno/isomorphicdb","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-dukhno%2Fisomorphicdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-dukhno%2Fisomorphicdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-dukhno%2Fisomorphicdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-dukhno%2Fisomorphicdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-dukhno","download_url":"https://codeload.github.com/alex-dukhno/isomorphicdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251212362,"owners_count":21553456,"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","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":["database","postgresql","relational-databases","sql"],"created_at":"2024-08-02T09:01:28.532Z","updated_at":"2025-04-27T21:32:18.645Z","avatar_url":"https://github.com/alex-dukhno.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# IsomorphicDB\n\n![Merge](https://github.com/alex-dukhno/isomorphicdb/workflows/Merge/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/alex-dukhno/isomorphicdb/badge.svg?branch=main)](https://coveralls.io/github/alex-dukhno/isomorphicdb?branch=main)\n\u003ca href=\"https://discord.gg/PUcTcfU\"\u003e\u003cimg src=\"https://img.shields.io/discord/509773073294295082.svg?logo=discord\"\u003e\u003c/a\u003e\n\n## TODO List\n\n* [ ] PostgreSQL compatibility\n    * [ ] PostgreSQL wire protocol\n    * [ ] Data types\n    * [ ] Data definition language\n        * [ ] Create/Drop/Alter table\n        * [ ] Create/Drop index\n        * [ ] Primary/Foreign keys\n        * [ ] Check constraints\n    * [ ] Data manipulation language\n* [ ] Transactions\n* [ ] Reactive Dataflow query execution\n    * [ ] With RSocket for inter node communication\n* [ ] Query compilation\n* [ ] HTAP (Hybrid transactional/analytical processing)\n* [ ] Raft replication\n* [ ] Operability\n    * [ ] Smooth version upgrade\n    * [ ] Ease of adding/removing node from the cluster (including quick replication)\n    * [ ] Self-driving\n\n## Play around with project\n\nSee [docs](./docs/.)\n\n## Project structure\n\n* `docs/` - project documentation\n* `etc/` - scripts for convenient run of compatibility tests and other tools\n    * `ci/` - script helpers to run commands on `GitHub Actions`\n    * `local/` - scripts for local usage\n* `gradle/` - gradle wrapper to run `tests/compatibility` tests\n* `node_engine/` - module that glues all other together to handle incoming network request and execute it across other modules\n* `postgres/` - crate to consolidate PostgreSQL functionality\n    * `query_ast/` - abstract syntax tree of parsed SQL query\n    * `query_parser/` - parser that produce AST from SQL string\n    * `query_response/` - module to represent successful or error response after query execution to a client\n* `sql_engine/` - crate to consolidate SQL query engine functionality\n    * `catalog/` - API for accessing data and its definition\n    * `data_definition/` - group of modules responsible to represent `SQL DDL` queries\n        * `execution_plan` - data structures responsible for representing operations of `Data Definition Language` part of `SQL`\n    * `data_manipulation/` - group of modules responsible to represent `SQL DML` queries\n        * `operators/` - SQL operators like `+`, `-`, `LIKE`, `AND`, `OR` and others\n        * `query_plan/` - query plan that is executed over database data\n        * `query_result/` - internal representation of query execution result\n        * `typed_queries/` - represents query structure that is ready for type coercion and type check\n        * `typed_tree/` - typed binary tree of SQL operators\n        * `untyped_queries/` - represents query structure that is ready for type resolution\n        * `untyped_tree/` - untyped binary tree of SQL operators\n    * `definition_planner/` - API to create execution plan for a DDL query\n    * `entities/` - database entities\n        * `definition/` - database object names and its definitions\n        * `types/` - SQL types\n    * `query_analyzer/` - API to analyse a parsed SQL query\n    * `query_planner/` - API to create execution plan for a SQL query\n    * `query_processing/` - API to process a parsed/analyzed SQL query\n        * `type_check/`\n        * `type_coercion/`\n        * `type_inference/`\n    * `scalar/` - representing primitive types as a scalar value that can be use as intermediate computational result\n* `storage/` - database transactional storage\n    * `api/` - type aliases and traits that defines api for `in_memory` and `persistent` storage\n    * `binary/` - representing primitive types as a raw binary vector\n    * `in_memory/` - in memory only storage\n    * `persistent/` - persistent storage\n* `tests/`\n    * `compatibility/` - groovy based tests to check compatibility with [PostgreSQL](https://www.postgresql.org/)\n    * `erlang_client/` - erlang based tests\n    * `fixtures/` - files needed to set up non-default local testing\n\n## Development\n\n### Build time dependencies\n\n`isomorphicdb` uses [postgres-parser](https://github.com/zombodb/postgres-parser) to parse PostgreSQL 13 SQL syntax which\nrequires LLVM. Thus, to build project you need to install LLVM and add it to `$PATH`\n\nOn Ubuntu the following command should be sufficient:\n```shell\nsudo apt install llvm\n```\n\nOn MacOS with `zsh`\n```shell\nbrew install llvm\necho 'export PATH=\"/usr/local/opt/llvm/bin:$PATH\"' ~/.zshrc\nsource ~/.zshrc \n```\n\n### Setting up integration suite for local testing\n\nFor now, it is local and manual - that means some software has to be installed \non a local machine and queries result has to be checked visually.\n\n1. Install `psql` ([PostgreSQL client](https://www.postgresql.org))\n    1. Often it comes with `PostgreSQL` binaries. On macOS, you can install it \n    with `brew` executing the following command:\n    ```shell script\n    brew install postgresql\n    ```\n1. Start the `isomorphicdb` instance with the command:\n    ```shell script\n    cargo run\n    ```\n1. Start `psql` with the following command:\n    ```shell script\n    psql -h 127.0.0.1 -W\n    ```\n    1. enter any password\n1. Run `sql` scripts from `compatibility` folder\n\n### Compute code coverage locally\n\n1. Run `./etc/local/code_coverage.sh`\n1. Open `./target/debug/coverage/index.html` in your browser\n\n### Running Compatibility tests locally\n\n1. Install `java` version `8` or `11`(that were tested)\n1. (Optional) Install `gradle` version `6` (that were tested)\n1. Run `RUST_LOG=debug cargo run` from project folder in separate terminal window\n1. Run `./etc/local/compatibility.sh`\n\n### Running Erlang Client Compatibility tests locally\n\n1. Install `Erlang` version `23.1` (which is tested on CI now). You could\ninstall a specified version of Erlang via [asdf](https://github.com/asdf-vm/asdf).\n1. Install [rebar3](https://github.com/erlang/rebar3) to run Erlang Common Test.\n1. Run `./etc/ci/erlang_client.sh`.\n1. Kill `isomorphicdb` process manually for running the tests again.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-dukhno%2Fisomorphicdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-dukhno%2Fisomorphicdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-dukhno%2Fisomorphicdb/lists"}