Unit 1 1-1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

Unit 1: Self-Assessment

On the table below, write down what are your strengths and weaknesses towards your learning
activities in Unit 1 in CIT 237

STRENGTHS WEAKNESSES
Knowledgeable about web services platforms Not familiar abut components of web services
Web Services Operation Web services examples
Components of web services Web services security
Advantage of using Web services Middleware
Support Remote Procedure calls Internet protocols
Support Document Exchange Distributed computing
Web Services Roles Client server model
Service Transport Blocks Extensible Exchange Protocol
Hyper Text Transfer Protocol Windows Application-Based Web Service
Consumer
About XML Synchronous and asynchronous messaging

Unit1: Activity 1

1. Research the following topic follow and site at least 3 references


a. Web Services

A web service is any piece of software that makes itself available over the internet and uses a
standardized XML messaging system. XML is used to encode all communications to a web service. For
example, a client invokes a web service by sending an XML message, then waits for a corresponding XML
response. As all communication is in XML, web services are not tied to any one operating system or
programming language—Java can talk with Perl; Windows applications can talk with Unix applications.

Web services are self-contained, modular, distributed, dynamic applications that can be described,
published, located, or invoked over the network to create products, processes, and supply chains. These
applications can be local, distributed, or web-based. Web services are built on top of open standards
such as TCP/IP, HTTP, Java, HTML, and XML.

Web services are XML-based information exchange systems that use the Internet for direct application-
to-application interaction. These systems can include programs, objects, messages, or documents.

A web service is a collection of open protocols and standards used for exchanging data between
applications or systems. Software applications written in various programming languages and running on
various platforms can use web services to exchange data over computer networks like the Internet in a
manner similar to inter-process communication on a single computer. This interoperability (e.g.,
between Java and Python, or Windows and Linux applications) is due to the use of open standards.

To summarize, a complete web service is, therefore, any service that −


Is available over the Internet or private (intranet) networks

Uses a standardized XML messaging system

Is not tied to any one operating system or programming language

Is self-describing via a common XML grammar

Is discoverable via a simple find mechanism

Components of Web Services

The basic web services platform is XML + HTTP. All the standard web services work using the following
components −

SOAP (Simple Object Access Protocol)

UDDI (Universal Description, Discovery and Integration)

WSDL (Web Services Description Language)

All these components have been discussed in the Web Services Architecture chapter.

How Does a Web Service Work?

A web service enables communication among various applications by using open standards such as
HTML, XML, WSDL, and SOAP. A web service takes the help of −

XML to tag the data

SOAP to transfer a message

WSDL to describe the availability of service.

You can build a Java-based web service on Solaris that is accessible from your Visual Basic program that
runs on Windows.

You can also use C# to build new web services on Windows that can be invoked from your web
application that is based on JavaServer Pages (JSP) and runs on Linux.

Example

Consider a simple account-management and order processing system. The accounting personnel use a
client application built with Visual Basic or JSP to create new accounts and enter new customer orders.

The processing logic for this system is written in Java and resides on a Solaris machine, which also
interacts with a database to store information.

The steps to perform this operation are as follows −

The client program bundles the account registration information into a SOAP message.

This SOAP message is sent to the web service as the body of an HTTP POST request.
The web service unpacks the SOAP request and converts it into a command that the application can
understand.

The application processes the information as required and responds with a new unique account number
for that customer.

Next, the web service packages the response into another SOAP message, which it sends back to the
client program in response to its HTTP request.

The client program unpacks the SOAP message to obtain the results of the account registration process.

Source: What are Web Services? (tutorialspoint.com)

What are Web Services?

There is more than one way to answer, “What is a web service?” But, essentially, web services include
any software, application, or cloud technology that provides standardized web protocols (HTTP or
HTTPS) to interoperate, communicate, and exchange data messaging – usually XML (Extensible Markup
Language) – throughout the internet.

In other words, web services are XML-centered data exchange systems that use the internet for A2A
(application-to-application) communication and interfacing. These processes involve programs,
messages, documents, and/or objects.

A key feature of web services is that applications can be written in various languages and are still able to
communicate by exchanging data with one another via a web service between clients and servers. A
client summons a web service by sending a request via XML, and the service then responses with an
XML response. Web services are also often associated with SOA (Service-Oriented Architecture).

To break that down, a web service comprises these essential functions:

Available over the internet or intranet networks

Standardized XML messaging system

Independent of a single operating system or programming language

