-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from lpgauth/dev
0.1.0
- Loading branch information
Showing
36 changed files
with
3,273 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
.eunit | ||
deps | ||
*.o | ||
*.beam | ||
*.o | ||
*.plt | ||
erl_crash.dump | ||
ebin | ||
rel/example_project | ||
.concrete/DEV_MODE | ||
.eunit | ||
.rebar | ||
deps/ | ||
doc/README.md | ||
ebin/ | ||
erl_crash.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
PROJECT=marina | ||
REBAR=./rebar | ||
|
||
all: deps compile | ||
|
||
build-plt: all | ||
@dialyzer --build_plt --output_plt ~/.$(PROJECT).plt \ | ||
--apps erts kernel stdlib crypto public_key ssl | ||
|
||
check-plt: | ||
@dialyzer --check_plt --plt ~/.$(PROJECT).plt | ||
|
||
clean: | ||
@echo "Running rebar clean..." | ||
@$(REBAR) clean | ||
@rm -rf deps ebin | ||
|
||
compile: | ||
@echo "Running rebar compile..." | ||
@$(REBAR) compile | ||
|
||
deps: | ||
@echo "Running rebar update-deps..." | ||
@$(REBAR) update-deps | ||
|
||
dialyze: | ||
@dialyzer ebin/*.beam --plt ~/.$(PROJECT).plt -I include | ||
|
||
doc: | ||
@echo "Running rebar doc..." | ||
@$(REBAR) skip_deps=true doc | ||
|
||
eunit: | ||
@echo "Running rebar eunit..." | ||
@$(REBAR) skip_deps=true eunit | ||
|
||
test: all eunit | ||
|
||
.PHONY: deps doc test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,57 @@ | ||
# marina | ||
Non-blocking cassandra CQL3 client (erlang) | ||
|
||
|
||
# marina # | ||
|
||
__Authors:__ Louis-Philippe Gauthier. | ||
|
||
Non-blocking Erlang Cassandra CQL3 client | ||
|
||
|
||
## Features ## | ||
|
||
* Async mode | ||
* Backpressure via backlog (OOM protection) | ||
* Binary protocol V3 | ||
* CQL protocol 3.2.0 | ||
* Performance optimized | ||
* Prepared statement cache | ||
* Request pipelining | ||
|
||
|
||
|
||
## Environment variables ## | ||
|
||
* ip : server ip | ||
* port : server port | ||
* keyspace : default keyspace | ||
* pool_size : number of connections | ||
* max_backlog_size: maximum number of concurrent requests per connection | ||
|
||
|
||
|
||
## TODO ## | ||
* compression | ||
* documentation | ||
* tests | ||
|
||
|
||
|
||
|
||
## Modules ## | ||
|
||
|
||
<table width="100%" border="0" summary="list of modules"> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina.md" class="module">marina</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_app.md" class="module">marina_app</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_backlog.md" class="module">marina_backlog</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_body.md" class="module">marina_body</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_buffer.md" class="module">marina_buffer</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_cache.md" class="module">marina_cache</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_frame.md" class="module">marina_frame</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_queue.md" class="module">marina_queue</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_request.md" class="module">marina_request</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_server.md" class="module">marina_server</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_sup.md" class="module">marina_sup</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_types.md" class="module">marina_types</a></td></tr> | ||
<tr><td><a href="http://github.com/lpgauth/marina/blob/dev/doc/marina_utils.md" class="module">marina_utils</a></td></tr></table> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
%% encoding: UTF-8 | ||
{application,marina}. | ||
{packages,[]}. | ||
{modules,[marina,marina_app,marina_backlog,marina_body,marina_buffer, | ||
marina_cache,marina_frame,marina_queue,marina_request,marina_server, | ||
marina_sup,marina_types,marina_utils]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
|
||
|
||
# Module marina # | ||
* [Data Types](#types) | ||
* [Function Index](#index) | ||
* [Function Details](#functions) | ||
|
||
|
||
|
||
<a name="types"></a> | ||
|
||
## Data Types ## | ||
|
||
|
||
|
||
|
||
### <a name="type-consistency">consistency()</a> ### | ||
|
||
|
||
|
||
<pre><code> | ||
consistency() = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 16 | ||
</code></pre> | ||
|
||
|
||
|
||
|
||
|
||
### <a name="type-flags">flags()</a> ### | ||
|
||
|
||
|
||
<pre><code> | ||
flags() = 0..254 | ||
</code></pre> | ||
|
||
|
||
|
||
|
||
|
||
### <a name="type-query">query()</a> ### | ||
|
||
|
||
|
||
<pre><code> | ||
query() = binary() | ||
</code></pre> | ||
|
||
|
||
|
||
|
||
|
||
### <a name="type-statement_id">statement_id()</a> ### | ||
|
||
|
||
|
||
<pre><code> | ||
statement_id() = binary() | ||
</code></pre> | ||
|
||
|
||
|
||
|
||
|
||
### <a name="type-value">value()</a> ### | ||
|
||
|
||
|
||
<pre><code> | ||
value() = binary() | ||
</code></pre> | ||
|
||
|
||
<a name="index"></a> | ||
|
||
## Function Index ## | ||
|
||
|
||
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#async_execute-5">async_execute/5</a></td><td></td></tr><tr><td valign="top"><a href="#async_prepare-2">async_prepare/2</a></td><td></td></tr><tr><td valign="top"><a href="#async_query-4">async_query/4</a></td><td></td></tr><tr><td valign="top"><a href="#async_reusable_query-6">async_reusable_query/6</a></td><td></td></tr><tr><td valign="top"><a href="#execute-5">execute/5</a></td><td></td></tr><tr><td valign="top"><a href="#prepare-2">prepare/2</a></td><td></td></tr><tr><td valign="top"><a href="#query-4">query/4</a></td><td></td></tr><tr><td valign="top"><a href="#response-1">response/1</a></td><td></td></tr><tr><td valign="top"><a href="#reusable_query-5">reusable_query/5</a></td><td></td></tr></table> | ||
|
||
|
||
<a name="functions"></a> | ||
|
||
## Function Details ## | ||
|
||
<a name="async_execute-5"></a> | ||
|
||
### async_execute/5 ### | ||
|
||
|
||
<pre><code> | ||
async_execute(StatementId::<a href="#type-statement_id">statement_id()</a>, Values::[<a href="#type-value">value()</a>], ConsistencyLevel::<a href="#type-consistency">consistency()</a>, Flags::<a href="#type-flags">flags()</a>, Pid::pid()) -> {ok, <a href="erlang.md#type-ref">erlang:ref()</a>} | {error, backlog_full} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="async_prepare-2"></a> | ||
|
||
### async_prepare/2 ### | ||
|
||
|
||
<pre><code> | ||
async_prepare(Query::<a href="#type-query">query()</a>, Pid::pid()) -> {ok, <a href="erlang.md#type-ref">erlang:ref()</a>} | {error, backlog_full} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="async_query-4"></a> | ||
|
||
### async_query/4 ### | ||
|
||
|
||
<pre><code> | ||
async_query(Query::<a href="#type-query">query()</a>, ConsistencyLevel::<a href="#type-consistency">consistency()</a>, Flags::<a href="#type-flags">flags()</a>, Pid::pid()) -> {ok, <a href="erlang.md#type-ref">erlang:ref()</a>} | {error, backlog_full} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="async_reusable_query-6"></a> | ||
|
||
### async_reusable_query/6 ### | ||
|
||
|
||
<pre><code> | ||
async_reusable_query(Query::<a href="#type-query">query()</a>, Values::[<a href="#type-value">value()</a>], ConsistencyLevel::<a href="#type-consistency">consistency()</a>, Flags::<a href="#type-flags">flags()</a>, Pid::pid(), Timeout::timeout()) -> {ok, <a href="erlang.md#type-ref">erlang:ref()</a>} | {error, term()} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="execute-5"></a> | ||
|
||
### execute/5 ### | ||
|
||
|
||
<pre><code> | ||
execute(StatementId::<a href="#type-statement_id">statement_id()</a>, Values::[<a href="#type-value">value()</a>], ConsistencyLevel::<a href="#type-consistency">consistency()</a>, Flags::<a href="#type-flags">flags()</a>, Timeout::timeout()) -> {ok, term()} | {error, term()} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="prepare-2"></a> | ||
|
||
### prepare/2 ### | ||
|
||
|
||
<pre><code> | ||
prepare(Query::<a href="#type-query">query()</a>, Timeout::timeout()) -> {ok, term()} | {error, term()} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="query-4"></a> | ||
|
||
### query/4 ### | ||
|
||
|
||
<pre><code> | ||
query(Query::<a href="#type-query">query()</a>, ConsistencyLevel::<a href="#type-consistency">consistency()</a>, Flags::<a href="#type-flags">flags()</a>, Timeout::timeout()) -> {ok, term()} | {error, term()} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="response-1"></a> | ||
|
||
### response/1 ### | ||
|
||
|
||
<pre><code> | ||
response(X1::{ok, term()} | {error, term()}) -> {ok, term()} | {error, term()} | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="reusable_query-5"></a> | ||
|
||
### reusable_query/5 ### | ||
|
||
|
||
<pre><code> | ||
reusable_query(Query::<a href="#type-query">query()</a>, Values::[<a href="#type-value">value()</a>], ConsistencyLevel::<a href="#type-consistency">consistency()</a>, Flags::<a href="#type-flags">flags()</a>, Timeout::timeout()) -> {ok, term()} | {error, term()} | ||
</code></pre> | ||
<br /> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
|
||
# Module marina_app # | ||
* [Function Index](#index) | ||
* [Function Details](#functions) | ||
|
||
__Behaviours:__ [`application`](application.md). | ||
<a name="index"></a> | ||
|
||
## Function Index ## | ||
|
||
|
||
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#start-0">start/0</a></td><td></td></tr><tr><td valign="top"><a href="#start-2">start/2</a></td><td></td></tr><tr><td valign="top"><a href="#stop-1">stop/1</a></td><td></td></tr></table> | ||
|
||
|
||
<a name="functions"></a> | ||
|
||
## Function Details ## | ||
|
||
<a name="start-0"></a> | ||
|
||
### start/0 ### | ||
|
||
|
||
<pre><code> | ||
start() -> ok | ||
</code></pre> | ||
<br /> | ||
|
||
|
||
<a name="start-2"></a> | ||
|
||
### start/2 ### | ||
|
||
`start(StartType, StartArgs) -> any()` | ||
|
||
|
||
<a name="stop-1"></a> | ||
|
||
### stop/1 ### | ||
|
||
`stop(State) -> any()` | ||
|
||
|
Oops, something went wrong.