Google

Web Services Basics

Many definitions of web services

  • Application that communicate with SOAP (SOAP is an XML based messaging protocol)
  • Has SOAP interface
  • Some oppose constraining web services to SOAP
  • Applications that communicate over Internet
  • Anything accessible over Internet
  • Web services are Software As A Service (SaaS)
Author’s definition of web service
  • An application that provides Web API (API that lets applications communicate with other applications using XML and Web)
  • Web services use web to perform application to application integration
  • Services that uses web may become reality sometime
Some hypes that web services
  • Dynamic assembly of web-based software services
  • Is SaaS business model
  • Spontaneous discovery of business models

Why web services?
  • Helps integrate applications that significantly lower price point than any other integration technology

How web services work?
  • Web services represent new form of middleware technology based on XML & web to solve challenges associated with application-to-application integration.

Traditional middleware (RPC, CORBA, RMI, DCOM) blues
  • Heterogeneity is not supported
  • Does not work across Internet
  • Is not pervasive
  • Hard to use & re-use
  • Expensive
  • Maintenance costs are outrageous
  • Tightly coupled => Fragile

Web services positives
  • Platform independent (development to distributed computing)
  • Language independent (development, deployment, access independence)
  • Based on XML & Web
  • Pervasive
  • Work across Internet
  • Heterogeneity Interoperability
  • Makes application talk to each other
  • Lower development cost
  • Faster time to market
  • Easier Maintenance
  • Reduced Total Cost of Ownership
  • Loosely coupled
  • Minimizes impact of changes to your applications
  • Reduces maintenance cost
  • Web services interface provides a layer of abstraction
  • Abstraction increases reusability
Defining Web & Service:
Web
  • Immensely scalable information space filled with interconnected (via Internet) resources
  • Resource can be any type of named information object that is accessible through web. E.g. doc, picture, web-page, email, application
  • Solves integration challenges
  • Is pervasive (spreading or spread throughout)
  • Provides universal connectivity
Service
  • Application that exposes its functionality through API
  • Resource that is designed to be consumed by software rather than human beings
  • Implies Service Oriented Architecture (SOA)
  • SOA is basic architecture used by RPC style middleware systems
  • SOA separates interface (which hides internal functionality [client need not to know this] of application)
  • Piece of software that works for other software

Combining Web & Service,
  • Web Service = Web Resource + Service
(which is consumed (Functionality exposed
by software rather through API)
than in browser)
  • Runs on a server, waiting for an application to call it and ask for some work
  • Usually, doesn’t provide human interface and only way to access is API
  • Can perform system function (e.g. file handling) or business application function (e.g. stock quote)
  • In client-server terms, service is a server
  • E.g. Print Server, File Server, Database Server, Service Oriented Software (Web Server, Application Server)
  • Business applications are implemented as services:
- Consolidate effort
- Reduces duplicate work
  • Business application services run in Application Server
Application servers manage & co-ordinate utilization of all resources available in shared, multi-processing environment, enabling optimized performance, scalability (because many users can share a service), reliability, & availability
  • Web service may implement many functions e.g. Order Processing System Service implementing catalog, shopping cart, payment etc.

Building Web Services
  • To let clients access a service over Internet, you must build a network API for service.
  • Some kind of communication middleware to be used to create new API.
  • Using traditional middleware posses blues
  • Requirement: Services to be available to heterogeneous users across multiple systems (including Internet) at reasonable cost.
  • Solution: Web service which is free, vendor-independent along with other advantages provides integration, flexibility, and service reusability.

Web Evolution
Web
  • Originally created to support interactive communication
Interactiveè Communication with people using email and instant messengers and information access using browsers

Web Site
Static ------->Dynamic
Dynamic: Calls application that dynamically generates and renders requested information

Web Service
Provides universal connectivity, immense scalability of web, supports much richer set of usage models than do human oriented applications.

Comparing Website with Web Services
  • Websites (dynamic ones) allow people to talk to applications whereas Web Services allow applications to talk to other web services or applications
  • Websites provide group of web resources to be accessed by humans whereas Web Services provide group of web resources designed to be accessed by applications.
  • Interfaces are quite different.
- Websites supports human clients who have tremendous capacity to interpret meaning of information (HTML with text, graphics, widgets, and links). Humans interpret information based on visual layout and physical association
- But applications cannot interpret information this way. An application:
* Needs unambiguous information
* Which programmatic functions are available
* How to structure & interpret data being exchanged

Web API defines these programmatic functions and data structures in a completely unambiguous way.

