IceFireDB-SQLite

command
v1.0.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2025 License: MIT, MIT Imports: 11 Imported by: 0

README

IceFireDB-SQLite

IceFireDB SQLite is a decentralized SQLite database designed to facilitate the construction of a global distributed database system. It allows users to write data to IceFireDB using the MySQL protocol. The data is stored in an SQLite database and automatically synchronized among nodes through P2P networking.

Overview

IceFireDB SQLite combines the simplicity of SQLite with the power of decentralized P2P networking, enabling seamless data synchronization across multiple nodes. This setup is ideal for applications requiring high availability, fault tolerance, and global data distribution.

How It Works

Framework

The system operates by leveraging P2P networking to synchronize data across multiple SQLite instances. Each node in the network can act as both a client and a server, ensuring that data is replicated and available across the entire network.

Getting Started

Installation
  1. Clone the Repository

    git clone https://github.com/IceFireDB/IceFireDB.git
    
  2. Build the Project

    cd IceFireDB-SQLite
    make
    IceFireDB-SQLite -h
    
Configuration

IceFireDB SQLite can be configured using a YAML file to tailor its behavior to your needs. Below is an example configuration file with detailed explanations for each parameter:

server:
  addr: ":23306" # Network listening address, supports MySQL protocol

sqlite:
  filename: "db/sqlite.db" # Path to the SQLite database file

debug:  # Control to open pprof
  enable: false # Enable or disable pprof profiling
  port: 17878 # Port for pprof profiling

# P2P configuration
p2p:
  enable: true # Enable or disable P2P networking
  service_discovery_id: "p2p_sqlite_service" # Unique identifier for service discovery
  service_command_topic: "p2p_sqlite_service_topic" # Topic for service commands
  service_discover_mode: "advertise" # Mode for service discovery: advertise or announce
  node_host_ip: "127.0.0.1" # Can be configured as a public IP
  node_host_port: 0 # Port for the node, 0 means any available port

# Tenant list
userlist:
  - user: root # Username for the tenant
    password: 123456 # Password for the tenant
Application Scenarios
  1. Decentralized SQLite Database: Build a decentralized SQLite database using the MySQL usage protocol, suitable for applications requiring distributed data storage and synchronization.

Feature Support

  • [✔️] P2P Support: Enabled for decentralized data synchronization.
  • [✔️] mariadb-client Client Support: Allows interaction via mariadb-client interface.
  • [✔️] Golang Gorm Support: Integration with Gorm for seamless database operations in Go applications.

Demo Video

For a visual demonstration of IceFireDB SQLite in action, please watch the demo video.

Disclaimers

By using this software, you agree that the author, maintainer, and contributors are not responsible for any risks, costs, or problems you may encounter. If you find a software defect or bug, please submit a patch to help improve it!

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
pkg
p2p

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL