Web Service: Definition, Architecture and Examples

Lecture



A web service, or web-based service, is a software system identified by a unique web address (URL) that exposes standardized interfaces; the term is also used for a website's HTML document as displayed in the user's browser.

Web services can interact with one another and with third-party applications through messages based on defined protocols (SOAP, XML-RPC, etc.) and conventions (REST). A web service is a unit of modularity in a service-oriented application architecture.

In everyday usage, web services means services provided on the Internet. In this sense the term needs clarification as to whether it refers to search, web mail, storage of documents, files, bookmarks, and so on. Such web services can be used regardless of the computer, browser, or place from which the Internet is accessed .

Advantages and disadvantages

Advantages

  • Web services enable software systems to interact regardless of platform. For example, a Windows C# client can exchange data with a Java server running on Linux.
  • Web services are based on open standards and protocols. Thanks to the use of XML, web services are simple to develop and debug.
  • Using an Internet protocol enables HTTP-based interaction between software systems through a firewall. This is a significant advantage compared to technologies such as CORBA, DCOM, or Java RMI. On the other hand, web services are not tied irrevocably to HTTP; other protocols can be used as well.

Disadvantages

  • Lower performance and larger network traffic compared to RMI, CORBA, and DCOM, due to the use of text-based XML messages. However, some web servers can be configured to compress network traffic.
  • Security aspects. Critical web services must use encryption and possibly require user authentication. Whether HTTPS is sufficient here, or whether solutions such as XML Signature, XML Encryption, or SAML are preferable, is for the developer to decide.

Examples

Interaction between airlines and travel agencies: the former provide useful information through web services, which the latter use to find optimal offers for their clients.

From 2002 to 2009, the Google search engine provided a web service that allowed customers to search for the information they needed on the Internet just as ordinary users do (in terms of convenience, this is incomparable with, for example, automated parsing of the HTML text of Google result pages).

Amazon.com has a web service that provides various web-based services.

The MOBILESERVER web service, which uses messages based on the open SOAP (XML) and JSON protocols, makes it possible to get current data from a heat meter as of the last time its data was read.

App stores and online commerce

An app store is an online store that allows third-party software development companies to offer owners of (usually) mobile devices various apps and games to install and purchase, and allows producers of other content to offer books, music, and movies as well.

  • Windows app store (Microsoft Store)
    • Windows Phone app store (formerly Windows Phone Marketplace)
  • Google/Android app store (Google Play)
  • Chrome app store
  • Apple app store (App Store)
  • Mac App Store
  • Opera Mobile Store
  • Samsung Galaxy Store
  • Huawei app store (AppGallery)
  • Yandex app store (Yandex.Store)

Marketplace

Providing merchants with a web trading platform for selling online.

Streaming

These services provide streaming (delivery of streaming media).

  • audio streaming (Spotify, Tidal, Roon, Qobuz , Muzlab, etc.);
  • video streaming (Netflix, Megogo, Disney+, etc.).

Implementation technologies

Web Service: Definition, Architecture and Examples
A web service based on UDDI (which had practically fallen out of use by 2010) and SOAP (still used in 2018 in conservative sectors)

Architecture

As the figure shows, three parties that interact within a web service can be distinguished. We will translate their names as

  • requester (service requester);
  • provider (service provider);
  • directory (service broker).

Once a service has been developed, the provider registers it in the directory, where potential requesters can find it. Having found a suitable service in the directory, the requester imports its WSDL specification from there and develops its own software in accordance with it. WSDL describes the format of the requests and responses exchanged between the requester and the provider during operation. The following standards are used to enable interaction:

  • XML: Extensible Markup Language, designed for storing and transmitting structured data;
  • SOAP: An XML-based messaging protocol;
  • WSDL: An interface definition language that defines the interaction (contract) between a consumer and SOAP web services. It is written in XML;
  • UDDI: Universal Discovery, Description and Integration. A directory of web services and of information about companies that offer web services for public use or to specific companies. So far, however, UDDI registries exist only in small proprietary networks and have not yet gained wide adoption on the open Internet;
  • JSON: A more efficient data format that became mainstream in the 2010s.

Development methods

There are tools that automate web service development, falling into two main groups. In bottom-up development, the implementing classes are written first, and WSDL files documenting the service are generated from their source code. The drawback of this method is that Java classes are prone to frequent changes. In the top-down approach, the WSDL is prepared first, and a skeleton of the Java class implementing the service is generated from it. This path is considered harder, but it leads to cleaner solutions that are better protected against changes. As long as the format of the messages exchanged between the requester and the provider does not change, changes on either side do not break the interaction. This technique is sometimes called "contract first", because the starting point is the WSDL (the "contract" between the requester and the provider).

There is also web service development based on an SDK for document recognition (OCR).

Platforms

Web services are deployed on application servers. Some application servers:

  • ColdFusion from Adobe
  • DotGNU from the GNU Project (development discontinued)
  • GlassFish, from Oracle
  • Google App Engine, a platform for scalable applications that use Google's infrastructure
  • IBM Lotus Notes, a line of collaboration software from IBM
  • JBoss, from Red Hat
  • Mono, a development platform from Xamarin (formerly Novell)
  • .NET Framework servers from Microsoft
  • Web Application Server from SAP (a key part of the SAP NetWeaver stack)
  • WebLogic from Oracle (a product of BEA Systems, which was acquired by Oracle)
  • webMethods Integration Platform from Software AG
  • WebSphere Application Server from IBM (based on Apache and the J2EE platform)
  • Zend Framework, from Zend Technologies
  • Zope is an object-oriented application server written in Python

Links

  • W3C Web Services http://www.w3.org/2002/ws/

See also

  • List of web service frameworks
  • List of web service protocols
  • List of web service specifications
  • Middleware
  • Service-oriented architecture (SOA)
  • Web mapping service

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Fundamentals of Internet and Web Technologies"

Terms: Fundamentals of Internet and Web Technologies