Reputation:
I want to use Erlang for some background processing and stuff for a web app. I read about its concurrency handling and stuff and I have started learning it. What I want to do specifically is a persistent connection with the clients using COMET - with the Erlang process co-ordinating the HTTP client connections.
Upvotes: 3
Views: 3183
Reputation: 2270
Another option would be to use Nitrogen - this allows an easy integration of Erlang code in web pages, including a fully-fledged webserver, and comet.
Upvotes: 1
Reputation: 26121
libevent
to achieve more http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-3/Upvotes: 6
Reputation: 96716
You should investigate 'YAWS' (high performance HTTP server) modules: easy to write, full flexibility. YAWS is easily installed: apt-get install yaws (on Ubuntu at least).
Upvotes: 1
Reputation: 25154
Did you see the page http://beebole.com/erlang ?
It contains:
how to setup an Erlang environment(with Mochiweb) on Ubuntu
how to install the Nginx web server
a video tutorial to build a small web app using Erlang
Upvotes: 1
Reputation: 25237
I would highly recommend using an erlang based webserver to handle the comet connections. The lightweight processes in erlang are half the benefit of using it for this type of thing.
Most of the erlang webserver frameworks will handle the spawning for you. No need to reimplement it yourself. See nitrogen and mochiweb for examples of really dead simple comet implementations.
Upvotes: 5