You are here

Composite applications

20 January, 2016 - 15:30

Early Web sites were pure client-server applications – a user retrieved information from a single server. Soon, applications began to emerge that, without the user knowing it, combined information from multiple servers. For example, when one purchased a book from Amazon, it was shipped via United Parcel Service (UPS), but one could track it’s shipment from the Amazon Web site. Behind the scenes, the Amazon server queried the UPS server to get the current shipping information then relayed it back to the user in an “Amazon” web page. This required agreement and coordination between programmers at Amazon and UPS. The UPS programmers had to give the Amazon programmers technical details on how to access information from the UPS server – they had to define the UPS application program interface or API.

But, Amazon was not the only UPS customer who would like to provide shipment tracking information, so UPS and others began publishing their APIs so others could access their services. Today, companies commonly publish APIs and encourage others to create composite applications, often called mashups, incorporating data or computation from their servers. 1

Figure 7.1 illustrates a mashup. The application at Housingmaps.com is used to rent and sell apartments and houses. In this case, we see listings in the USD 1500-2000 range in the western portion of Los Angeles. The data were retrieved from Craigslist.com, an online application listing items for rent and sale, and displayed on a map from Google.com. It is noteworthy that the map on the left side is not a static picture. It offers the full function of Google’s mapping service – scrolling, zooming, panning and alternating street maps (shown here) and satellite photos. The links on the right hand side retrieve detailed descriptions of the rental offerings from Craigslist.com.

media/image16.png
Figure 7.13 A Google Map-Craigslist mashup 
 

While Google and Craigslist currently offer access to their applications on the open Internet at no cost, others charge for such services. For example, Amazon operates an extensive online store, and they offer access to the technology that powers that store to others. Organizations as varied as Target Stores, the National Basketball Association, and Bohemica.com's bookstore on Czech culture all use Amazon.com Web services.

Amazon, Google and Craigslist have extensive datacenters operating around the clock. They have made very large investments in programming and building expertise. The cost of expanding and maintaining Google’s global map database is very high, and Craigslist has a vast store of user contributed data. But, since their APIs are simple, it is relatively easy for a programmer to incorporate these valuable assets into a new application. Applications with open APIs are becoming part of our information infrastructure, part of today’s software development and delivery platform.

Sidebar: Using a Web service to add audio to an application

I maintain a blog as a supplement to a course I teach. The blog is at http://cis471.blogspot.com/, and, if you visit it, you will see a link at the bottom of each post that reads listen to this article. In the right-hand column, you will also notice a link reading Audio RSS Feed.

If you follow the first link, you will hear a slightly stilted sounding woman reading the text of the article. The program that does this text to speech conversion is quite complex and requires a fast computer, but that complexity is hidden. A server at Talkr.com does the conversion and the link to it required adding only one line of HTML code to the blog template:

<a               href='http://www.talkr.com/app/fetch.app?feed_id=25222&perma_link=<$BlogItemPermalinkURL$>'>Listen to this article </a>.

 

Adding the Audio RSS feed converts the blog to a podcast. A user who subscribes to the RSS feed automatically receives audio recordings of articles when they are posted. Again, adding this complex feature required only a single line of HTML code in the blog template:

<a href="http://www.talkr.com/app/cast_pods.app?feed_id=25222"> Audio RSS Feed</a>.

Adding these audio features brought the blog into compliance with university regulations on accessibility by blind people. Doing so took only a few minutes because of the simple API used by the service at Talkr.com.