All Projects → johto → allas

johto / allas

Licence: MIT license
LISTEN / NOTIFY connection pooler for PostgreSQL

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to allas

pg-pubsub
Reliable PostgreSQL LISTEN/NOTIFY with inter-process lock support
Stars: ✭ 50 (+25%)
Mutual labels:  listen, notify
simple-notify
Pure javascript toast notifications.
Stars: ✭ 108 (+170%)
Mutual labels:  notify
News Ton
Stars: ✭ 7 (-82.5%)
Mutual labels:  listen
Konamicode
Installs the Konami code easter-egg into your Android app ;)
Stars: ✭ 90 (+125%)
Mutual labels:  listen
Andantino
Listen some notes and try to find same notes on the keyboard.
Stars: ✭ 23 (-42.5%)
Mutual labels:  listen
Menutube
Catch YouTube into your macOS menu bar! 🦄
Stars: ✭ 102 (+155%)
Mutual labels:  listen
Arrive
Watch for DOM elements creation and removal
Stars: ✭ 703 (+1657.5%)
Mutual labels:  listen
naranja
🍊 Web notifications with a great look
Stars: ✭ 27 (-32.5%)
Mutual labels:  notify
Fdsoundactivatedrecorder
Start recording when the user speaks
Stars: ✭ 227 (+467.5%)
Mutual labels:  listen
Play.cash
🎶 Music lovers, rejoice.
Stars: ✭ 89 (+122.5%)
Mutual labels:  listen
Easyble
Multi-devices process Bluetooth library for Android
Stars: ✭ 81 (+102.5%)
Mutual labels:  listen
Remit
RabbitMQ-backed microservices supporting RPC, pubsub, automatic service discovery and scaling with no code changes.
Stars: ✭ 24 (-40%)
Mutual labels:  listen
Zen Audio Player.github.io
Listen to YouTube videos, without the distracting visuals.
Stars: ✭ 180 (+350%)
Mutual labels:  listen
Httpms
Media server with RESTful API and Web interface. Think of it as your very own Spotify!
Stars: ✭ 18 (-55%)
Mutual labels:  listen
uranus
[W.I.P] An ecosystem of crawlers for detecting: leaks, sensitive data exposure and attempts exfiltration of data
Stars: ✭ 22 (-45%)
Mutual labels:  notify
Informer
A Telegram Mass Surveillance Bot in Python
Stars: ✭ 745 (+1762.5%)
Mutual labels:  listen
Class bot
An Automated Background Python bot that notifies you during your classes when your name is called or the keywords "present"/"attendance" are called out.
Stars: ✭ 36 (-10%)
Mutual labels:  listen
Matrix Commander
simple but convenient CLI-based Matrix client app for sending and receiving
Stars: ✭ 90 (+125%)
Mutual labels:  listen
vue-music-player
🎵 basic music player, keeps your favorite musics
Stars: ✭ 77 (+92.5%)
Mutual labels:  listen
alert
Cross-platform, isomorphic alert, for Node and browser (previously alert-node)
Stars: ✭ 27 (-32.5%)
Mutual labels:  notify

allas

Introduction

allas is a connection pooler for PostgreSQL which only supports LISTEN / NOTIFY. The idea is to allow the application to use e.g. pgbouncer in transaction pooling mode while only receiving notifications through allas. allas only uses a single PostgreSQL connection and takes care of LISTENing and UNLISTENing appropriately on that connection to make sure all of its clients get the set of notifications they're interested in.

How to build

Clone the repository, and run "go build" in the cloned directory. This should produce a binary called "allas".

Configuration

The configuration file uses a JSON format and is organized into sections. The top level structure is a JSON object, with the following keys ("sections"):

listen

listen specifies how allas listens to new connections. It has three possible options:

  1. port (integer) specifies the port to listen on.
  2. host (string) specifies the address to listen on. The asterisk ("*") can be used to listen on all TCP interfaces, or an absolute path can be used to listen on a UNIX domain socket.
  3. keepalive (boolean) specifies whether TCP keepalives should be enabled or not.
connect

connect is a pq connection string. It supports many of libpq's options.

startup_parameters

startup_parameters is a JSON object specifying the list of "startup parameters" (such as the server's version number) to send to each client when they connect.

prometheus

prometheus is a JSON object with the following keys:

  1. listen (object) specifies how allas listens to connections from the Prometheus scraping process. The keys are the same as used by the main listen section, documented above. The port 9226 has been allocated in the Prometheus wiki for allas's use.
databases

databases is an array of JSON objects with the following keys:

  1. name (string) specifies the name of the database.
  2. auth (object) is described in the section Database authentication, below.

Database authentication

The auth key of a database configuration section is a JSON object with a combination of the following keys:

  1. method (string) is the authentication method used. There are only two values values: "trust" and "md5". Both match their respective counterpart in PostgreSQL HBA configuration.
  2. user (string) is the user name the user has to pass to match the authentication method.
  3. password (string) is a clear-text copy of the password the client should use for authentication.

Configuration example

Here's an example configuration file:

{
    "listen": {
        "port": 6433,
        "host": "localhost"
    },
    "connect": "host=localhost port=5432 sslmode=disable",
    "startup_parameters": {
        "server_version": "9.1.24",
        "client_encoding": "UTF8"
    },
    "prometheus": {
        "listen": {
            "port": 9226,
            "host": "*"
        }
    },
    "databases": [
        {
            "name": "allas",
            "auth": {
                "method": "md5",
                "user": "allas",
                "password": "s3cret"
            }
        }
    ]
}
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].