Overview and what carries over
A table of which database's clients, queries and data Raft DB can take over, which it cannot, and how to choose the way in.
Raft DB can replace another database in two different ways, and they are not equally easy:
- Keep the client. Raft DB answers the wire protocol of the other database, so the driver, the tools and the SQL stay as they are and only the address changes. This works for MySQL, MariaDB, PostgreSQL and SQL Server, and for Neo4j (graph, still in development).
- Move the application. Raft DB has no wire protocol for the database you use, so the application is changed to use Raft DB's own HTTP/JSON API or its connectors. This is the case for MongoDB and Redis, and for SQLite (which has no server to speak to).
| You use | Way in | What you change | What does not carry over |
|---|---|---|---|
| MySQL, MariaDB | The MySQL protocol (raftdb-mysql, port 3306) | Host, port, account | Anything on the list of what is not supported |
| PostgreSQL | The PostgreSQL protocol (raftdb-pg, port 5432) | Host, port, account | Extensions, and the items on the PostgreSQL limits page |
| SQL Server | The TDS protocol (raftdb-mssql, port 1433) | Host, port, account | Anything on the SQL Server limits |
| Neo4j | Bolt and Cypher (in development) | Address | Differences on the graph limits page |
| MongoDB | Raft DB's HTTP API or a connector | The data-access code | The Mongo wire protocol, update operators, aggregation pipeline |
| Redis | Raft DB's HTTP API or a connector | The data-access code | The Redis protocol, data structures, expiry (TTL), publish and subscribe |
| SQLite | A MySQL or PostgreSQL driver, or the HTTP API | The connection and the dialect differences | Running inside the application's process |
What Raft DB does not have, in one place#
So that nothing here is a surprise later:
- No MongoDB wire protocol: a MongoDB driver cannot connect,
mongoshcannot connect. - No Redis protocol:
redis-cliand Redis client libraries cannot connect. - No key expiry (TTL) of any kind.
- No aggregation pipeline, and no update operators (
$set,$inc, ...): a document is read, changed by the caller and written back whole. - No Redis lists, sets, sorted sets, hashes as such, counters or publish and subscribe.
- Isolation between SQL sessions is per table at the
READ-COMMITTEDlevel, not snapshot or repeatable read. - Pre-release software: a long production track record is not there yet.
The common first steps#
- Install Raft DB and start it (Installing).
- Make an account for the application (never reuse the administrator's).
- Move a copy of the data, not the original. Each page below says how.
- Run the application's own tests against it, and read the list of unsupported items for the dialect you use before moving anything real.
- Keep the old database until the new one has run your real workload.
Raft DB is independent software. It is not affiliated with, endorsed by or derived from any of the products named in this chapter; their names are used only to say which clients and formats it works with.