https://github.com/jumpwire-ai/hydrax
Convenience wrapper around Horde
https://github.com/jumpwire-ai/hydrax
distributed-systems elixir
Last synced: 6 months ago
JSON representation
Convenience wrapper around Horde
- Host: GitHub
- URL: https://github.com/jumpwire-ai/hydrax
- Owner: jumpwire-ai
- License: apache-2.0
- Created: 2021-06-29T16:14:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-17T14:30:04.000Z (almost 4 years ago)
- Last Synced: 2023-09-19T04:26:25.793Z (almost 3 years ago)
- Topics: distributed-systems, elixir
- Language: Elixir
- Homepage:
- Size: 32.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hydrax

Shared functionality for working with PIDs across a distributed cluster. Acts as a wrapper
around [Horde](https://hex.pm/packages/horde), providing a few convenience functions such as helpers for working with two-element registry keys.

## Installation
The package can be installed by adding `hydrax` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:hydrax, "~> 0.3"},
]
end
```
Then add either the Registry, Supervisor, or both to your application tree:
``` elixir
defmodule Application do
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
Hydrax.Registry,
Hydrax.Supervisor,
# other children
]
opts = [strategy: :one_for_one, name: Application]
Supervisor.start_link(children, opts)
end
end
```
The Registry and Supervisor are thin wrappers around Horde.Registry and Horde.DynamicSupervisor. The [Horde documentation](https://hexdocs.pm/horde/readme.html) is the best place to learn how to use these.