Web Services

SARVESH AMRUTE
7 min readJun 7, 2022

Introduction

A Web service is a method of communication between two electronic devices over a network. A web service is a software module that is designed to perform a certain set of tasks.

  • Web services in cloud computing can be searched for over the network and can also be invoked accordingly.
  • When invoked, the web service would be able to provide the functionality to the client, which invokes that web service.

Need of Web Services

Modern day business applications use a variety of programming platforms to develop web-based applications. Some applications may be developed in Java, others in .Net, while some others in AngularJS, Node.js, etc.

Most often than not, these different applications need some sort of communication to happen between them. Since they are built using different development languages, it becomes really difficult to ensure accurate communication between applications.

Here is where web services play an important role . Web services provide a common platform that allows multiple applications built on various programming languages to have the ability to communicate with each other.

Working of Web Services:

The above diagram shows a very simple view of how a web service would actually work. The client would invoke a series of web service calls via requests to a server which would host the actual web service.

The requests are made through what is known as remote procedure calls (RPC). These are the calls made to methods which are hosted by the relevant web service.

For example, Amazon provides a web service that provides prices for products sold online via amazon.com. The front end can be in .Net or Java but either programming language would have the ability to communicate with the web service.

The main component of a web service design is the data which is transferred between the client and the server, and that is XML (Extensible markup language). It is a counterpart to HTML and is an easy to understand intermediate language.

Web services use something known as SOAP for sending the XML data between applications. The data is sent over normal HTTP. The data which is sent from the web service to the application is called a SOAP message. This message is an XML document.

Types of Web Services

There are a couple central types of web services: SOAP and REST:

SOAP (Simple Object Access Protocol): SOAP is an XML-based Web service protocol to exchange data and documents over HTTP or SMTP (Simple Mail Transfer Protocol). It allows independent processes operating on disparate systems to communicate using XML.

REST (Representational State Transfer): REST provides communication and connectivity between devices and the internet for API-based tasks. Most RESTful services use HTTP as the supporting protocol.

Web Services Architecture

Every framework needs some sort of architecture to make sure the entire framework works as desired, similarly, in web services. The Web Services Architecture consists of three distinct roles as given below :

  1. Provider — The provider creates the web service and makes it available to client applications who want to use it.
  2. Requestor — A requestor is nothing but the client application that needs to contact a web service. The client application can be a .Net, Java, or any other language based application which looks for some sort of functionality via a web service.
  3. Broker — The broker is nothing but the application which provides access to the UDDI. The UDDI, as discussed in the earlier topic enables the client application to locate the web service.

The diagram below showcases how the Service provider, the Service requestor and Service registry interact with each other.

  1. Publish — A provider informs the broker (service registry) about the existence of the web service by using the broker’s publish interface to make the service accessible to clients
  2. Find — The requestor consults the broker to locate a published web service
  3. Bind — With the information it gained from the broker(service registry) about the web service, the requestor is able to bind, or invoke, the web service.

Web Services Advantages

Let’s look at the advantages for why it is important to use web services:

  • Exposing Business Functionality on the network: A web service is a unit of managed code that provides some sort of functionality to client applications or end users. This functionality can be invoked over the HTTP protocol which means that it can also be invoked over the internet.
  • Interoperability amongst applications: Web services allow various applications to talk to each other and share data and services among themselves. Even writing a generic code can be understood by all applications
  • A Standardized Protocol which everybody understands: Web services use standardized industry protocol for the communication. All the four layers (Service Transport, XML Messaging, Service Description, and Service Discovery layers) use well-defined protocols in the web services protocol stack.
  • Reduction in cost of communication: Web services use SOAP over HTTP protocol, so you can use your existing low-cost internet for implementing web services.

Web service Characteristics

Web services have the following special behavioral characteristics:

  1. They are XML-Based — Web Services use XML to represent the data at the representation and data transportation layers. Using XML eliminates any networking, operating system, or platform sort of dependency.
  2. Loosely Coupled — Loosely coupled means that the client and the web service are not bound to each other, which means that even if the web service changes over time, it should not change the way the client calls the web service.
  3. Synchronous or Asynchronous functionality — In synchronous operations, the client will actually wait for the web service to complete an operation. Asynchronous operations allow a client to invoke a service and then execute other functions in parallel.
  4. Ability to support Remote Procedure Calls (RPCs) — Web services enable clients to invoke procedures, functions, and methods on remote objects using an XML-based protocol. Remote procedures expose input and output parameters that a web service must support.

What is AWS?

Amazon web service is an online platform that provides scalable and cost-effective cloud computing solutions. AWS is a broadly adopted cloud platform that offers several on-demand operations like compute power, database storage, content delivery, etc., to help corporates scale and grow.

AWS Services

Amazon has many services for cloud applications. Let us list down a few key services of the AWS ecosystem and a brief description of how developers use them in their business.

1] Computing Service: These services help developers build, deploy, and scale an application in the cloud platform.

2] AWS EC2: It is a web service that allows developers to rent virtual machines and automatically scales the compute capacity when required. It offers various instance types to developers so that they can choose required resources such as CPU, memory, storage, and networking capacity based on their application requirements.

3] Database: AWS database domain service offers cost-efficient, highly secure, and scalable database instances in the cloud.

About DynamoDB:

  • It is a flexible NoSQL database service that offers fast and reliable performance with no scalability issues.
  • It is a multi-region and durable database with instant built-in security, backup and restores features.

Developer Tools

It helps a user build, deploy, and run an application source code automatically. It also updates the server and instance on the workload.

CodeStar: It is a service designed to manage application development in a single place. Here, developers can quickly develop, build and deploy applications on AWS

Applications of AWS

AWS enables businesses to build a number of sophisticated applications. Organizations of every industry and of every size, can run every imaginable use case on AWS. Most common applications of AWS:

1. Storage and Backup: One of the reasons why many businesses use AWS is because it offers multiple types of storage to choose from and is easily accessible as well. It can be used for storage and file indexing as well as to run critical business applications.

2. Websites: Businesses can host their websites on the AWS cloud, similar to other web applications.

3. Gaming: There is a lot of computing power needed to run gaming applications. AWS makes it easier to provide the best online gaming experience to gamers across the world.

4. Mobile, Web and Social Applications: A feature that separates AWS from other cloud services is its capability to launch and scale mobile, e-commerce, and SaaS applications.

Summary

In this introductory blog “Web Services”, we discussed what web services is, its need, features , types and we also went through architecture and example like AWS services in detail.

Web Services are essential for communication purposes.Web services offer different benefits across business operations. The technology helps IT pros and web architects streamline connectivity by minimizing development time. And with this simplified infrastructure, company executives begin to see higher ROI (return on investment). In a B2B operation where both parties understand how the process works, web services provide efficient technology distribution throughout an entire network.

References

Written By:

Sarvesh Amrute, Ananya Kumar, Akash Kumar, Farhan Aga

Thank you for reading the blog. We hope you liked it. Please mention your views about it in the comments

--

--