Building an Erlang chat server with Comet – Part 3

You can see a live demo of the following tutorial here. Overview In the last part, we implemented the first version of our chat server. Now that the framework is down, we can start adding some more features. You can find the source for this tutorial here UPDATE 7/2/11: The source code is also available here: https://github.com/chrismoos/erl_chat_tutorial. You can checkout the 0.2 tag. In this part, we will add the following features:...

October 16, 2009 · Chris Moos

Building an Erlang chat server with Comet - Part 2

You can see a live demo of the following tutorial at chat.tech9computers.com Getting into the code In the previous part, I introduced the chat system and how it should work. Now we are going to write the chat_postoffice, chat_mailbox, chat_room, and chat_web modules. Before you read download the source for this tutorial here. and dedicate about 20 minutes to read through this tutorial, because it's kind of long (sorry). UPDATE 7/2/11: The source code is also available here: https://github....

September 29, 2009 · Chris Moos

Building an Erlang chat server with Comet - Part 1

Introduction Comet is a technique to stream data, or “push” events to the web browser, instead of making the client poll the server every few seconds. This lets the client receive near real-time updates. If you want to read more about Comet, check out the article on Wikipedia, more specifically, the section about Ajax with long polling, as this is what our server will implement. I chose web based chat because it is a great “hello world” for learning how Comet works, and I really enjoy programming chat related stuff (see my very old implementation of GameRanger)...

September 28, 2009 · Chris Moos