IceFireDB-SQLite

IceFireDB-SQLite #

A MySQL-protocol server that stores data in a local SQLite file and propagates statements to peers, so every node can answer SQL queries against its own copy.

cd IceFireDB-SQLite
make                                 # → bin/IceFireDB-SQLite
./bin/IceFireDB-SQLite -c ./config/config.yaml

mysql -h 127.0.0.1 -P 23306 -u root -p    # password from userlist in the config

What it is #

PropertyValue
ProtocolMySQL wire protocol (MySQL clients, drivers, ORMs)
StorageSQLite file, sqlite.filename
ReplicationStatements propagated between peers over libp2p
Listenerserver.addr, default :23306
Binarybin/IceFireDB-SQLite (-c <config.yaml>)

Configuration (config/config.yaml) #

KeyMeaningDefault in file
server.addrMySQL listener":23306"
sqlite.filenameSQLite database filedb/sqlite.db
debug.enable / .portpprof serverfalse / 17878
p2p.enableP2P replicationtrue
p2p.service_discovery_idRendezvous name, must match peersp2p_sqlite_service
p2p.service_command_topicCommand channelp2p_sqlite_service_topic
p2p.service_discover_modeadvertise or announceadvertise
p2p.node_host_ip / node_host_portAddress peers should dial127.0.0.1 / 0
userlistTenant users: user + passwordroot / 123456

Operational notes #

  • The sample password is 123456. Change userlist before exposing the port — MySQL clients will happily connect with it.
  • Statements are replayed on peers, so non-deterministic SQL (NOW(), RAND(), UUID()) can diverge between nodes. Keep statements deterministic, or accept drift.
  • Each node holds a full copy in its own SQLite file; there is no sharding or leader election.
  • Schema changes propagate like any other statement: run them at a quiet moment, not concurrently with writes.

Relationship to the NoSQL engine #

Different binary, different protocol, different consistency story: no Raft, no RESP, no shared storage driver. Use it when the application is SQL-shaped and per-node reads are the goal; use the NoSQL engine when you need Raft consistency and RESP.