All Projects → lpgauth → marina

lpgauth / marina

Licence: MIT License
High-Performance Erlang Cassandra CQL Client

Programming Languages

erlang
1774 projects
Dockerfile
14818 projects
Makefile
30231 projects

Projects that are alternatives of or similar to marina

cassandra-CQL-exporter
A highly configurable utility to export whole Apache Cassandra keyspace or table structure/data to CQL scripts.
Stars: ✭ 19 (-62%)
Mutual labels:  cassandra, cql
crystal-cassandra
A Cassandra driver for Crystal
Stars: ✭ 20 (-60%)
Mutual labels:  cassandra, cql
Erlcass
High-Performance Erlang Cassandra driver based on DataStax cpp-driver
Stars: ✭ 59 (+18%)
Mutual labels:  cassandra, high-performance
gun-cassandra
Cassandra / Elassandra persistence layer for Gun DB 🔫
Stars: ✭ 14 (-72%)
Mutual labels:  cassandra, cql
carina
Carina: an high performance and ops-free local storage for kubernetes
Stars: ✭ 256 (+412%)
Mutual labels:  high-performance
canchat
Feature-complete rooms-based chat for tens of thousands users. Client plus Server. Built with Oat++ Web Framework.
Stars: ✭ 38 (-24%)
Mutual labels:  high-performance
contact-center
一个基于 Spring Cloud 的微服务客服系统
Stars: ✭ 15 (-70%)
Mutual labels:  cassandra
compose-cassandra-cluster
A Docker Compose blueprint describing the creation of a 3 node cluster
Stars: ✭ 16 (-68%)
Mutual labels:  cassandra
MultiHttp
This is a high performance , very useful multi-curl tool written in php. 一个超级好用的并发CURL工具!!!(httpful,restful, concurrency)
Stars: ✭ 79 (+58%)
Mutual labels:  high-performance
jNVMf
A NVMf library for Java
Stars: ✭ 23 (-54%)
Mutual labels:  high-performance
ormdb
ORM tool for .Net / .Net.Core
Stars: ✭ 14 (-72%)
Mutual labels:  high-performance
NanoLogLite
A revised version of NanoLog which writes human readable log file, and is easier to use.
Stars: ✭ 18 (-64%)
Mutual labels:  high-performance
trembita
Model complex data transformation pipelines easily
Stars: ✭ 44 (-12%)
Mutual labels:  cassandra
Corium
Corium is a modern scripting language which combines simple, safe and efficient programming.
Stars: ✭ 18 (-64%)
Mutual labels:  high-performance
cocoyaxi
A go-style coroutine library in C++11 and more.
Stars: ✭ 2,392 (+4684%)
Mutual labels:  high-performance
bitECS
Functional, minimal, data-oriented, ultra-high performance ECS library written in JavaScript
Stars: ✭ 372 (+644%)
Mutual labels:  high-performance
spring-cloud-stream-event-sourcing-testcontainers
Goal: create a Spring Boot application that handles users using Event Sourcing. So, whenever a user is created, updated, or deleted, an event informing this change is sent to Kafka. Also, we will implement another application that listens to those events and saves them in Cassandra. Finally, we will use Testcontainers for integration testing.
Stars: ✭ 16 (-68%)
Mutual labels:  cassandra
diesel
No description or website provided.
Stars: ✭ 30 (-40%)
Mutual labels:  cassandra
management-api-for-apache-cassandra
RESTful / Secure Management Sidecar for Apache Cassandra
Stars: ✭ 50 (+0%)
Mutual labels:  cassandra
AspNetCore.Identity.Cassandra
Cassandra Storage Provider for ASP.NET Core Identity
Stars: ✭ 13 (-74%)
Mutual labels:  cassandra

marina

High-Performance Erlang Cassandra CQL Client

Build Status Coverage Status

Requirements

  • Cassandra 2.1+
  • Erlang 19.0+

Features

  • Authentication support
  • Compression support (LZ4)
  • CQL spec 3.2.0
  • Fast pool implementation (random, round_robin)
  • Load-balancing policies (random, token_aware)
  • Performance optimized
  • Prepared statement cache

Environment variables

Name Type Default Description
bootstrap_ips [list()] ["5.5.5.5", "5.5.5.6"] ips used to bootstrap the pool
compression boolean() false enable lz4 compression
keyspace undefined | binary() undefined default keyspace
password binary() undefined password for authentication
pool_size pos_integer() 16 number of connections per node
port pos_integer() 9042 server port
reconnect boolean() true reconnect closed connections
reconnect_time_max pos_integer() | infinity 120000 reconnect maximum time
reconnect_time_min pos_integer() 1500 reconnect minimum time
strategy random | token_aware token_aware load balancing strategy across nodes
username binary() undefined username for authentication

Bootstraping

The pool is bootstraped by querying the system.peers table. marina will try each ip from boostrap_ips until it can connect and retrieve the list of peers. For backward compatibility, ip will be used if bootstrap_ips is not provided.

API

Function Index

Examples

1> marina_app:start().

{ok,[granderl,metal,shackle,foil,marina]}

2> marina:query(<<"SELECT * FROM test.users LIMIT 1;">>, #{timeout => 1000}).

{ok,{result,{result_metadata,4,
    [{column_spec,<<"test">>,<<"users">>,<<"key">>,uid},
     {column_spec,<<"test">>,<<"users">>,<<"column1">>,varchar},
     {column_spec,<<"test">>,<<"users">>,<<"column2">>,varchar},
     {column_spec,<<"test">>,<<"users">>,<<"value">>,blob}],
    undefined},
    1,
    [[<<153,73,45,254,217,74,17,228,175,57,88,244,65,16,117,125>>,
      <<"test">>,<<"test2">>,
      <<0,0,0,0>>]]}}
}}

3> marina:query(<<"SELECT * FROM test.users WHERE key = ?;">>,
    #{values => [<<153,73,45,254,217,74,17,228,175,57,88,244,65,16,117,125>>],
    skip_metadata => true, timeout => 1000}).

{ok,{result,{result_metadata,4,[],undefined},
    1,
    [[<<153,73,45,254,217,74,17,228,175,57,88,244,65,16,117,
        125>>,
      <<"test">>,<<"test2">>,
      <<0,0,0,0>>]]}}

4> {ok, Ref} = marina:async_reusable_query(<<"SELECT * FROM test.users WHERE key = ?;">>,
    #{values => [<<207,85,107,110,157,137,17,226,167,153,120,43,203,102,219,173>>]}).

{ok,{'marina_df74df08-e5bc-42e8-af61-c24dfeda6f2c_5',#Ref<0.1577389904.1118830594.250171>}}

5> marina:receive_response(Ref).

{ok,{result,{result_metadata,4,
    [{column_spec,<<"test">>,<<"users">>,<<"key">>,uid},
     {column_spec,<<"test">>,<<"users">>,<<"column1">>,varchar},
     {column_spec,<<"test">>,<<"users">>,<<"column2">>,varchar},
     {column_spec,<<"test">>,<<"users">>,<<"value">>,blob}],
        undefined},
            0,[]}}

Tests

make dialyzer
make elvis
make eunit
make xref

TODOs

  • Batch queries
  • Rebuild ring when topology changes

License

The MIT License (MIT)

Copyright (c) 2015-2018 Louis-Philippe Gauthier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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].