Anyone played with real-time web updates?

From: Dan Lyke 
I just discovered the Meteor web server, and am looking for cool things
it can do.

Meteor is a server you run to push real-time (for second or so meanings
of "real time") data to web pages. So, for instance, if you were
writing the next Twitter, you'd create a web page that loaded a Meteor
server JavaScript snippet, tell that JavaScript to listen on a channel,
and then you'd connect to the control port of the server and send it
updates for channels.

So for my test app I wrote a little HTML page that had an input box, a
submit button, and a .

My submit button takes the input box contents and sends it off to a CGI.

The CGI opens a IO::Socket::INET stream to the control port, prints

  ADDMESSAGE streamname [the contents of the text box]

which then causes Meteor to send an event out to my HTML page, which
has a JavaScript snippet that:

   $("#messages").append("" + data + "")

Poof. Instant chat server.

Their demo is little twinkly stars dependent on the IP address of the
server that's accessing their web page currently.

A little JSON and some database storage, and more stream names, and
you've got a small Twitter...

This thing is kinda cool.


=============================================================== From: Sean Brewer ------------------------------------------------------ Yup. I've done some things for my job with Node.js and websockets.

=============================================================== From: Sean Brewer ------------------------------------------------------ I forgot to list some cool things. The really cool thing right now is real time video/audio. Here's an example video chat app built with node: and the library for Node associated with that:

=============================================================== From: Dan Lyke ------------------------------------------------------ On Mon, 1 Oct 2012 23:52:58 -0400 Sean Brewer wrote: Interesting, although: webRTC is supported in very few browsers. We recommend either chrome from either the dev channel or the canary release. but the current browser cycle is such that we may see widespread adoption fairly quickly as they nail this stuff down. Any opinions on what th ejong-term prospects of Dart are, even if just as a JavaScript front-end?

=============================================================== From: Ralph Edge ------------------------------------------------------ I've been using node+websockets at the job as well for real time push notifications on the web site side of things( Have also played around just a bit with webRTC. -Ralph

=============================================================== From: Sean Brewer ------------------------------------------------------ Is anyone actually using Dart? Microsoft came out with TypeScript yesterday, and then there's CoffeeScript, which is already in widespread use.

=============================================================== From: Dan Lyke ------------------------------------------------------ On Tue, 2 Oct 2012 12:04:19 -0400 Sean Brewer wrote: I've started playing with CoffeeScript, have convinced myself that it's a small step up from JavaScript, but just a small one. Dart can compile to JavaScript and is available for all sorts of platforms. I can't tell if TypeScript is available cross-platform, it says it's available via npm, but npm isn't working on my Ubuntu box. Don't know whether that's me or npm. Dan

=============================================================== From: Sean Brewer ------------------------------------------------------ I use node/npm on my Ubuntu machine. How do you have it installed? I've used this method (listed here as well, on both of my machines: sudo apt-get install python-software-properties sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs npm I think node/npm is in the Ubuntu repos now, but when I last used them, they weren't up to date. If you have those installed, you should remove them before you install the PPA.

=============================================================== From: Ralph Edge ------------------------------------------------------ I've had to do a good bit of coffeescript, but never got to the point I didn't have to look up things everytime I wanted to do something that was a little different.

=============================================================== From: Ralph Edge ------------------------------------------------------ I use nvm(node version manager) on my dev machine: For production use, I have chef recipes that download the source/dependencies and compile it from scratch. -Ralph