Skip to content

Commit

Permalink
Merge pull request #8 from lpgauth/dev2
Browse files Browse the repository at this point in the history
Dev 0.2.4
  • Loading branch information
lpgauth committed Jun 30, 2015
2 parents fedd61b + 66ad4ab commit 1192a08
Show file tree
Hide file tree
Showing 27 changed files with 213 additions and 706 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ language: erlang
otp_release:
- 17.1
- 17.3
script: "make compile build-plt eunit etest dialyze"
script: "make compile build-plt eunit dialyze"
notifications:
email: false
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
PROJECT=swirl
REBAR=./rebar

.PHONY: deps doc

all: deps compile doc

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:
@$(REBAR) clean
@rm -rf deps ebin doc/edoc-info doc/*.md README.md
Expand All @@ -36,9 +31,6 @@ eunit:
@echo "Running EUnit suite..."
@$(REBAR) skip_deps=true eunit

etest:
@echo "Running ETest suite..."
@ERL_LIBS=deps erlc -pa ebin -o test test/*.erl
@priv/etest-runner
test: all eunit

test: all eunit etest
.PHONY: deps doc
101 changes: 63 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@


# swirl #
# swirl

__Authors:__ Louis-Philippe Gauthier.

Lightweight Distributed Stream Processor

[![Build Status](https://travis-ci.org/lpgauth/swirl.svg?branch=master)](https://travis-ci.org/lpgauth/swirl)

#### Requirements: ####
- Erlang 17.0+

#### Examples: ####

##### Starting a flow: #####
### Requirements

* Erlang 17.0 +

### Environment variables

<table width="100%">
<theader>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</theader>
<tr>
<td>mappers_max</td>
<td>pos_integer()</td>
<td>100</td>
<td>maximum number of mappers</td>
</tr>
<tr>
<td>reducers_max</td>
<td>pos_integer()</td>
<td>100</td>
<td>maximum number of reducers</td>
</tr>
</table>

## Examples

#### Starting a flow

```erlang
ok = application:start(swirl),
Expand All @@ -35,7 +57,7 @@ swirl_stream:emit(StreamName, Event),
ok = swirl_flow:stop(Flow)
```

##### Implementing a flow: #####
#### Implementing a flow

```erlang
-module(swirl_flow_example).
Expand Down Expand Up @@ -67,16 +89,16 @@ output(_Flow, _Period, Rows, OutputOpts) ->
io:format("rows: ~p~n", [Rows]),
```

#### Stream Filter: ####
##### Examples: #####
#### Stream Filter

```erlang

exchange_id = 3 AND bidder_id IS NOT NULL
flight_id in (10, 12, 23) OR tag_id = 20
buyer_id notnull AND seller_id > 103
```
##### Swirl QL: #####

#### Swirl QL

variables:

```
Expand Down Expand Up @@ -108,36 +130,39 @@ null operators:
null | notnull
```

#### Resource Limitation: ####
## TODO
* node discovery
* boolean expression indexing

configurable via:
## Tests

```erlang
application:set_env(swirl, mappers_max, 140)
application:set_env(swirl, reducers_max, 200)
```makefile
make eunit
make build-plt && make dialyze
```

#### TODO: ####
- node discovery
- boolean expression indexing
## License

```license
The MIT License (MIT)

## Modules ##
Copyright (c) 2015 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:

<table width="100%" border="0" summary="list of modules">
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl.md" class="module">swirl</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_code_server.md" class="module">swirl_code_server</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_config.md" class="module">swirl_config</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_ets_manager.md" class="module">swirl_ets_manager</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_flow.md" class="module">swirl_flow</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_mapper.md" class="module">swirl_mapper</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_ql.md" class="module">swirl_ql</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_ql_lexer.md" class="module">swirl_ql_lexer</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_ql_parser.md" class="module">swirl_ql_parser</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_reducer.md" class="module">swirl_reducer</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_stream.md" class="module">swirl_stream</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_sup.md" class="module">swirl_sup</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_tracker.md" class="module">swirl_tracker</a></td></tr>
<tr><td><a href="http://github.com/lpgauth/swirl/blob/master/doc/swirl_utils.md" class="module">swirl_utils</a></td></tr></table>
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.
```
143 changes: 0 additions & 143 deletions doc/README.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/edoc-info
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
%% encoding: UTF-8
{application,swirl}.
{packages,[]}.
{modules,[swirl,swirl_code_server,swirl_config,swirl_ets_manager,swirl_flow,
swirl_mapper,swirl_ql,swirl_ql_lexer,swirl_ql_parser,swirl_reducer,
swirl_stream,swirl_sup,swirl_tracker,swirl_utils]}.
Loading

0 comments on commit 1192a08

Please sign in to comment.