talira

Thousand Island

A modern, pure Elixir socket server

open sourceMITfree

Thousand Island is Mat Trudel's socket server written entirely in Elixir, inspired by Erlang's Ranch and performing about the same in its author's tests. It's a supervision tree you host inside your application, usually under a higher-level protocol library such as Bandit, which runs on it; your code implements the ThousandIsland.Handler behaviour to handle each connection's socket. It's nearly dependency-free (only telemetry), follows OTP design principles closely, and aims to be a readable reference for idiomatic OTP code.

Problems it solves

  • write a custom TCP server in Elixir
  • a socket server library for my own protocol on the BEAM
  • an Elixir alternative to ranch

Features

  • pure Elixir socket server with a supervision tree
  • ThousandIsland.Handler behaviour for connection handling
  • telemetry events, nearly dependency-free
  • performance on par with ranch

Alternatives

The same job

These do what Thousand Island does.

  1. Ranch Socket acceptor pool for TCP protocols in Erlang

Compare Thousand Island with the top 3