Self-describing via standard XML language

Discoverable through a simple location method

A web service supports communication among numerous apps with HTML, XML, WSDL, SOAP, and other
open standards. XML tags the data, SOAP transfers the message, and WSDL describes the service’s
accessibility.

Here’s an instance of how it works: A web service sits between two sets of java, .net, or PHP apps
providing a way for these applications to communicate over a network. On one side, for example, a java
app interacts with the java, .net, and PHP apps on the other end by way of the web service
communicating an independent language.

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.

What are the Different Types of Web Services?

There are a few central types of web services: XML-RPC, UDDI, SOAP, and REST:

XML-RPC (Remote Procedure Call) is the most basic XML protocol to exchange data between a wide
variety of devices on a network. It uses HTTP to quickly and easily transfer data and communication
other information from client to server.

UDDI (Universal Description, Discovery, and Integration) is an XML-based standard for detailing,


publishing, and discovering web services. It’s basically an internet registry for businesses around the
world. The goal is to streamline digital transactions and e-commerce among company systems.

SOAP, which will be described in detail later in the blog, 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, which will also be described in great detail later in the blog, provides communication and
connectivity between devices and the internet for API-based tasks. Most RESTful services use HTTP as
the supporting protocol.

Here are some well-known web services that use markup languages:

Web template

JSON-RPC

JSON-WSP

Web Services Description Language (WSDL)

Web Services Conversation Language (WSCL)

Web Services Flow Language (WSFL)

Web Services Metadata Exchange (WS-Metadata Exchange)

XML Interface for Network Services (XINS)

SOAP vs. REST Web Services

For years, IT pros and web developers have debated over which web service is better and why. Well,
there isn’t a clear-cut winner – it all just depends. RESTful web services and SOAP offer different
variations. For example, a REST web service is generally a better choice when time is a factor, but SOAP
wins out when building a service with multiple, non-CRUD methods. A company’s specific requirements
determine which type of web service a partner will implement unless already decided by the WS
provider.

Then there are times when both options are the right answer. That’s the case for two of the world’s
biggest e-commerce companies: Amazon and eBay use web services for both REST and SOAP. And as
more organizations become service-focused and explore more functionality, they will have no choice but
to support both types.

But what is the difference between REST web services and SOAP web services? Let’s break down each
option while exploring some pros and cons.

RESTful Web Services

What is a RESTful web service? The acronym REST, or sometimes ReST, stands for Representational
State Transfer and is an architectural style, meaning each unique URL represents an individual object of
some sort. A REST web service uses HTTP and supports/repurposes several HTTP methods: GET, POST,
PUT or DELETE. It also offers simple CRUD-oriented services. Fun fact: The original RESTful architecture
was designed by one of the leading authors of HTTP, Roy Fielding.

            Pros: Lightweight, human readable, easier to build

            Cons: Point-to-point communication, lack of standards

SOAP Web Services

SOAP is defined as Simple Object Access Protocol. This web service protocol exchanges structured data
using XML and generally HTTP and SMTP for transmission. SOAP also uses WSDL (Web Services
Description Language) documents to distribute a web service description model. This describes how the
SOAP requests (client-side) and responses (server-side) must appear. Additionally, SOAP web Services
have standards for security and addressing.

            Pros: Usually easier to consume, more standards (WSDL, etc.), distributed computing

            Cons: Difficult set-up, more convoluted coding, harder to develop

API vs. Web Services

Web services and APIs are often mistaken for each other, which isn’t all that surprising since there is
some distinct common ground.

Most web services provide an API, which, with its set of commands and functions, is used to retrieve
data. Here’s one example: Twitter delivers an API that authorizes a developer access tweets from a
server and then collects data in JSON format.

But here’s something to keep in mind: All web services can be APIs, but not all APIs can be web services.
Now, if that syllogism makes your head spin, maybe these distinctions will clear up the API vs. web
services confusion:

Differences between APIs and Web Services


APIs can be hosted within an app or IIS (Internet Information Services), but a web service can only be
hosted on IIS.

Web services are not an open source and are used to understand JSON (JavaScript Object Notation) or
XML, whereas APIs are an open source and only used for XML.

