https://github.com/edgurgel/bertrpcex
A pool of BERT-RPC clients built on top of poolboy
https://github.com/edgurgel/bertrpcex
Last synced: 8 months ago
JSON representation
A pool of BERT-RPC clients built on top of poolboy
- Host: GitHub
- URL: https://github.com/edgurgel/bertrpcex
- Owner: edgurgel
- License: mit
- Created: 2013-06-02T19:38:13.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-06-06T08:36:25.000Z (over 10 years ago)
- Last Synced: 2025-01-09T02:05:48.776Z (9 months ago)
- Language: Elixir
- Homepage:
- Size: 329 KB
- Stars: 11
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/edgurgel/bertrpcex)
# BERT-RPC Elixir client
A pool of BERT-RPC clients
## Implementation
bertrpcex uses poolboy to have pools of workers that connect/encode/decode BERT-RPC.
The configuration is done directly on each pool, this is part of the .app (as example):
```elixir
env: [
pools: [
{ [:ext, :nat],
[size: 10, max_overflow: 20],
[host: {127,0,0,1}, port: 8000]
}
]
]
```This configuration means:
Module ext and nat are hosted at 127.0.0.1 at 8000 on pools of size 10 and max_overflow 20 each
Usage:
Let's suppose that ext has a binary method named... binary.
```elixir
response = BertrpcEx.call(:ext, :binary, [1,2]).
```This will pick a worker, execute the call and return the expected response.
That's it.
## TODO
Write tests!
## Contributing
If you'd like to hack on Bertrpc.ex, start by forking my repo on Github.
You need [Elixir](http://www.elixir-lang.org) and Erlang R16.
Dependencies can be fetched running:
```
$ mix deps.get
```To compile:
```
$ mix compile
```Pull requests are greatly appreciated.