A real-time data backend for browser-based applications.

Overview

DriftDB

GitHub Repo stars crates.io docs.rs docs.rs Test Chat on Discord

DriftDB is a real-time data backend for browser-based applications.

For more information, see driftdb.com.

Structure of this repo

  • docs/: main online documentation and website for driftdb, available on the web at driftdb.com.
  • driftdb/: core Rust driftdb implementation.
  • driftdb-server/: Rust crate of driftdb dev server.
  • driftdb-worker/: driftdb implementation on Cloudflare Workers.
  • js-pkg/: JavaScript package root.
    • demos/: next.js project containing several demos, available on the web at demos.driftdb.com.
    • driftdb/: JavaScript client library for driftdb.
    • driftdb-react/: Higher-level React hook-based interface to driftdb.
    • driftdb-ui/: React-based debug UI for driftdb, available on the web at ui.driftdb.com.
Comments
  • Fix Tic-tac-toe game logic

    Fix Tic-tac-toe game logic

    Previously, Player "O" could never win because there was a null check of state.board[a] but since Player.O was represented by a 0 value enum, this condition was false. Replaced with an explicit null check.

    opened by dav-s 4
  • Match the functionality of `useState` and `useReducer` in React

    Match the functionality of `useState` and `useReducer` in React

    • useSharedState should allow a function to be passed instead of a literal value. The function is evaluated on the current (local) value of the state.
    • useSharedReducer should take an optional init function that takes the prior argument and returns the first state.

    The functions will still differ from their React counterparts in that they will take a key as the first parameter.

    opened by paulgb 0
  • Extract JS from React lib

    Extract JS from React lib

    First step of #22, and also a step on the path to first-class support for non-React frameworks.

    • [x] Move logic of useSharedState into driftdb
    • [x] Move logic of usePresence into driftdb
    • [x] Move logic of useUniqueClientID into driftdb
    • [ ] Move logic of useSharedReducer into driftdb

    This will also make the inner logic of these functions more testable, but adding tests is beyond the scope of this PR.

    opened by paulgb 3
  • useSharedReducer should only compact when idle

    useSharedReducer should only compact when idle

    Wait until the dispatch function has not been called for (say) 100ms before attempting a rollup.

    Only do a rollup if the size passes the threshold as of the last message sent by DriftDB.

    opened by paulgb 0
  • Improve optimistic application of shared reducers

    Improve optimistic application of shared reducers

    Currently, shared reducers will advance optimistically on the client side, but slide back as states start coming in from the server.

    Instead, we should:

    • Keep a queue of local messages that have been applied optimistically.
    • As messages from the server come in, compare them with the message at the back of the queue.
      • If the back of the queue is an exact match, discard it from the queue
      • If the back of the queue is not an exact match, throw out the queue and roll back and apply it
    opened by paulgb 0
  • Document vanilla JS API

    Document vanilla JS API

    People want to use DriftDB in non-React environments (Svelte and SolidJS so far). We should:

    • [ ] Extract useful bits that are currently in React hooks (collaborative compaction, debounced state storage) into the JS API
    • [ ] Document it
    opened by paulgb 0
Owner
drifting in space
Server infrastructure to supercharge browser-based tools.
drifting in space
A real-time mixer

Pagana Pagana is a real-time mixer. This project is still in early stages of development and is not ready for any kind of production use or testing. D

null 1 Nov 26, 2021
An expression based data notation, aimed at transpiling itself to any cascaded data notation.

Lala An expression oriented data notation, aimed at transpiling itself to any cascaded data notation. Lala is separated into three components: Nana, L

null 37 Mar 9, 2022
A perfect smoother; A discrete time version of spline smoothing for equally spaced data

Whittaker Smoother Aka Whittaker-Henderson, Whittaker-Eilers Smoother is known as the perfect smoother. Its a discrete-time version of spline smoothin

Mathis Wellmann 3 Aug 12, 2023
This repository serves as the backend for the Torrust Index project.

Torrust Index Backend ?? Important Updates ?? None at the moment ACCESS ALL UPDATES Index PROJECT DESCRIPTION PROJECT ROADMAP DOCUMENTATION INSTALLATI

Torrust 6 Dec 15, 2022
Zomby7e's Blog - Backend

7eblog_backend Zomby7e's Blog - Backend, is just a micro blog backend. This project is written in Rust, it depends on Actix, uses SQLite to store data

Zomby7e 2 Aug 26, 2022
A backend framework for building fast and flexible APIs rapidly.

Andromeda Andromeda is a backend framework for Rust, to simplify the development of the kinds of basic API services that we developers have to build s

Framesurge 7 Dec 28, 2022
A candidate backend for the Telegram channel @KonachanPopular

Konachan Popular (Rust) This repository contains the source code of the backend program running the Telegram channel @KonachanPopular. Run in a Contai

K4YT3X 10 Jan 3, 2023
A Noir's backend implementation using gnark

Using gnark as a backend for Noir If you want to develop a backend for Noir, basically what you need to do is to translate an ACIR (Abstract Circuit I

Lambdaclass 13 Mar 4, 2023
Dataflow system for building self-driving car and robotics applications.

ERDOS ERDOS is a platform for developing self-driving cars and robotics applications. Getting started The easiest way to get ERDOS running is to use o

ERDOS 163 Dec 29, 2022
An efficient runtime for asynchronous applications in Rust.

PhotonIO PhotonIO is an efficient runtime for asynchronous applications in Rust. Features Asynchronous filesystem and networking I/O for Linux based o

PhotonDB 40 Jan 4, 2023
A project for developing Rust applications

rust_dev This is a project for developing Rust applications. The goal of this project is to provide a solid foundation for building robust and scalabl

Harsh agarwal 4 Feb 7, 2023
CloudLLM is a Rust library designed to seamlessly bridge applications with remote Language Learning Models (LLMs) across various platforms.

CloudLLM CloudLLM is a Rust library designed to seamlessly bridge applications with remote Language Learning Models (LLMs) across various platforms. W

null 4 Oct 13, 2023
Safe, comp time generated queries in rust

query_builder For each struct field following methods will be generated. All fields where_FIELDNAME_eq Numeric fields where_FIELDNAME_le where_FIELDNA

Amirreza Askarpour 2 Oct 31, 2021
Compile time static maps for Rust

Rust-PHF Documentation Rust-PHF is a library to generate efficient lookup tables at compile time using perfect hash functions. It currently uses the C

null 1.3k Jan 1, 2023
Isn't it time to be a bit nicer to rustc?

politeness-macro Aren't we all too rude to computers? Isn't it time to bring a bit more politeness into our programming? Shouldn't we be a bit nicer t

Rin 6 Mar 11, 2022
Simple time handling in Rust

time Documentation: latest release main branch book Minimum Rust version policy The time crate is guaranteed to compile with any release of rustc from

Time 680 Dec 31, 2022
Fast and simple datetime, date, time and duration parsing for rust.

speedate Fast and simple datetime, date, time and duration parsing for rust. speedate is a lax† RFC 3339 date and time parser, in other words, it pars

Samuel Colvin 43 Nov 25, 2022
Compile-time stuff and other goodies for rustaceans 🦀

?? bagel: Always baked, never fried bagel is a collection of macros and other things that we frequently use at Skytable, primarily to get work done at

Skytable 3 Jul 4, 2022
Rust crate: Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation.

overloaded_literals   Overloaded Literals to construct your datatypes without boilerplate and with compile-time validation. Features Compile-time vali

Qqwy / Marten 6 Apr 14, 2023