Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are some of the software technologies behind "real-time" web apps, like Twitter, Trello, or even Gmail? I know there's a webserver and probably a database on the backend, but what are the software pieces that make for that rich web interaction that I'm seeing more of today?

share|improve this question

closed as too broad by gbjbaanb, MichaelT, Ixrec, gnat, TZHX Feb 11 at 19:44

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
There is no such a thing as "real time" web (unless you invent something like TCP over CAN-bus). – SK-logic Dec 7 '11 at 10:07
    
@SK-logic he means soft real-time. – Raynos Dec 7 '11 at 15:26

Comet plays an important role in these applications.

Comet is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it.

http://en.wikipedia.org/wiki/Comet_%28programming%29

JavaScript is the glue between the comet servers and the browsers. Server software like Node.js are used to implement these comet servers that will have to handle many long-held connections.

Besides comet, these applications also need a good backend. The solutions may be very specific to the problem.

Twitter, for example, has to stream tweets to all your followers for each of your tweets. Facebook has to run machine learning algorithms to select which stories to stream on your News Feed.

Although different, these applications have many things in common: heavy use of cache, data denormalization, asynchronous jobs, are highly distributed.

share|improve this answer

Client-side, Javascript and Ajax.

Server-side, a plethora of different technology stacks.. As Raynos eluded to in his comment, virtually anything can be used to build a real time web application...

You could use a web server (such as Apache) to mediate communication between your clients and data, but you don't necessarily need to. You could also write your own HTTP handling on a server rather than deal with the overhead of using a third party web server yourself. A few examples might be (assume Javascript/AJAX client-side for each):

Language   / Interface / Server
-------------------------------
Python     / WSGI      / nginx
Javascript / -         / node.js
C++        / FastCGI   / Apache
Erlang     / -         / Yaws (embedded)
PHP        / mod_php   / Apache

Again, those are just a few examples of possibilities. The possible permutations of tech stacks for implementing server-side solutions is virtually endless.

Edit:

Silly me. HTML5 is probably the biggest addition to the client-side tech stack that allows for rich web applications these days. The addition of features such as audio (Firefox has even exposed audio data to allow visualization of an audio spectrum through Javascript), video, database (WebSQL, IndexedDB), filesystem (sandboxed on most browsers, full system access available in Firefox through XPCOM components), WebGL and WebSockets are just a few of the big additions that HTML5 has brought along.

share|improve this answer
1  
WebSQL is deprecated, databases is just IndexedDB. XPCOM is being superceeded by OS.File. Also note that websockets is really important – Raynos Dec 7 '11 at 4:52
    
Should have mentioned that WebSQL was deprecated (thanks for pointing that out). Thanks for the heads up on OS.File, was unaware of that. And yes, websockets are definitely really important. – Demian Brecht Dec 7 '11 at 18:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.