[erlang-questions] [ANN] Asynchronous PostgreSQL driver, second release

Anton Lebedevich mabrek@REDACTED
Thu Feb 23 14:28:14 CET 2012


branch named 'async'

It's a fork of Will Glozer's epgsql.

* Motivation

  When you need to execute several queries it involves several network
  round-trips between your application and database.
  PostgreSQL frontend/backend protocol supports request pipelining.
  It means that you don't need to wait for previous command to finish
  before sending next command. This version of driver makes full use
  of the protocol feature allowing faster execution.

* Difference highlights

  + 3 API sets: pgsql, apgsql and ipgsql:
    pgsql maintains backwards compatibility with original driver API,
    apgsql delivers complete results as regular erlang messages,
    ipgsql delivers results as messages incrementally (row by row)
  + internal queue of client requests, so you don't need to wait for
response to send next request
  + single process to hold driver state and receive socket data
  + execute several prepared statements as a batch
  + bind timestamps in erlang:now() format
  see CHANGES for full list.

Anton Lebedevich.

More information about the erlang-questions mailing list