All Projects → ArtemGr → pg_async.rs

ArtemGr / pg_async.rs

Licence: MIT license
Asynchronous, HA (master-master) PostgreSQL driver on top of libpq.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to pg async.rs

ext-pq
PostgreSQL client library (libpq) binding
Stars: ✭ 33 (-17.5%)
Mutual labels:  asynchronous, libpq
Reactivemongo
🍃 Non-blocking, Reactive MongoDB Driver for Scala
Stars: ✭ 825 (+1962.5%)
Mutual labels:  asynchronous, driver
Lwt
OCaml promises and concurrent I/O
Stars: ✭ 505 (+1162.5%)
Mutual labels:  asynchronous, futures
future.callr
🚀 R package future.callr: A Future API for Parallel Processing using 'callr'
Stars: ✭ 52 (+30%)
Mutual labels:  asynchronous, futures
Future
High-performance Future implementation for the JVM
Stars: ✭ 223 (+457.5%)
Mutual labels:  asynchronous, futures
Swiftcoroutine
Swift coroutines for iOS, macOS and Linux.
Stars: ✭ 690 (+1625%)
Mutual labels:  asynchronous, futures
Future
🚀 R package: future: Unified Parallel and Distributed Processing in R for Everyone
Stars: ✭ 735 (+1737.5%)
Mutual labels:  asynchronous, futures
Asynchronous
Implementation-agnostic asynchronous code
Stars: ✭ 13 (-67.5%)
Mutual labels:  asynchronous, futures
Tomorrowland
Lightweight Promises for Swift & Obj-C
Stars: ✭ 106 (+165%)
Mutual labels:  asynchronous, futures
Tk Listen
A library that allows to listen network sockets with proper resource limits and error handling
Stars: ✭ 27 (-32.5%)
Mutual labels:  asynchronous, futures
java-red
Effective Concurrency Modules for Java
Stars: ✭ 25 (-37.5%)
Mutual labels:  asynchronous, futures
tsukuyomi
Asynchronous Web framework for Rust
Stars: ✭ 81 (+102.5%)
Mutual labels:  asynchronous, futures
PromisedFuture
A Swift based Future/Promises framework to help writing asynchronous code in an elegant way
Stars: ✭ 75 (+87.5%)
Mutual labels:  asynchronous, futures
Pyaiodl
A python Asynchronous Downloader - Pyaiodl
Stars: ✭ 40 (+0%)
Mutual labels:  asynchronous
relaks
Asynchrounous React component
Stars: ✭ 49 (+22.5%)
Mutual labels:  asynchronous
tahoe-lafs-public-clouds
tahoe-lafs backend drivers for no-cost cloud providers
Stars: ✭ 25 (-37.5%)
Mutual labels:  driver
awesome-storage
A curated list of storage open source tools. Backups, redundancy, sharing, distribution, encryption, etc.
Stars: ✭ 324 (+710%)
Mutual labels:  high-availability
Apex-Legends-SDK
Open Source Cheat for Apex Legends, designed for ease of use. Made to understand reversing of Apex Legends and respawn's modified source engine as well as their Easy Anti Cheat Implementation.
Stars: ✭ 101 (+152.5%)
Mutual labels:  driver
eruption
Realtime RGB LED Driver for Linux
Stars: ✭ 140 (+250%)
Mutual labels:  driver
mobius-gui
🎨 Reactive & Stream & Driver based UI framework build on Mobius Utils, equipped with neumorphism-derived & utility-first styles.
Stars: ✭ 43 (+7.5%)
Mutual labels:  driver

pg_async.rs

Asynchronous, HA (master-master) PostgreSQL driver on top of libpq.

crate docs patreon

Vision

  • Designed to work with a master-master replicated database, such as BDR (but standalone databases are supported too).
  • Uses libpq, leveraging it's asynchronous support.
  • Maintains an asynchronous connection to every node of the replicated cluster.
  • Pings the nodes (with SELECT 1) to see who's closer/faster.
  • Every operation is a separate transaction.
  • If a node fails, the operation is transparently retried on another node.
  • Operations are exposed as futures.
  • futures are backed by a thread or two and can be used without a tokio reactor (because KISS).
  • Fast mode: send the operation to every node and return the first answer.
  • Pin mode: send the operation to one of the nodes only (useful to avoid some of the master-master conflicts).
  • There is a JSON helper converting table rows to serde_json objects.
  • If the operation wasn't pipelined already, dropping a Future allows the driver to cancel it.
  • Database-level timeouts can be used to terminate slow operations early.

Notes

The combination of libpq and OpenSSL doesn't work very well during PostgreSQL server restarts. I've seen libpq SEGV-crash reliably when the OpenSSL layer is enabled. For the driver to properly work around PostgreSQL server unavailability and restarts I recommend adding the "sslmode=disable" disabler to the connection strings.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].