The Web is increasingly happening in realtime. With websites such as Facebook and Twitter leading the way, users are coming to expect that all sites should serve content as it occurs—on smartphones as well as computers. This book shows you how to build realtime user experiences by adding chat, streaming content, and including more features on your site one piece at a time, without making big changes to the existing infrastructure. You'll also learn how to serve realtime content beyond the browser.
Use the latest realtime syndication technology, including PubSubHubbub
Build dynamic widgets on your homepage to show realtime updates from several sources
Learn how to use long polling to "push" content from your server to browsers
Create an application using the Tornado web server that makes sense of massive amounts of streaming content
Understand the unique requirements for setting up a basic chat service
Use IM and SMS to enable users to interact with your site outside of a web browser
Implement custom analytics to measure engagement in realtime
Chapter 1 Introduction
What Is Realtime?
Push Versus Pull
Chapter 2 Realtime Syndication
Simple Update Protocol (SUP)
Chapter 3 The Dynamic Homepage (Widgets in Pseudorealtime)
The Basic Widgets
FriendFeed in Realtime
It Was All a Setup!
Chapter 4 River of Content
A Crash Course in Server Push
Setting Up Your Cometd Environment
A Realtime Live Blog
Server-Side Filters (with Java)
Integrating Cometd into Your Infrastructure
Chapter 5 Taming the Firehose with Tornado
Twitter’s Realtime Streaming APIs
From the Firehose to the Web Browser
Chapter 6 Chat
Setting Up the Basic Code
Chapter 7 Instant Messaging
Getting Started with Google App Engine
Receiving Instant Messages
Sending Instant Messages
Setting Up an API
Chapter 8 SMS
The SMS Landscape
Building the Basic Application
Sending and Receiving the Messages
Chapter 9 Measuring User Engagement: Analytics on the Realtime Web
Ted Roden was the first full-time developer hired on at Vimeo.com, and currently works in the Research and Development group at The New York Times. His work researching and prototyping topics closely related to the content of this book has been profiled by Harvard University's Nieman Journalism Lab (http://bit.ly/f7rdJhttp://bit.ly/YzELI). At the Times, he has also worked on bringing election night coverage, maps, and updates to the mobile website, as well as March Madness fantasy brackets. He is also the creator of a popular social bookmarking site: enjoysthin.gs.
The animal on the cover of Building the Realtime UserExperience is a common hill myna (Graculareligiosa). Myna birds (sometimes spelled mynah) are not abiological group: instead, humans applied the term to species of thestarling family that are native to India and surrounding areas. These arevery social animals, and are typically found in forested areas in groups ofaround six individuals. Mynas are omnivorous, with a diet of insects,nectar, and fruit.
Common hill mynas have glossy black plumage with white patches ontheir wings. Their bill is colored orange fading into yellow (rather like apiece of candy corn), and their legs are yellow. They have distinctiveyellow wattles beneath their eyes and on the back of their neck. Theposition and shape of these wattles are the easiest way to distinguishbetween the various hill mynas of the Gracula genus.Rather than walking with the jaunty gait common to other starlings, hillmynas hop from branch to branch in the treetops.
Myna birds are famous for their talking ability, and the common hillmyna in particular is renowned for mimicry. In the wild, this species has alarge repertoire of calls shared by neighboring groups—local dialects thatchange completely between different areas. In captivity, if training beginsat a young age, these mynas are able to imitate a wide range of phrases andsounds with uncanny accuracy and pitch. Myna owners should remember thatthese birds are intelligent, will only learn phrases that appeal to them (anenthusiastic tone of voice usually catches their attention), and arealways listening to conversation around them. Check outJohnny Carson’s interview session with a myna bird at http://bit.ly/bWJFYu.