Giter VIP home page Giter VIP logo

sqlite-queue's Introduction

sqlite-queue

⚠️ This project is still in pre-alpha stage ⚠️

sqlite-queue is a simple program that adds support for concurrent write queries to sqlite3

How does it work?

Each new incoming query is safely added to a queue and then executed one by one

Usage

Run sqlite-queue binary with path to sqlite3 db file, like so:

  sqlite-queue <path-to-db>

Each process/thread that wants to send query has to connect via UNIX domain socket with SOCK_SEQPACKET type, to /tmp/sqlite-queue.socket

In order to send query process/thread has to write to socket two text messages:

  • amount of bytes(characters) in query
  • and a text query

In order to close socket connection write to socket these two text messages (without quotation marks):

  • "4e"
  • "exit"

Installation

From source

Clone repository:

  git clone https://github.com/strang1ato/sqlite-queue.git

Make sure that you have gcc, make, sqlite3 and libsqlite3-dev installed (example for debian/ubuntu):

  sudo apt-get install build-essential sqlite3 libsqlite3-dev

cd to cloned repository and run make build

and move sqlite-queue binary to directory in $PATH

x86_64 binary

If your architecture is x86_64 then feel free to install latest binary from releases

then make the file executable by for example:

  chmod +x <path-to-sqlite-queue>

and move sqlite-queue binary to directory in $PATH

sqlite-queue's People

Contributors

strang1ato avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.