hansonkd

hansonkd

Cables: A multiplexed HTTP/2 Elixir Client

Announcing Cables, a fast async HTTP/2 client.

With Phoenix and Plug supporting HTTP/2, Elixir needs a client to take advantage of one of the major features of HTTP/2: multiplexing with streams.

Cables is a client to work with HTTP/2 streams. One connection can support multiple requests simultaneously. It defines a behavior to build your own async consumers, or you can use the generic REST methods (get, put, etc)

You can see how to implement a handler here: cables/lib/cables/response.ex at master · hansonkd/cables · GitHub

It is based on the HTTP/2 library, Gun, which provides persistent HTTP/2 connections. Cables will try to reuse existing connections as much as possible and can spin up new connections as the load grows and cleans them up when they aren’t needed.

To get an idea of the optimal number of streams per connection, take a look at the benchmark repo which performs some naive benchmarks with different configurations:

Its still in its experimental phase, so there may be some bumps. Hopefully, it is enough to start building HTTP/2 apps with!

Most Liked

njwest

njwest

Interesting project! How is development going?

Where Next?

Popular in Announcing Top

bryanjos
Hi, I just published version 0.23.0 of Elixirscript. https://github.com/bryanjos/elixirscript/blob/master/CHANGELOG.md Most of the chan...
New
OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 14361 106
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
tmbb
I’ve decided to create this topic to discuss optimization possibilities for something like Phoenix LiveView. I’ve created this topic unde...
144 10809 141
New
kevinlang
Hey all, We have made an Ecto3 Adapter for SQLite3, ecto_sqlite3! We have successfully on-boarded the full suite of integration tests (...
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New
scohen
Lexical Lexical is a next-generation language server for the Elixir programming language. Features Context aware code completion As-you...
New

Other popular topics Top

jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44608 311
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement