All Projects → derekkraan → Horde

derekkraan / Horde

Licence: mit
Horde is a distributed Supervisor and Registry backed by DeltaCrdt

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to Horde

admin-training
Galaxy Admin Training
Stars: ✭ 55 (-93.41%)
Mutual labels:  cluster, supervisor
inspr
Inspr is an agnostic application mesh for simpler, faster, and securer development of distributed applications (dApps).
Stars: ✭ 49 (-94.12%)
Mutual labels:  registry, cluster
React Native Full Example
第一个完整的react-native项目。包括服务端和移动端两部分。服务端使用express+bootstrap进行搭建,主要功能有登录、退出、模块选择、查看、修改、删除、分页等后台管理的基本功能;移动端主要用到组件View、Text、Image、ScrollView、ListView等常用的组件,也使用了第三方的地图服务(高德地图),作为初学者。是一个很好的学习案例。
Stars: ✭ 809 (-3%)
Mutual labels:  registry, supervisor
Impress
Enterprise application server for Node.js and Metarhia private cloud ⚡
Stars: ✭ 634 (-23.98%)
Mutual labels:  cluster
Regtweaks
Registry Tweaks for Windows.
Stars: ✭ 675 (-19.06%)
Mutual labels:  registry
V2ray Web Manager
v2ray-web-manager 是一个v2ray的面板,也是一个集群的解决方案;同时增加了流量控制/账号管理/限速等功能。key: admin , panel ,web,cluster,集群,proxy
Stars: ✭ 738 (-11.51%)
Mutual labels:  cluster
Win Lock Screen
🔒 Enable / Disable the Lock Screen for Windows 8, 8.1 & 10.
Stars: ✭ 6 (-99.28%)
Mutual labels:  registry
Gosuv
Deprecated!!! Process managerment writtern by golang, inspired by python-supervisor
Stars: ✭ 618 (-25.9%)
Mutual labels:  supervisor
Hidden
Windows driver with usermode interface which can hide objects of file-system and registry, protect processes and etc
Stars: ✭ 768 (-7.91%)
Mutual labels:  registry
Hmq
High performance mqtt broker
Stars: ✭ 722 (-13.43%)
Mutual labels:  cluster
Iodine
iodine - HTTP / WebSockets Server for Ruby with Pub/Sub support
Stars: ✭ 720 (-13.67%)
Mutual labels:  cluster
Crc
Red Hat CodeReady Containers is a tool that manages a local OpenShift 4.x cluster optimized for testing and development purposes
Stars: ✭ 676 (-18.94%)
Mutual labels:  cluster
Rbac Manager
A Kubernetes operator that simplifies the management of Role Bindings and Service Accounts.
Stars: ✭ 737 (-11.63%)
Mutual labels:  cluster
Dragonfly
Dragonfly is an intelligent P2P based image and file distribution system.
Stars: ✭ 5,720 (+585.85%)
Mutual labels:  registry
Gonet
go分布式服务器,基于内存mmo
Stars: ✭ 804 (-3.6%)
Mutual labels:  cluster
Littleboss
littleboss: supervisor construction kit
Stars: ✭ 624 (-25.18%)
Mutual labels:  supervisor
Docker Registry Ui
The simplest and most complete UI for your private registry
Stars: ✭ 756 (-9.35%)
Mutual labels:  registry
Diun
Receive notifications when an image is updated on a Docker registry
Stars: ✭ 704 (-15.59%)
Mutual labels:  registry
Distribution
The toolkit to pack, ship, store, and deliver container content
Stars: ✭ 6,445 (+672.78%)
Mutual labels:  registry
Sessiongopher
SessionGopher is a PowerShell tool that uses WMI to extract saved session information for remote access tools such as WinSCP, PuTTY, SuperPuTTY, FileZilla, and Microsoft Remote Desktop. It can be run remotely or locally.
Stars: ✭ 833 (-0.12%)
Mutual labels:  registry

Horde Hex pm CircleCI badge

Distribute your application over multiple servers with Horde.

Horde is comprised of Horde.DynamicSupervisor, a distributed supervisor, and Horde.Registry, a distributed registry. Horde is built on top of DeltaCrdt.

Read the full documentation on hexdocs.pm.

There is an introductory blog post and a getting started guide. You can also find me in the Elixir slack channel #horde.

Daniel Azuma gave a great talk at ElixirConf US 2018 where he demonstrated Horde's Supervisor and Registry.

Since Horde is built on CRDTs, it is eventually (as opposed to immediately) consistent, although it does sync its state with its neighbours rather aggressively. Cluster membership in Horde is fully dynamic; nodes can be added and removed at any time and Horde will continue to operate as expected. Horde.DynamicSupervisor also uses a hash ring to limit any possible race conditions to times when cluster membership is changing.

