Flutterby™! : Real-time web

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Real-time web

2012-10-02 14:20:04.53403+00 by Dan Lyke 1 comments

webRTC.io is an abstraction layer which attempts to simplify webRTC, which is:

... is a free, open project that enables web browsers with Real-Time Communications (RTC) capabilities via simple Javascript APIs.

As far as I can tell, this also means peer-to-peer browser capabilities. Got pointed to this after I wrote a little thing about Meteor Server up to garner some discussion on the Chugalug mailing list. And I'll toss that message in the comments...

[ related topics: Astronomy Community ]

comments in ascending chronological order (reverse):

#Comment Re: made: 2012-10-02 14:21:52.246294+00 by: Dan Lyke [edit history]

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 <ul id="messages"></ul>.

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

The CGI opens a Perl 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("<li>" + data + "</li>")

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.