API is a light-weight architecture (best for limited bandwidth devices (e.g. smartphone). Web services
are not lightweight architectures since they require SOAP to send and receive network data.

APIs can use any form of communication, but a Web service only uses SOAP, REST, and XML-RPC.

APIs support URL, request/response headers, caching, versioning, content formats. Web services only
support HTTP.

 Similarities between APIs and Web Services

Both are accessed through HTTP/HTTPS to enable communication between services providers and
customers.

Both call a function, process data, and receive a response

Source: What Are Web Services? Easy to Learn Concepts with Examples | Cleo

What is Web Service

A Web Service is can be defined by following ways:

It is a client-server application or application component for communication.

The method of communication between two devices over the network.

It is a software system for the interoperable machine to machine communication.

It is a collection of standards or protocols for exchanging information between two devices or


application.

Let's understand it by the figure given below:


As you can see in the figure, Java, .net, and PHP applications can communicate with other applications
through web service over the network. For example, the Java application can interact with Java, .Net,
and PHP applications. So web service is a language independent way of communication.

Types of Web Services

There are mainly two types of web services.

SOAP web services.

RESTful web services.


Web Service Features

XML-Based

Web services use XML at data description and data transportation layers. Using XML exclude any
networking, operating system, or platform binding. Web services-based operation is extremely
interoperable at their core level.

Loosely Coupled

A client of a web service is not fixed to the web service directly. The web service interface can support
innovation over time without negotiating the client's ability to communicate with the service. A tightly
coupled system means that the client and server logic are closely tied to one another, indicating that if
one interface changes, then another must be updated. Accepting a loosely coupled architecture tends to
make software systems more manageable and allows more straightforward integration between various
systems.

Coarse-Grained

Object-oriented technologies such as Java expose their functions through individual methods. A specific
process is too fine an operation to provide any suitable capability at a corporate level. Building a Java
program from scratch needed the creation of various fine-grained functions that are then collected into
a coarse-grained role that is consumed by either a client or another service.

Businesses and the interfaces that they prove should be coarse-grained. Web services technology
implement a natural method of defining coarse-grained services that approach the right amount of
business logic.

Ability to be Synchronous or Asynchronous

Synchronicity specifies the binding of the client to the execution of the function. In synchronous
invocations, the client blocks and delays in completing its service before continuing. Asynchronous
operations grant a client to invoke a task and then execute other functions.

Asynchronous clients fetch their result at a later point in time, while synchronous clients receive their
effect when the service has completed. Asynchronous capability is an essential method in enabling
loosely coupled systems.

Supports Remote Procedure Calls (RPCs)

Web services allow consumers to invoke procedures, functions, and methods on remote objects using
an XML-based protocol. Remote systems expose input and output framework that a web service must
support.

Component development through Enterprise JavaBeans (EJBs) and .NET Components has more become
a part of architectures and enterprise deployments over a previous couple of years. Both technologies
are assigned and accessible through a variety of RPC mechanisms.

A web function supports RPC by providing services of its own, equivalent to those of a traditional role, or
by translating incoming invocations into an invocation of an EJB or a .NET component.
Supports Document Exchange

One of the essential benefits of XML is its generic way of representing not only data but also complex
documents. These documents can be as simple as describing a current address, or they can be as
involved as defining an entire book or Request for Quotation (RFQ). Web services support the
transparent transfer of documents to facilitate business integration.

Source: What is web service - javatpoint

b. Distributed Computing Infrastructure

What is distributed computing?

The term “distributed computing” describes a digital infrastructure in which a network of


computers solves pending computational tasks. Despite being physically separated, these autonomous
computers work together closely in a process where the work is divvied up. The hardware being used is
secondary to the method here. In addition to high-performance computers and workstations used by
professionals, you can also integrate minicomputers and desktop computers used by private individuals.

Distributed hardware cannot use a shared memory due to being physically separated, so the
participating computers exchange messages and data (e.g. computation results) over a network.
This inter-machine communicationoccurs locally over an intranet (e.g. in a data center) or across the
country and world via the internet. Messages are transferred using internet protocols such
as TCP/IP and UDP.

In line with the principle of transparency, distributed computing strives to present itself externally as a
functional unit and to simplify the use of technology as much as possible. For example, users searching
for a product in the database of an online shop perceive the shopping experience as a single process and
do not have to deal with the modular system architecture being used.

In short, distributed computing is a combination of task distribution and coordinated interactions. The
goal is to make task management as efficient as possible and to find practical flexible solutions.

How does distributed computing work?

In distributed computing, a computation starts with a special problem-solving strategy.A single problem


is divided up and each part is processed by one of the computing units. Distributed applications running
on all the machines in the computer network handle the operational execution.

Distributed applications often use a client-server architecture. Clients and servers share the work and
cover certain application functions with the software installed on them. A product search is carried out
using the following steps: The client acts as an input instance and a user interface that receives the user
request and processes it so that it can be sent on to a server. The  remote server then carries out the
main part of the search function and searches a database. The search results are prepared on the
server-side to be sent back to the client and are communicated to the client over the network. In the
end, the results are displayed on the user’s screen.
Middleware services are often integrated into distributed processes.Acting as a special software layer,
middleware defines the (logical) interaction patterns between partners and ensures communication,
and optimal integration in distributed systems. It provides interfaces and services that bridge gaps
between different applications and enables and monitors their communication (e.g. through
communication controllers). For operational implementation, middleware provides a proven method for
cross-device inter-process communication called remote procedure call (RPC) which is frequently used
in client-server architecture for product searches involving database queries.

This integration function, which is in line with the transparency principle, can also be viewed as
a translation task. Technically heterogeneous application systems and platforms normally cannot
communicate with one another. Middleware helps them to “speak one language” and work together
productively. In addition to cross-device and cross-platform interaction, middleware also handles other
tasks like data management. It controls distributed applications’ access to functions and processes of
operating systems that are available locally on the connected computer.

Source: Distributed computing – functions, advantages, types, and applications - IONOS

How a Distributed System Works

Hardware and software architectures are used to maintain a distributed system. Everything must be
interconnected—CPUs via the network and processes via the communication system.

Types of distributed systems

Distributed systems generally fall into one of four different basic architecture models:

Client-server—Clients contact the server for data, then format it and display it to the end-user. The end-
user can also make a change from the client-side and commit it back to the server to make it
permanent.

Three-tier—Information about the client is stored in a middle tier rather than on the client to simplify
application deployment. This architecture model is most common for web applications.

n-tier—Generally used when an application or server needs to forward requests to additional enterprise
services on the network.

Peer-to-peer—There are no additional machines used to provide services or manage resources.


Responsibilities are uniformly distributed among machines in the system, known as peers, which can
serve as either client or server.

Example of a Distributed System

Distributed systems have endless use cases, a few being electronic banking systems, massive multiplayer
online games, and sensor networks.

StackPath utilizes a particularly large distributed system to power its content delivery network service.
Every one of our points of presence (PoPs) has nodes that form a worldwide distributed system. And to
provide top notch content delivery, StackPath stores the most recently and frequently requested
content in edge locations closest to the location it is being used.
Distributed systems at the edge

With StackPath’s edge compute services, virtual machines, and containers, users can create their own
distributed systems. By interconnecting VMs and containers, while also leveraging the speed and agility
that comes with edge computing, your system can handle thousands of simultaneous requests at
lightning-fast speed.

Source: What is a Distributed System? How a Distributed System Works (stackpath.com)

The availability of large quantities of processors is a crucial enabler of many-task computing. Voluntary
computing systems have proven that it is possible to build computing platforms with millions of nodes to
support the execution of embarrassingly parallel applications. These systems, however, lack the
flexibility of more traditional grid infrastructures. On the other hand, flexible infrastructures currently
available can gather only dozens of thousands nodes. We propose a novel architecture for generic
Distributed Computing Infrastructures (DCI) that can be instantiated on demand to be, at the same time,
flexible and highly-scalable. Bringing the scalability from voluntary computing, the flexibility from grid
computing and the elasticity from cloud computing in a single arrangement, our proposal allows for fast
setup, fast initialization and fast dismantle of customized DCI supported by both dedicated and shared
underlying infrastructures. Our approach leverages broadcast communication as an efficient mechanism
to enable aggregation of geographically distributed computing resources, including millions of non-
traditional processing devices such as PDA, mobile phones and Digital TV receivers, using both
opportunistic and non-opportunistic models. We show the feasibility of the proposed architecture by
implementing it atop a digital television system. We also assess the performance of such system and
show that it can be used to execute several classes of many-tasks computing applications with very high
efficiency, substantially decreasing their response time.

Source: (PDF) OddCI: On-demand distributed computing infrastructure (researchgate.net)

c. XML

XML (Extensible Markup Language) is a markup language similar to HTML, but without predefined tags
to use. Instead, you define your own tags designed specifically for your needs. This is a powerful way to
store data in a format that can be stored, searched, and shared. Most importantly, since the
fundamental format of XML is standardized, if you share or transmit XML across systems or platforms,
either locally or over the internet, the recipient can still parse the data due to the standardized XML
syntax.

Source: XML introduction - XML: Extensible Markup Language | MDN (mozilla.org)

XML is a software- and hardware-independent tool for storing and transporting data.

What is XML?

XML stands for eXtensible Markup Language

XML is a markup language much like HTML


XML was designed to store and transport data

XML was designed to be self-descriptive

XML is a W3C Recommendation

Source: XML Introduction (w3schools.com)

What is XML (Extensible Markup Language)?

XML (Extensible Markup Language) is used to describe data. The XML standard is a flexible way to create
information formats and electronically share structured data via the public internet, as well as via
corporate networks.

XML is a markup language based on Standard Generalized Markup Language (SGML) used for defining
markup languages.

XML's primary function is to create formats for data that is used to encode information for
documentation, database records, transactions and many other types of data. XML data may be used for
creating different content types that are generated by building dissimilar types of content -- including
web, print and mobile content -- that are based on the XML data.

Like Hypertext Markup Language (HTML), which is also based on the SGML standard, XML documents
are stored as American Standard Code for Information Interchange (ASCII) files and can be edited using
any text editor.

What is XML used for?

XML's primary function is to provide a "simple text-based format for representing structured
information," according to the World Wide Web Consortium (W3C), the standards body for the web,
including for the following:

underlying data formats for applications such as those in Microsoft Office;

technical documentation;

configuration options for application software;

books;

transactions; and

invoices.

XML enables sharing of structured information among and between the following:

programs and programs;

programs and people; and

locally and across networks.


W3C defines the XML standard and recommends its use for web content. While XML and HTML are both
based on the SGML platform, W3C has also defined the XHTML and XHTLM5 document formats that
mirror, respectively, the HTML and HTML5 standards for web content.

How does XML work?

XML works by providing a predictable data format. XML is strict on formatting; if the formatting is off,
programs that process or display the encoded data will return an error.

For an XML document to be considered well-formed -- that is, conforming to XML syntax and able to be


read and understood by an XML parser -- it must be valid XML code. All XML documents consist of
elements; an element acts as a container for data. The beginning and end of an element are identified
by opening and closing tags, with other elements or plain data within.

Source: What is XML (Extensible Markup Language)? (techtarget.com)

2. Write down at least 10 examples of web services and its function


1. Apache Axis - WS-ReliableMessaging, WS-Coordination, WS-Security, WS-AtomicTransaction, WS-
Addressing
2. Apache CXF -WS-ReliableMessaging, WS-Security, WS-Addressing, MTOM, WS-Policy, WS-
SecureConversation, WS-SecurityPolicy, WS-Trust
3. CodeIgniter - An open source MVC web application framework
4. gSOAP- WS-Addressing, WS-Discovery, WS-Policy, WS-ReliableMessaging, WS-Security, WS-
SecurityPolicy
5. Java Web Services Development Pack - WS-Addressing, WS-Security
6. Jello Framework - End-to-End Java framework for Google App Engine including comprehensive Data
Authorization model, a powerful RESTful engine, and out-of-the-box UI views.
7. Jersey -Jersey is the reference implementation for the JAX-RS specification by Oracle (Originally Sun)
8. .NET Framework - WS-Addressing, WS-MetadataExchange, WS-Security, WS-Policy, WS-
SecurityPolicy, WS-Trust, WS-SecureConversation, WS-ReliableMessaging, WS-Coordination, WS-
AtomicTransactio
9. Metro -WS-Addressing, WS-ReliableMessaging, WS-Coordination, WS-AtomicTransaction, WS-
Security, WS-Security Policy, WS-Trust, WS-SecureConversation, WS-Policy, WS-MetadataExchange
10. Windows Communication Foundation - WS-Addressing, WS-MetadataExchange, WS-Security,
WS-Policy, WS-SecurityPolicy, WS-Trust, WS-SecureConversation, WS-ReliableMessaging, WS-
Coordination, WS-AtomicTransaction,WS-Discovery

3. How does these 3 topics become related to each other?

The majority of online services interact via XML. A client provides an XML message to the web
service containing a request, and the web service answers with an XML message with the
operation's results. The majority of the time, these XML communications are structured using
SOAP syntax. Web services are critical in distributed computing for establishing heterogeneous
applications and integrating existing programs. Web services technology revolutionized the
computing situations and architectures. It encourages the use of service-oriented architecture
(SOA).

You might also like