GithubHelp home page GithubHelp logo

connpool's Introduction

Tarantool

Actions Status Code Coverage OSS Fuzz Telegram GitHub Discussions Stack Overflow

Tarantool is an in-memory computing platform consisting of a database and an application server.

It is distributed under BSD 2-Clause terms.

Key features of the application server:

Key features of the database:

  • MessagePack data format and MessagePack based client-server protocol.
  • Two data engines: 100% in-memory with complete WAL-based persistence and an own implementation of LSM-tree, to use with large data sets.
  • Multiple index types: HASH, TREE, RTREE, BITSET.
  • Document oriented JSON path indexes.
  • Asynchronous master-master replication.
  • Synchronous quorum-based replication.
  • RAFT-based automatic leader election for the single-leader configuration.
  • Authentication and access control.
  • ANSI SQL, including views, joins, referential and check constraints.
  • Connectors for many programming languages.
  • The database is a C extension of the application server and can be turned off.

Supported platforms are Linux (x86_64, aarch64), Mac OS X (x86_64, M1), FreeBSD (x86_64).

Tarantool is ideal for data-enriched components of scalable Web architecture: queue servers, caches, stateful Web applications.

To download and install Tarantool as a binary package for your OS or using Docker, please see the download instructions.

To build Tarantool from source, see detailed instructions in the Tarantool documentation.

To find modules, connectors and tools for Tarantool, check out our Awesome Tarantool list.

Please report bugs to our issue tracker. We also warmly welcome your feedback on the discussions page and questions on Stack Overflow.

We accept contributions via pull requests. Check out our contributing guide.

Thank you for your interest in Tarantool!

connpool's People

Contributors

amdrozdov avatar bigbes avatar opomuc avatar rtsisyk avatar totktonada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

izagz kotleta dewice

connpool's Issues

variable ''servers'' is not declared

I'm using tarantool-1.7 pulled from source today.
I'm using shard.lua and connpool.lua pulled from source today
(I cloned from https://github.com and copied them to my default
directory to ensure I'd be looking at the latest ones).

I get:

tarantool> shard = require('shard')
---
- error: './connpool.lua:400: variable ''servers'' is not declared'
...

I also notice that the README.md file still talks about "pool'.

Redesign of the connpool module

Abstract:

I believe zone support and monitoring have nothing to do with connection pooling. They are artifacts of leaky abstractions of the sharding module. I propose to redesign the API of connpool to conform to a Single Responsibility Principle, e.g. pooling connections to tarantool instances. Everything else should be moved to other modules.

Proposed API

local connpool = require('connpool').new()

-- conn1 is a net.box conneciton object
local conn1 = connpool.connect("user:pass@localhost:3301")

-- conn2 will be the same net.box object
local conn2 = connpool.connect("user:pass@localhost:3301")

conn1:close()

-- conn3 is the new net.box object
local conn3 = connpool.connect("user:pass@localhost:3301")

Configuration options

connpool.ttl = 200 -- number of seconds after which stale connections will be closed
connpool.table_size = 1000 -- number of connections in connpool table (LRU)

Expected client behavior

  • Every time the client app needs a connection, it does connpool.connect()
  • If the connection is in the pool, the client will receive it immediately
  • The client must then check for all errors when doing requests through that connection
  • If the connection fails during one of the client requests, the client should re-establish it with connpool.connect()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.