comet
< http
< server
< javascript
< development
< programming
< web
< delicious
< vipulshaily
Get flash to fully experience Pearltrees
In this series I will detail what I found out empirically about how mochiweb performs with lots of open connections, and show how to build a comet application using mochiweb, where each mochiweb connection is registered with a router which dispatches messages to various users. We end up with a working application that can cope with a million concurrent connections, and crucially, knowing how much RAM we need to make it work. Future posts in this series will cover how to build a real message routing system, additional tricks to reduce memory usage, and more testing with 100k and 1m concurrent connections. This code (mochiconntest_web.erl) just accepts connections and uses chunked transfer to send an initial welcome message, and one message every 10 seconds to every client. Start your mochiweb app By default mochiweb listens on port 8000, on all interfaces.
You're writing a live-updating web application. Maybe it's some sort of chat, a multiplayer Flash game, a live feed reader, or maybe it's a realtime HTCPCP teapot controller. Either way, you won't have status updates come only when the user refreshes a page, and polling the server every couple of seconds seems to you ugly and insufficient. But you don't quite want to commit to writing your application in any of the available asynchronous scripted web server frameworks. You're also not crazy about CometD , maybe because you think the Bayeux protocol is overkill. You download , install , and configure the module.
The web is becoming more and more realtime and we at Plurk are following the trend. Yesterday we released instant notifications so users can have conversations with sub-second delays - - it's like group based instant messaging. We have rewritten to node.js from Java+JBoss Netty, because the old solution had scalability problems.
client). Is it possible node is not completely freeing up memory from > That's great Felix, thanks! At first I got up to 15k connections with > your script.