Defining Characteristics: Web Service is:
  • Web resource accessible using platform independent and language neutral web protocols such as HTTP to ensure easy integration of heterogeneous environments.
  • Provides an API that can be called from another program. This application-application API can be invoked from any type of application. Provides access to application logic that implements a service.
  • Typically, registered and can be located through a Web Service registry
  • Registry enables service consumers (human/apps) to find services that match their needs.
  • Supports loosely coupled connections between systems. Communicates by passing XML messages to each other via web API which adds a layer of abstraction to environment that makes connections flexible and adaptable.

Understand Scope of Web Services
  • Scope:
o Build Web Service
o Run Web Service
o Use Web Service
  • 4 basic concepts:
1. XML & Web Services Technologies
There are the foundations
2. Web Services Infrastructure
- Build, deploy, manage, & use Web Services
- Implements XML and Web Services technologies
3. Web Services
- Information resource or business process made available to other applications through Web API
- Resource that supports application-application communication using Web Services Infrastructure
- Any piece of code that can be converted into Web Services
4. Web Services Templates
- Represents kinds of applications and initiatives for which Web Service technology offers substantial benefits e.g. Portals, ERP, CRM, EAI initiatives & B2B integration.

Each layer builds on layer below it.

Web Service Business Model
  • Software as a Service (SaaS) is not a Web Service template but business model
  • SaaS: License subscription rights to deploy software in your own organization. E..g. salesforce.com offering CRM subscription
  • Rarely, you sell a Web Service but sell products or service with the help of Web Service
  • Rarely, Web Service are focus of business model and without a viable business model it is hard to create a business case of Web Service.

Case Studies
1. Google
· Leading web search company
· Public search engine indexing more than 3 million web pages
· Has human oriented browser interface
· Business model that supports this service is advertisement (means of revenue generation for Google)
· Also provides Web Services interface to this public search engine (WS API) to query Google search from an application rather than browser and returns structured data that requesting application can process.
· Google Web API can be used for any new & interesting application like subject monitoring, market research, plagiarism detection.
· Google Web API is not a new service but a programmatic interface to Google’s public search engine
· It is out of goodwill – free but limited to 1000 queries a day & no advertisement support
· But your Web Service should be designed to support your existing business model & should provide a new improved mechanism to sell or use an existing product or service.

2. Kinko
· A document solution & business services company
· Offers client interface (add-on to MS Office) to its Print Web Service. Users can order prints with different options like binding, stapling, charges, location etc. & will be even notified when request is completed.
· This web service does not compete with company’s core business model but enhances it by providing another way for users to submit print jobs – level of convenience that user appreciates.

3. Amazon
· Uses Web Services to enhance core business model which is based on online retail sales
· Its online catalogue feature was designed to be viewed by human using browser.
· But Amazon developed Web Service so that affiliate applications can use this Web Services through Web API.
· Before Web Service, this was difficult& needed a screen scraping application that simulates human sitting at browser
· Win-win situation for Amazon & Affiliates resulting in rise in product sales.

4. UPS
· Provides Web Service to streamline logistic process – online integration, shipping, tracking, & related functions

5. T-Mobile
· Here, Web Service enables a new business model
· T-mobile provides a wireless web portal

CONSUMER -----------------T-MOBILE-------------CONTENT PROVIDERS
(E-mail, SMS (Revenue from (Consumer usage, billing)
Stocks, Banking) increased airtime
usage)
Web Service is not focus but this would not work without them

Internal Integration
  • Previous examples were of external application integration
  • Makes customers/partners to do business
  • Anything that simplifies Business Interface is a valuable commodity
  • Web Services themselves do not define business model instead they support existing business model
  • Sometimes, enables new business model as well.
  • Web Services can also be used for internal integration of applications.
  • Similarly, internal Web Services should support your core business model
  • Improve or optimize your internal application system to make business process work better
  • Explore if Web Services can dramatically lower cost of your application integration
  • Case Study of Merill Lynch:
Multiple applications communicates to mainframe based CICS through Web Service.
Using Message-Oriented-Middleware (MOM) technology would have cost $800,000 compared to $30,000 using Web Services. Any client environment can access CICS environment using SOAP gateway without needing any specific software or any special adaptors on any of the systems.

Executive Summary
  • Web Service: An application that provides Web API which exposes functionality of application to other applications.
  • Web API:
- Relies on web service technologies to manage communication
- Purpose is to enable integration of heterogeneous applications.
  • Web Service Technologies: Are Pervasive, Vendor-Independent, Language, Neutral, Cost-Effective
  • Do not represent new business model but are a technology to build systems to support business
  • IT departments uses Web Services to reduce cost & simplify integration process.
Some Uses
  • To implement internal point-to-point application integration projects
  • To consolidate your development efforts & reduce redundant applications
  • Implement General Purpose Integration Bus for your internal applications
  • External application integration for business partnerships.
Source: Web Services Basics: A Manager's Guide By Ann Thomas Manes