Wednesday, 2 March 2011

Mashup Applications

The terms Remix and Mashup actually came from the music world.Remix is actually the same song sung to an new or updated beat.Mashup is similar to Remix where in the music world two elements are combined to form a different effect of that song that's actually called mashup.
So now coming back to actual field where Mashup,a web application based technology which actually combines data and services from various sources to create new application.
Some examples of the companies which currently use Mashups are Google,Yahoo,Amazon,eBay,Flickr as well as many online news services and social networking sites.
A simplest form of mashup is shown in the figure.
(Reference:Amazon.com Mashups by Francis Shanahan)


The working procedure in steps is as follows:
Step 1 : The Web browser communicates with the server which actually requests  a page using HTTP or HTTPS.
So actually there are two requests which is being handled one is Amazon and the other one is Yahoo.
Step 2 :  So the page is constructed by the Web Server and the first request which is Amazon is handled by using the SOAP over HTTP.
Step 3 : Amazon returns back a SOAP response.
Step 4 : The second request is Yahoo by using a Representational State Transfer (REST) style approach.
Step 5 : Yahoo will respond with Plain Old XML over HTTP.
Step 6 : Finally the web server takes up the responses and combines the data which makes some sense.
Step 7 : So the resulting data will be in HTML and which is inserted into the response and lastly sent back to the browser.
                  

service oriented architecture

It is an architecture which helps in transformation of business into services and these services can be accessed using internet.services from geographically distributed places can be combined to form a single service.Entry points for SOA are people,process,information,connectivity and reuse of services.

About mashup apps...

Mashup apps is a web apps hybrid where actually which uses and combines data,presentation or functionality from two or more sources to create a new service..
The main use of mashup is that the existing data can be made more powerful and professional.The mashup can exist in different kinds.lets see that:

1)Data mashups:This kind of mashup leads to entirely new kind of web service which was not provided by either source.

2)Consumer mashups:In this kind,the different data types is combined.

3)Business mashups:This generally defines apps that combine thier own resources,application and other data with external web services.it means this also results in some new view of business representation by using their old application views..

Web Services

Web Services are actually the services that are deployed on the web. A Web service is a method of communication between two electronic devices on the network. Its a way of calling methods/functions in an application on the web from another application.

Web Services are an implementation of SOA.
In SOA there are mainly two actors, one is the service provider or producer and the other is the service requestor  or consumer. The consumer sends a request for the service and the producer serves the request with a response. The main characteristic of a web service architecture is that the service providers publish their service description which are placed in a service directory(think of this directory as the popular yellow pages). The consumers on the other hand perform a query against this directory to find what services are available and how to communicate with that provider.

Web services are the APIs on the web which allow applications to communicate with each other using XML, a meta data and using SOAP as protocol.

The heart of the web services are:
  • WSDL(Web Services Description Language)
  • SOAP(Simple Object Access Protocol) and
  • UDDI(Universal Description, Discovery and Integration registry).

Let me briefly explain what they actually are.
WSDL is an industry accepted standard for defining an interface to a service i.e., the service descriptions are to be written in this standard language before they are placed in the service directory.
SOAP defines the protocol - on the network - for making requests and receiving responses.
Finally UDDI, is a standard for registering and searching web services within the service directories - yellow pages as it were - containing web services. Thus UDDI enables searching/discovery of various web services.

Web services are standardised by the W3C with the use of XML(eXtensible Markup Language) tags which form the basis for the web services. XML is actually designed to carry data and not display the data in a browser.

SOA???The evolution

soa is a collection of many services in the network.These services communicate with each other and also involves data exchange and service coordination.Previously SOA was using Dcom objects.But instead of Dcom now web is used.Since web is really a rich collection of various resources SOA has very much to do with the web services.Some of the reasons which makes soa very dependable are:
1)Firstly its platform independent.So the clients can use any software or hardware of their choice.

2)SOA supports incremental development, deployment and maintainence.

3)Its very loosely coupled,hence very robust and scalable.

All the above features make soa very demanding and deployed all over..
The evolution of soa has started from late 80's or 90's.Initially the business transactions or any other transactions took place directly.but later the middle parties or middlewares came into existence.So some kind of interaction mechanism was needed to interact between service provider ,client and middle ware.
All this factors led to the growth and evolution of SOA.

Mashup

Mashup can be defined as web page which is used to create new web services by using and combining the data or functionality of two or more services. Mashups are generally client applications, which allows the permanent access to the data of other services. 

Mashup tools d'not require programming skills rather support GUI widgets, which makes them easy to be used by the end users. Depending on the location where data is used and re-formated mashups can be classified into following types,
  • Web-based mashups, these use the user's web browsers to use and re-format data
  • Server-based mashups, these use and re-format the data on remote server, the result will be sent to the user's web browsers.
Web protocols like SOAP and REST leads to the development of mashup as they allow clients to interact with the remote services without knowing their implementation. Mashup uses screen scraping technology in order obtain the data specially from public sectors.

Mashup applications architecture has three different components
  • Content provider
  • Mashup site
  • Client's web browser
Data pollution is the major problem faced by the mashup developers as they support data to be entered by the user, it leads to inconsistent and incorrect data entry and access. Data acquisition using screen scapping may also lead to problem as it requires reverse engineering in order to interpret how the source site represent the data.

Difference between web service and web application

There is a lot of difference between a web service and web application.web service is nothin but a programmable unit of software that can be accesses over internet and used remotely.It can be used by single application or can be exposed to internet where it will be used by multiple applications.
But web application is entire collection of the web pages,handlers,modules,execs which can be invoked from a web server.So if i say in some other view a web service is just a means which provides interoperability between various web apps.In other words a web app works between client/server and web service provides support for working of web apps.
I'll give an example which provides a clear distinction between a web service and web application.
If we consider the banking system,the web page which is used to transact is actually web application.And the developers or the bank data can be considered as the service provider..
So web services is just mechanism to access some programmable unit by using HTTP and XML.web app is just a collection web pages accessed by clients..