Horde.Registry is API-compatible with Elixir's own Registry, although it does not yet support the keys: :duplicate option. For many use cases, it will be a drop-in replacement. Horde.DynamicSupervisor follows the API and behaviour of DynamicSupervisor as closely as possible. There will always be some difference between Horde and its standard library equivalents, if not in their APIs, then in their functionality. This is a necessary consequence of Horde's distributed nature.

1.0 release

Help us get to 1.0, please fill out our very short survey and report any issues you encounter when using Horde.

Fault tolerance

If a node fails (or otherwise becomes unreachable) then Horde.DynamicSupervisor will redistribute processes among the remaining nodes.

You can choose what to do in the event of a network partition by specifying :distribution_strategy in the options for Horde.DynamicSupervisor.start_link/2. Setting this option to Horde.UniformDistribution (which is the default) distributes processes using a hash mechanism among all reachable nodes. In the event of a network partition, both sides of the partition will continue to operate. Setting it to Horde.UniformQuorumDistribution will operate in the same way, but will shut down if less than half of the cluster is reachable.

CAP Theorem

Horde is eventually consistent, which means that Horde can guarantee availability and partition tolerancy. Horde cannot guarantee consistency. This means you may end up with duplicate processes in your cluster. Horde does aggressively synchronize between nodes (this is also tunable), but ultimately, depending on the tuning parameters you choose and the quality of the network, there are conditions under which it is possible to have duplicate processes in your cluster. Horde.Registry terminates duplicate processes as soon as they are discovered with a special exit code, so you'll always know when this is happening. See this page in the docs for more details.

NOTE: Since Horde 0.6.0, Horde.DynamicSupervisor ignores the id of a child spec (as Elixir.DynamicSupervisor does), and therefore does not guarantee that each id will be unique in the cluster (as it did pre-0.6.0). If you want to uniquely name your processes in a cluster, use Horde.Registry for this purpose. Having both Horde.DynamicSupervisor and Horde.Registry checking for uniqueness was subject to a race condition where Horde.DynamicSupervisor would choose process A to survive and Horde.Registry would choose process B to survive, resulting in both processes being killed.

Graceful shutdown

Using Horde.DynamicSupervisor.stop/3 will cause the local supervisor to stop and any processes it was running will be shut down and redistributed to remaining supervisers in the horde. (This should happen automatically if :init.stop() is called).

Installation

Horde is available in Hex.

The package can be installed by adding horde to your list of dependencies in mix.exs:

def deps do
  [
    {:horde, "~> 0.7.0"}
  ]
end

Usage

Here is a small taste of Horde's usage. See the full docs at https://hexdocs.pm/horde for more information and examples. There is also an example application at examples/hello_world that you can refer to if you get stuck.

Starting Horde.DynamicSupervisor:

defmodule MyApp.Application do
  use Application
  def start(_type, _args) do
    children = [
      {Horde.DynamicSupervisor, [name: MyApp.DistributedSupervisor, strategy: :one_for_one]}
    ]
    Supervisor.start_link(children, strategy: :one_for_one)
  end
end

Adding a child to the supervisor:

# Add a Task
Horde.DynamicSupervisor.start_child(MyApp.DistributedSupervisor, %{id: :task, start: {Task, :start_link, [:infinity]}})

# Add an Agent
Horde.DynamicSupervisor.start_child(MyApp.DistributedSupervisor, %{id: :agent, start: {Agent, :start_link, [fn -> %{} end]}})

# Add a GenServer: You need a previously defined GenServer to call the one
# liner below.  We have a test ("graceful shutdown") in
# `test/supervisor_test.exs` that exercises and displays that behavior. After
# defined, it would be very similar to this:
Horde.DynamicSupervisor.start_child(MyApp.DistributedSupervisor, %{id: :gen_server, start: {GenServer, :start_link, [DefinedGenServer, {500, pid}]}})

And so on. The public API should be the same as Elixir.DynamicSupervisor (and please open an issue if you find a difference).

Joining supervisors into a single distributed supervisor can be done using Horde.Cluster:

{:ok, supervisor_1} = Horde.DynamicSupervisor.start_link(name: :distributed_supervisor_1, strategy: :one_for_one)
{:ok, supervisor_2} = Horde.DynamicSupervisor.start_link(name: :distributed_supervisor_2, strategy: :one_for_one)
{:ok, supervisor_3} = Horde.DynamicSupervisor.start_link(name: :distributed_supervisor_3, strategy: :one_for_one)

Horde.Cluster.set_members(:distributed_supervisor_1, [:distributed_supervisor_1, :distributed_supervisor_2, :distributed_supervisor_3])
# supervisor_1, supervisor_2 and supervisor_3 will be joined in a single cluster.

Contributing

Contributions are welcome! Feel free to open an issue if you'd like to discuss a problem or a possible solution. Pull requests are much appreciated.

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].