Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meh/cauldron
I wonder what kind of Elixir is boiling in there.
https://github.com/meh/cauldron
Last synced: about 1 month ago
JSON representation
I wonder what kind of Elixir is boiling in there.
- Host: GitHub
- URL: https://github.com/meh/cauldron
- Owner: meh
- Created: 2013-05-30T20:27:18.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-13T15:43:50.000Z (over 7 years ago)
- Last Synced: 2024-10-25T06:49:11.542Z (about 2 months ago)
- Language: Elixir
- Size: 308 KB
- Stars: 74
- Watchers: 7
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - An HTTP/SPDY server as a library. (HTTP)
- fucking-awesome-elixir - cauldron - An HTTP/SPDY server as a library. (HTTP)
- awesome-elixir - cauldron - An HTTP/SPDY server as a library. (HTTP)
README
Cauldron - an HTTP/SPDY server as a library
===========================================
Cauldron is a web server implemented as a library, it's easy to embed into
other applications and fairly easy to implement DSLs on it, an example
of a DSL using cauldron is [urna](https://github.com/meh/urna).Examples
--------```elixir
defmodule Foo do
use Cauldron# respond to a GET / request with "Hello, World!"
def handle("GET", %URI{path: "/"}, req) do
req |> Request.reply(200, "Hello, World!")
end
end# open the cauldron on port 8080
Cauldron.start Foo, port: 8080
```Why?
----
Because I don't like how cowboy handles things and there are no other pure
Elixir webservers around that I know of.Speed
-----
Right now cauldron is faster than node.js and slower than cowboy, there' still
space for speed improvements but it's not a high priority right now.The slowness comes from protocol dispatching in Elixir, protocol consolidation
will fix that.Also we don't use an hand-crafted decoder like cowboy does but use
`:erlang.decode_packet`.