The spatial message broker and database for real-time multiplayer experiences. Official Rust implementation.

Overview

WorldQL Server Build

Rust implementation of WorldQL, the spatial message broker and database for real-time multiplayer experiences

Setup Instructions

⚠️ This project can only be built on unix-based systems due to the ZeroMQ library we're using only supporting epoll/kqueue. See this issue for more information.

These instructions assume you are using a Debian-based Linux (or WSL) distro, such as Ubuntu. If using WSL, make sure you are using WSL2, as WSL1 has compatibility issues and may not work as expected.

First, install dependency packages for the Rust toolchains.

$ sudo apt-get install -y curl build-essential cmake

Next you will need to install Rust, the easiest way is by using Rustup.

Cloning the Project

If using WSL, ensure you clone the project inside the WSL filesystem. If you use the Windows filesystem (any paths starting with /mnt) then you may experience slower compile times.

Building

cd worldql_server
cargo build

Using VSCode

Ensure you have the Rust Analyzer extension for excellent Rust language support. If using WSL, you will also need the Remote - WSL extension to be able to open the project from within the WSL filesystem.

Using CLion

Simply open the project after installing the Rust plugin and everything should work correctly; you will only need to change one setting. Under Languages & Frameworks > Rust > rustfmt ensure Use rustfmt instead of built-in formatter is checked.

Viewing documentation

To view this project's automatically generated rustdoc documentation, execute ./view_documentation.sh inside the root folder. Human-written docs and guides available at https://docs.worldql.com/

Formatting and Linting

WorldQL uses rustfmt for formatting and Clippy for linting. Both come as standard with a Rustup toolchain installation, but if you don't have them you can simply use Rustup to install them. Note that the current rustfmt formatting rules requires the use of Rust nightly.

# Install Rustup (requires nightly toolchain)
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly

# Install Clippy
rustup component add clippy

Once both are installed, simply run cargo +nightly fmt --verbose to apply formatting and cargo clippy to lint. GitHub Actions CI runs both formatting and linting checks on pushes to trunk and for any pull requests to ensure standard formatting and catch lint failures.

You might also like...
LIMITS is yet another fully open source, interoperable, decentralised real-time communication protocol!

LIMITS: Limit-IM does not have ITS LIMITS We are undergoing a major refactoring and technology stack adjustment to better accommodate clustered deploy

tzdb — Time Zone Database

tzdb — Time Zone Database Static time zone information for tz-rs. This crate provides all time zones found in the Time Zone Database, currently in the

A high-performance, distributed, schema-less, cloud native time-series database
A high-performance, distributed, schema-less, cloud native time-series database

CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

The official MongoDB Rust Driver

MongoDB Rust Driver This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with Mon

Official Skytable client driver for Rust

Skytable client Introduction This library is the official client for the free and open-source NoSQL database Skytable. First, go ahead and install Sky

Official Rust client for Central Dogma

centraldogma-rs Official Rust Client for Central Dogma. Full documentation is available at https://docs.rs/centraldogma Getting started Installing Add

This is superseded by the official MongoDB Rust Driver

This Repository is NOT a supported MongoDB product MongoDB Rust Driver Prototype NOTE: This driver is superseded by the official MongoDB Rust driver,

A pure Rust database implementation using an append-only B-Tree file format.

nebari nebari - noun - the surface roots that flare out from the base of a bonsai tree Warning: This crate is early in development. The format of the

A mini kv database demo that using simplified bitcask storage model with rust implementation

A mini kv database demo that using simplified bitcask storage model with rust implementation.

Comments
  • Allow clients to send GlobalMessages over HTTP

    Allow clients to send GlobalMessages over HTTP

    Why? Users want to be able to send a simple POST request to broadcast a global message to all connected clients. This is useful for integrating WorldQL-powered services with external systems. HTTP is WAY easier to use than websockets and doesn't require any additional client libraries.

    What? WorldQL should run an HTTP server in addition to ZeroMQ and WebSocket listeners. There are a variety of options that fit into the tokio event loop, but hyper seems to be the most popular. It should listen for incoming messages on a POST /global_message endpoint which accepts the following request

    {
        // HTTP headers. Use basic auth token defined by a new WQL_HTTP_AUTH_TOKEN environment variable
        headers: {'Authorization': 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ'},
        // request payload. Sent as a JSON string.
        data: {'instruction': 'GlobalMessage', 'parameter': 'ExampleIntegrationRPC', 'world': '@global'}
    }
    

    The server should process this request, marshal the data into an internal Message struct, and process the GlobalMessage.

    The scope of this mission is very limited: for now, we only need GlobalMessage support and we're fine with the most basic auth possible. Additionally, the /global_message endpoint does not have to return any meaningful data to the requester. A simple 200 response with no body will suffice.

    opened by Jaxkr 0
  • Multi-master support

    Multi-master support

    Sometimes databases fails, and WorldQL clients must switch to another server. To maintain consistency, servers must synchonize changes.

    Is WorldQL supporting that now?

    opened by Saiv46 0
  • Postgis option can be interesting

    Postgis option can be interesting

    Hello, I have readed the code corresponding to records stored in database. If i am correct you are using postgresql to store it. I think you can optimize the region management by using posgis. http://postgis.net/workshops/postgis-intro/indexing.html

    The idea is to create bounding box based on xmin, xmax, ymin, ymax of each area. By using postgis you can create geographical index by example an quadtree. An other option can be to store points objects directly in records and create an rtree index to easily get records or entity by distance. This option can maybe not really useful on mammoth by can be usable in other cases and allow more complex features.

    Your project is so interesting that i have started reading rust for the first time.

    opened by Asteb612 0
Releases(v0.1.0)
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

Skytable 1.4k Dec 29, 2022
A simple library for Firebase real-time database

Firerust A very simple library to implement the Firebase real-time database in your code with the best performance Instalation Add this to your Cargo.

Daniel Dimbarre 1 Apr 15, 2022
A Distributed SQL Database - Building the Database in the Public to Learn Database Internals

Table of Contents Overview Usage TODO MVCC in entangleDB SQL Query Execution in entangleDB entangleDB Raft Consensus Engine What I am trying to build

Sarthak Dalabehera 38 Jan 2, 2024
Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis

OnTimeDB Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis OnTimeDB is a time

Stuart 2 Apr 5, 2022
The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

null 12 Nov 18, 2022
Seed your development database with real data ⚡️

Seed Your Development Database With Real Data ⚡️ Replibyte is a blazingly fast tool to seed your databases with your production data while keeping sen

Qovery 3.4k Jan 2, 2023
An implementation of the tz database for the time-rs Rust crate.

time-tz An implementation of the tz database for the time-rs Rust crate. This implementation is based off of chrono-tz

null 12 Jul 27, 2022
Materialize simplifies application development with streaming data. Incrementally-updated materialized views - in PostgreSQL and in real time. Materialize is powered by Timely Dataflow.

Materialize is a streaming database for real-time applications. Get started Check out our getting started guide. About Materialize lets you ask questi

Materialize, Inc. 4.7k Jan 8, 2023
A dotfiles manager, with real time fle watching and 100% less sym-links!

Kubo A dotfile manager that watches files in real time. Usage Create a directory called .kubo in $HOME, then create a file called kubo.toml in .kubo.

StandingPad 5 Jul 24, 2023
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Datafuse Labs 5k Jan 9, 2023