Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Thursday, May 28, 2009

Web Hooks and the Programmable World of Tomorrow

"I guess that Web Hooks are now officially the Next Big Thing." - Tim Bray

What are Web Hooks and why are they the "lightning bolts of cloud computing"? Web APIs and mashups have been popular in the world of Web 2.0. In fact at the time of my last post on the Top 10 APIs for Web Mashups in 2007 there were ~500 APIs listed on ProgrammableWeb. Today the number of APIs listed are more than 1.300 and mashups has passed the milestone of 4.000!

Web hooks are user-defined callbacks over HTTP. They’re intended to, in a sense, “jailbreak” our web applications to become more extensible, customizable, and ultimately more useful. Conceptually, web applications only have a request-based “input” mechanism: web APIs. They lack an event-based output mechanism, and this is the role of web hooks. People talk about Unix pipes for the web, but they forget: pipes are based on standard input and standard output. Feeds are not a sufficient form of output for this, which is partly why Yahoo Pipes was not the game changer some people expected. Instead, we need adoption of a simple, real-time, event-driven mechanism, and web hooks seem to be the answer. Web hooks are bringing a new level of event-based programming to the web.



Jeff Lindsay ( http://www.progrium.com ) at Google talking about Web Hooks. Slides here.

His talk introduces the concept of web hooks: simple HTTP callbacks with huge implications. This model allows web services to be customized by the user and tightly integrated with each other unlike anything before. Chock-full of demos and real world examples, this talk also shares an under-appreciated vision of the web that most of the experts have missed: a vision of user-generated functionality and the *real* programmable web.

Who is using web hooks today?

A rapidly expanding list of some of the companies or projects which provide Web hooks in their applications.
  • DevjaVu
  • BitBucket
  • GitHub
  • Shopify
  • SurveyGizmo
  • Versionshelf
  • PayPal (Instant Payment Notification)
  • Jott (Links)
  • PBwiki
  • Google Code
  • PubSubHubbub
The concept of webhooks is another innovation milestone on our way to the world of Web 3.0.

Monday, March 3, 2008

A Practical Guide To Augmented Reality

Augmented Reality (AR) brings virtual objects into the real world where we live in.

Powerful mobile devices and smartphones such as the Apple iPhone can be enhanced with innovative video-see-through technology. Just hold the device up and see through the display to view both the real world and the superimposed virtual object. Move around and see the virtual object, model, animation, or game from different views as the AR system performs alignment of the real and virtual cameras automatically. Augmented Reality is a technology that could become mainstream in a couple of years and revolutionize mobile entertainment and our interaction with the world around us.

Imagine Google Street View, Earthmine or Everyscape on steroids!


Augmented Reality: A Practical Guide will introduce you to Augmented Reality (AR), provide detailed explanations of how the technology works, and provide samples for you to try on your own. Code samples using the freely downloadable ARTag software SDK in C++ and C# are included; all you need is a computer, printer, and a webcam.

The book provides everything you need to quickly start developing your own Augmented Reality (AR) applications including
  • how to get started by running AR on your system
  • how OpenGL is used to create computer graphics for AR
  • how to create OpenGL applications
  • how to develop Augmented Reality applications
  • how to integrate ARTag into your OpenGL programming
  • how to create 3D models and import them into the AR program you're writing
  • how to create a 3D Augmented Reality video game

Tuesday, December 18, 2007

AIR iPhone on your Desktop Powered by Ribbit

Get a fully-functional iPhone on your desktop that enables users to make and take calls on your computer. The innovative AIR iPhone developed on the Ribbit API using Adobe AIR technology makes this a reality. Users can make outbound calls to any type of phone; landline, mobile or online phone. They can also receive incoming calls and voice messages from any phone networks.

The AIR iPhone was developed by Joe Johnston of Knoware. Check it out here.


My earlier post describes the Ribbit API which enables VoIP phone calls directly from the browser. The Ribbit Developer Platform has just been released so developers can access it by signing up for an account.

Ribbit's open API enables developers to integrate voice 2.0 communications into web sites, communities and applications. A great example is Ribbit for Salesforce which links mobile voice communication to Salesforce.com. Mobile calls, voice messages and text transcriptions automatically flow into Salesforce, so users can play, read, store, search, and act on voice communications right inside their customer relationship management (CRM) web environment.

Friday, December 14, 2007

Amazon SimpleDB - Scalable Cloud Database

Amazon has announced the limited beta of Amazon SimpleDB - a simple web services interface to create and store multiple data sets, query your data easily, and return the results. Together with the Simple Storage Service (S3), Elastic Compute Cloud (EC2) and other web services Amazon offers a complete utility computing platform. SimpleDB was the missing piece of AWS - the scalable structured database.

Amazon SimpleDB is easy to use and provides the core functionality of a database - real-time lookup and simple querying of structured data like:
  • CREATE a new domain to house your unique set of structured data.
  • GET, PUT or DELETE items with attribute-value pairs
  • QUERY your data set using this simple set of operators
Users pay only for the resources that they consume. Pricing is based on
  • Machine Utilization
    $0.14 per Amazon SimpleDB Machine Hour consumed
    (normalized to the hourly capacity of a circa 2007 1.7 GHz Xeon processor)
  • Data Transfer
    $0.10 per GB - all data transfer in
    $0.13-$0.18 per GB - data transfer out
  • Structured Data Storage
    $1.50 per GB-month
Get started today with the Amazon SimpleDB Guide.

Many companies already use Amazon Web Services as their utility computing infrastructure like finalists of the Amazon Web Services Start-Up Challenge:
  • Ooyala - a platform to deliver video content for publishers
  • Brainscape - an engine for measuring the networks in the brain
  • Commerce360 - optimize paid search campaigns to deliver improved campaign efficiency
  • Justin.tv - a massively scalable live video platform
  • MileMeter - “auto insurance buy the mile”
  • UserTesting.com - quick and cheap website usability testing
  • WeoGeo - a one-stop marketplace for mapping
With the introduction of Amazon SimpleDB utility computing just got even better!

Tuesday, November 6, 2007

It is Time to Learn Amazon EC2 and S3

Utility computing is here to conquer the IT world! Amazon Vice President Adam Selipsky has recently unveiled the newest statistics on usage of Amazon S3. Their 265,000+ developer community has now stored over 10 billion (10,000,000,000) objects in S3 at a rate of 27,601 transactions per second. That's huge progress compared to the 5 billion objects just a few months ago!

Programmers and web developers should really look forward to books such as Programming Web Services - S3, EC2, SQS, and FPS by James Murty. The book will cover the most disruptive and useful web services available today:
  • Amazon Simple Storage Service (just launched in Europe!)
  • Amazon Elastic Compute Cloud (now in beta with new instances)
  • Amazon Simple Queue Service (offers reliable and scalable hosted queue)
  • Amazon Flexible Payments Service (still in limited beta)
To illustrate the power of the Amazon Web Services check out this blog entry by Derek Gottfrid: Self-service, Prorated Super Computing Fun!

The New York Times has decided to make all the public domain articles from 1851-1922 available free of charge. These articles are all in the form of images scanned from the original paper. In fact from 1851-1980, all 11 million articles are available as images in PDF format. To generate a PDF version of the article takes quite a bit of work!

Derek has achieved this with the help of Amazon S3/EC2 and Hadoop!

I quickly got to work copying 4TB of data to S3. Next I started writing code to pull all the parts that make up an article out of S3, generate a PDF from them and store the PDF back in S3. This was easy enough using the JetS3t — Open Source Java toolkit for S3, iText PDF Library and installing the Java Advanced Image Extension.

For deployment, I created a custom AMI (Amazon Machine Image) for EC2 that was based on a Xen image from my desktop machine. I logged in, started Hadoop and submitted a test job to generate a couple thousands articles — and to my surprise it just worked. It churned through all 11 million articles in just under 24 hours using 100 EC2 instances, and generated another 1.5TB of data to store in S3.

Now that this adventure can be called a success, I can’t imagine how we might have done it without Amazon S3 / EC2 . The one caveat I will offer to people who are interested in doing something like this is that it is highly addictive.

Indeed an interesting utility computing success story!

Tuesday, August 28, 2007

Amazon S3 for Video Hosting

In an earlier post I have written that the next YouTube could be built on Amazon’s Web Services (AWS) by two guys in a dorm for roughly $0. It is indeed very easy to host videos on Amazon S3.

All you need to do is to sign up for an Amazon S3 account and upload your videos with the Amazon S3 Firefox Organizer (available here: S3Fox). To see this in action check out this interesting Amazon S3 video hosting tutorial by Perry Lawrence on YouTube.

You can simply include the hosted files in your web pages. However it is also possible to create nice web applications or mashups using the video content on S3. The book Amazon.com Mashups by Francis Shanahan will help developers to get familiar with Amazon Web Services. The examples in this book demonstrates how to integrate AWS with APIs from Yahoo!, eBay, Google and YouTube. Check out this sample chapter on the Amazon Simple Storage Service (S3) available at Wrox.

It has never been easier to create your own YouTube!

Thursday, August 23, 2007

Building Smart Web 2.0 Applications

Successful internet companies have learned the hard way how to use the collective intelligence of users:
  • Amazon, Netflix and others have built recommendation engines
  • Goole has invented a unique page ranking system based on links
In his new book, Programming Collective Intelligence: Building Smart Web 2.0 Applications, Toby Segaran teaches the secrets of harnessing the power of user generated content. This practical book takes you into the world of machine learning and statistics, and explains how to draw conclusions about user experience, marketing, personal tastes, and human behavior in general. Each algorithm is described clearly and concisely with code that can immediately be used on your web site, blog, Wiki, or specialized application. The book explains:
  • Collaborative filtering techniques that enable online retailers to recommend products or media
  • Methods of clustering to detect groups of similar items in a large dataset
  • Search engine features -- crawlers, indexers, query engines, and the PageRank algorithm
  • Optimization algorithms that search millions of possible solutions to a problem and choose the best one
  • Bayesian filtering, used in spam filters for classifying documents based on word types and other features
  • Using decision trees not only to make predictions, but to model the way decisions are made
  • Predicting numerical values rather than classifications to build price models
  • Support vector machines to match people in online dating sites
  • Non-negative matrix factorization to find the independent features in a dataset
  • Evolving intelligence for problem solving -- how a computer develops its skill by improving its own code the more it plays a game

Wednesday, August 22, 2007

Web 2.0 meets Telco 2.0

The closed telecommunications business model is in trouble. Large operators find it difficult to introduce new profitable services using their expensive infrastructure. Some of them have realized this and are rushing to enable 3rd parties to implement new services by publishing interfaces to their networks. The prime example is British Telecom who has made major investments implementing their open 21st Century Network. Several APIs are now available for messaging, call control and mobile applications to create interesting mashups.

The Web21C SDK is a set of libraries that makes it simple for developers to consume Web Services exposed by BT. Many services can be accessed easily:
  • Messaging - send SMS messages
  • Voice call - place phone calls from applications
  • Conference call - place and control conference calls
  • Location - determine the geographic location (latitude,longitude, altitude) of a mobile device
  • Authentication - create and control authentication realms for applications, including management and authentication of users
  • Inbound SMS - receive and process SMS text messages from any mobile network
  • Contacts - give users the ability to build and maintain a list of buddies and set their availability
  • Information about me (IAM) - store and retrieve data about an individual in key value pairs
The Web21C SDK allows product and service developers, from major enterprises to one-man programmer start-ups, to integrate their new applications with BT services in a single line of code.

Competitive pricing model: Web21C SDK services are charged through a credit system with each service having an associated credit cost per invocation.

"No other telco in the world is doing this," says Dirk Wood of the Web21C team. "BT is ahead of the game. This product shows that BT is in the business of becoming a fundamental part of the new world where innovation is agile and can originate from anywhere. This is central to what web 2.0 really means, it's where all services are going and we're right at the leading edge of this movement."

ProgrammableWeb has a great how-to article on the big picture of telephony APIs and mashups.

Friday, August 17, 2007

Top 10 APIs for Web Mashups

Mashups are web applications that combine data from two or more external sources into an integrated experience. Content used in mashups is sourced from a third party via a public interface or API. Many people are experimenting with mashups using Microsoft, Google, eBay, Amazon, Flickr, and Yahoo APIs, which has led to the creation of Mashup Editors.

ProgrammableWeb is a great resource on mashups. Based on their latest stats the top 10 APIs for web 2.0 mashups of all time are:


However recently popular mashups also use these APIs:
  • Twitter - What are you doing?
  • Skype - create applications that work together with Skype
  • GeoNames - eight million geographical names available under free creative commons licence
Check out the full list with ~500 APIs on ProgrammableWeb and their tutorial on how to make your own web mashup!

Wednesday, August 15, 2007

Erlang: The Programming Language for Multicore CPUs

The future of computing is going to be concurrent. Sun has just announced the UltraSPARC T2 CPU which they call the World's fastest microprocessor. With 8 cores and 64 threads it makes a true system on a chip. Even desktop systems have multi-core processors nowadays. However traditional software is not well prepared to effectively utilize large number of cores.

Concurrent programming is hard. Most programming languages do not make it easier either. On the other hand Erlang is ideally positioned for this new world. It was designed from the ground up to take advantage of parallel and multi-core architectures.

Erlang is a concurrent functional programming language and runtime system. It was designed to support distributed, fault-tolerant, soft-real-time, non-stop applications. Erlang was originally a proprietary language within Ericsson, but was released as open source in 1998.

Erlang programs usually scale very well on multi-core systems. Joe Armstrong explains why:

"Back in the old days (20 odd years ago) there were two models of concurrency:
  • Shared state concurrency
  • Message passing concurrency
Now the whole world went one way (towards shared state), and we went the other"

The Erlang concurrency model differs from other languages by not having any shared state. If a process wants to communicate with another, it does so by sending messages. This method scales better than methods that uses shared memory for communication.

You can learn much more about Erlang in Joe Armstrong's new book:
Programming Erlang: Software for a Concurrent World

It's very readable and does not require prior experience with functional languages. The book is packed with examples and encourages experimenting; in fact the first chapter explains the installation of Erlang. A reviewer calls it "the most important programming language book this decade".

To have some fun check out this article and video from 1990: Erlang Now!


More resources: