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

What is the difference between load balancing and fault tolerance?

Fault tolerance and load balancing middleware can increase the quality of service
seen by the users of distributed systems. Fault tolerance makes the applications
more robust, available and reliable, while load balancing
provides better scalability, response time and throughput.

Throughput is the amount of a product or service that a company can produce and deliver

to a client within a specified period of time. The term is often used in the context of a

company's rate of production or the speed at which something is processed.

Provide load balancing. Each domain can be configured with one primary server and multiple secondary

servers. The primary server allows read and write operations, while secondary servers only support read

operations. Only one primary server can be running for each administration domain. Multiple secondary

servers are allowed, but each must be on a different machine than the primary server. Secondary

servers are defined using TIBCO Domain Utility

The FT Group Settings panel displays only if the TIBCO BusinessWorks process you have selected has

been added to at least two (different) machines. If your domain includes components that were

deployed as part of a fault-tolerant group, the display includes the information about the group

Which API should you choose for


your project?
For the most part, when it comes to APIs for web services, developers
tend toward a RESTful architecture unless the SOAP path is clearly a
better choice, say for an enterprise app that’s backed by more resources,
needs super-tight security, and has more requirements.

Additional advantages in choosing the REST API include:


 Lightweight communication using HTTP and small payloads, for example,
in the JSON data format
 Fewer requirements for external libraries on the client-side
 Enables the use of effective caching
There are, however, cases when SOAP might be your first choice,
including:

 Enterprise-level requirements on security


 Need to integrate with legacy systems already using SOAP
 Requirements on ACID transactions or the use of the built-in retry
mechanisms SOAP provides
No matter which technology you use, the most important part of building a
good API is designing it using best practices to make it easy to use and
understand for clients. A well-designed API can greatly increase your
delivery speed and future-proof your technology stack.

What is SOAP contract?


SOAP is a messaging protocol. Messages (requests and responses) are XML
documents over HTTP. The XML contract is defined by the WSDL (Web Services
Description Language). It provides a set of rules to define the messages, bindings,
operations, and location of the service.

Microservices, also known as microservices architecture, refers to a software development


method that structures an application as a combined collection of services. Essentially, this
suite of applications is deployed as a complete application in its own right and these
services all work together to make up the entire application. Microservices all follow these
patterns: They are organized around business capabilities, they are loosely-coupled, they
are independently deployable, and they are testable. Because they are loosely-coupled,
microservices can then be built, deployed, and scaled independently.

Each service communicates with other services through standardized application


programming interfaces (APIs), enabling the services to be written in different languages or
on different technologies. This differs completely from systems built as monolithic structures
where services are inextricably interlinked and can only be scaled together.

As each service has a limited, generally singular, functionality, it is much smaller in both
size and complexity. The term microservice comes from this discrete functionality design.

By decomposing the application into discrete services that implement specific business
functions, microservices give modern developers a way to design highly scalable, flexible
applications.

Why Microservices?

Microservices have risen in popularity because their modular characteristics lead to


flexibility, scalability, and reduced development effort. Their deployment flexibility, and the
rise of cloud-native serverless and function-as-a-service deployment options (such as AWS
Lambda and Microsoft Azure Cloud Functions), have created the perfect environment for
microservices to flourish in today's IT landscape. These cloud platforms enable
microservices and functions to be scaled from inactivity to high volume and back again
while customers pay only for the compute capacity they use.

As businesses are continuously looking to be more agile, reduce bottlenecks, and improve
application delivery times, microservices architecture continues to rise in popularity.

In the past, companies developed specialized enterprise applications that had three main
components:

 A client-facing interface, usually HTML pages running on a user’s machine


 A database, typically many tables in a relational database management system
 A server-side application that handled all requests such as data retrieval, HTTP
requests, and populating HTML browsers.

For the user, everything seemed to run through a single point of contact. Development,
testing, and deployment used a deployment pipeline, and you could horizontally scale up by
running multiple instances.

However, they were quite costly to develop, any changes required a full system redesign,
rebuild and redeployment, it was hard to keep a clean, modular structure as the
organization grew and changed, and scaling up required the full application to be retested,
scaled and redeployed for any change no matter how small the revision. All of these issues
led to an expensive, non-agile system that the rapidly-changing technological landscape
quickly outgrew.

One way to think of these traditional monolithic systems are as ready-made dollhouses.
While you can edit the structure or the layout, it is not easy, and you are limited in the
overall size unless you buy another dollhouse and attach it to the legacy dollhouse.

With microservices, the entire application does not need to be redeployed, just the services
that need it. Instead of a singular structural entity, like a dollhouse, think of microservices
as a pile of Lego bricks. Technically, they’re all independent, but when put together, they
form an entire structural application. If you want to add a compartment or terminate
something, it can easily be removed, added, scaled up and edited to suit changing needs
quickly and efficiently without having to shut down the entire application.

Benefits of a Microservices Architecture

There are a number of significant benefits for businesses looking to adopt microservices and
integrate them into their offerings, which will be explored in greater detail below.

Faster Time to Market

Being able to add and remove functions quickly means that the business can become
incredibly agile. Adding new functionality can be done at-speed, keeping up with business
growth. Unlike traditional monolithic software, changes to code in one part of the system
will not affect other modules, so there is no need for extra testing, shutting down the entire
application, or having to redeploy everything.

Higher Functionality and Lower Operational Costs

Because the modules in microservices are all separate, there is a far less risk of potential
bugs or errors causing the entire application to fail. Unlike traditional software systems,
where a change in one part of the functionality may cause a flaw or bug in another part,
isolation and loose-coupling enables the implementation of compartmentalized upgrades
and enhancements. Microservices also allow for the use of cloud-native function-as-a-
service deployment options, which can significantly reduce operating costs.

Easily Scalable Applications

Scaling decisions for micro services are made at a granular level, allowing for the most
efficient decisions for system optimization. By adopting microservices, when the time comes
to scale up, organizations are able to make the choices that are best for them, right in the
moment.

Continuous Integration

Microservices are developed using individual continuous development and deployment


streams. These streams can be sustained so there is no disruption in another service when
one team implements a change based on customer feedback, which means higher end user
satisfaction.

Dedicated Developer Teams

Unlike monolithic systems, which cannot sustain multiple development teams, microservices
have the ability to support teams dedicated to certain, specific parts of the system. Because
the software modules do not interact with each other, there’s no risk of bugs or cross-team
overlap of work, so microservices teams can have specialized software developers, as well
as teams working across different timeframes or geographic locations.

All of these benefits add up to perhaps the most significant one: business agility. Small and
simple changes can be made quickly, allowing for experimentation of processes. The ability
to take a huge leap forward in business, or at least fail fast and react in real-time, becomes
possible with microservices. In addition, studies have found that within months of deploying
microservices architecture, a third of organizations start to achieve advantages. That means
timeframes for development are decreased, and with less errors in code and increased
capabilities, the positive impact on business operations can be felt almost immediately.

Characteristics of Microservices

 Loosely-coupled
 Independently deployable components
 Automated deployment
 Decentralized data and language control
 Highly-maintainable
 Easily-testable
 Organized around the needs and capabilities of a business or organization
 Each service tends to be owned by a small team

Challenges with Microservices

While microservices do solve a number of problems, there are still some difficulties and
issues one might encounter with the architecture, as well as with initial adoption.

Decentralized Data Management

Unlike monolithic systems, microservices usually do not rely on one database that acts as a
single source of truth of your data for the company. Customer data might be in one place,
while vendor data is in another. Maybe inventory information is stored with the online sales
portal, but the ordering system is kept in a separate database. This can create issues with
your data quality and consistency, unless you make a specific point of planning for this.

Corporate Culture and Internal Organization Challenges

It can be difficult to get companies to accept and adapt to new software systems. Often
management may have a reluctance to relinquish control, or a department will be defensive
of their silos. Whatever the reason for the pushback from teams having to accept new
systems, the bottom line is that sometimes, people just don’t like change.

To get microservices adopted organization-wide, it’s pivotal to recognize that introducing


new systems and processes can be disruptive, but it’s also just as important to remember
that the benefits are worth it. When beginning the transition to microservices, it’s best to
involve the affected teams when planning the architecture. Have a plan to evaluate the
solutions that are available, and ensure the best fit is chosen for the business requirements.

Microservices Can Lead to Complexity in Your Architecture

While the individual services that make up microservices can be small and simple by
themselves, when combined, the overall application can end up having a lot of moving parts
that can become hard to manage. With hundreds or thousands of interconnections,
microservices can quickly increase in complexity.
It is recommended that when implementing microservices, a significant amount of
forethought and planning go into the design and basic implementation. Many complexities
can be avoided with a good basic architecture design that allows for growth and change in
the future.

Examples of Microservices Architecture Use Cases

Adopt cloud-native deployment options: leverage serverless and function-as-a-service for


more efficient and scalable operations.

Migrate functionality from legacy applications: decompose services from large monolithic
applications so they can be independently maintained and scaled.

Leverage modern application architecture: embrace event-driven, loosely-coupled


microservice application patterns, with the ability to leverage different programming
languages depending on use case needs. For example, go for computationally heavy
functions, Node.js for quick web apps, etc.

What Is DevOps and Why Is It Often Associated With Microservices?

DevOps can be explained as a tool-centric ideology. Essentially, it’s a set of practices that
combines tools and technology to simplify the work that needs to be done by developers.
Alongside improved tooling, cooperation between the operations and development teams
helps drive projects to completion faster and more efficiently.

For example, let’s say you are building an application that lets users check their account
balances. Oftentimes in the past, the app development cycle had developers building the
app and then handing it off to the operations team without responsibility for the end result.
It was the operations team’s job to make the app work. In a more
cohesive DevOps environment, both sides work together. A developer owns the app’s
lifecycle from start to finish, which means being on-call during the release. Consistent
communication between the two groups is necessary to make sure everything is successful
and to get the full benefits of DevOps, such as speed to market, easier development cycle,
and more accountability.

The new DevOps workflow model creates a major cultural shift. Just using new tools does
not make a DevOps plan successful. If anything new tools could inhibit success if they cause
you to believe without doubt that everything will implement appropriately.

Due to the nature of microservices, having strong DevOps processes is often necessary for
deployment. The increased use of tooling and stronger shared practices alleviates teams
from being overwhelmed by all the small moving parts. You reduce the disruption or burden
of this shift while continuing to receive the benefits.
Try TIBCO Cloud Integration - Free Trial

Let TIBCO Cloud Integration empower your business with easier and faster API-led
integration. It’s integration—simplified.

FREE TRIAL

The Future: Event-Driven Microservices, Serverless Computing, and FaaS

When people first start experimenting with microservices, they often default to using
familiar techniques, such as RESTful APIs. REST operates on a request-response type of
communication. The problem with this synchronous approach is that since you have to wait
for a response, the services become dependent on each other. This means that if one
service is running slower or doesn’t respond, the service that called it will run slower or fail.
This coupling can mean losing some of the benefits of a microservices architecture, creating
a more interdependent structure akin to a services-oriented architecture (SOA) style.

If you design your services using beyond-REST or an event-driven model, you can ensure
that parts of your application continue to work, while other parts may not be involved, as
opposed to the entire application becoming unresponsive. Netflix functions as a perfect
example of this. On occasion, you might notice that the “continue watching” button doesn’t
appear. This is because that specific service isn’t available. However, that doesn’t mean all
of Netflix stops. Users can still browse for shows and watch previews, so other aspects of
the Netflix service are still functional and available for use, even though one service may
not be.

Developers that fully embrace a microservices approach realize that true scalability is
enabled with loose coupling and event-driven architecture. A service can be asynchronous,
performing an action, broadcasting a message, and continuing on with its primary function
without having to wait for a response from another service.

How Do Microservices Work?

Microservices are not a new idea. More than three decades ago, Unix developed an SOA that
used a similar design principle, but was costly to implement and failed too often to be
considered a good option for businesses. Twenty years later, microservices arrived with
much better consistency across services and the adoption has since been far more
successful.

As to how microservices actually work, first, software functionality is broken down into
small, isolated modules. These modules have defined, stand-alone tasks. Then, the system
works by linking these small pieces of software together using application programming
interfaces (APIs).

APIs are segments of code that get two unrelated programs to ‘talk’ back-and-forth to each
other. One example of APIs in action would be an app or website that has Google Maps
embedded on it. An API sits between Google Maps and the app sending information back
and forth, allowing users to see their map in real time, give the driver instructions, and also
alert your trusted contact to your location. While Google Maps remains a separate entity,
the API allows for communication back-and-forth between the map and the app. So rather
than a prefab dollhouse, where everything is planned, rigid, and hard to change, you have
those useful little Lego pieces that click together using APIs as connectors. Standardized
technology platforms can be constrictive, but not every problem is a nail, nor every solution
a hammer. Microservices allow the right tool for the job.

There are certain benefits to microservices, and companies that have successfully adopted
them as an architecture model have reaped the benefits of faster, more agile business IT
structures. However, some organizations have found the system to be a killer for
productivity and a burden to operate. The difference between success and failure lies in two
parts: the culture of the organization and its willingness to accept and use the
microservices, and the planning and forethought put into the map of the microservices.

Often, the true benefits or costs of a new system are not realised for many years. Monolithic
architecture will sometimes already have been outgrown or have started decaying within
those years. There is less opportunity for that decay within microservices, and patching up a
problem is a much simpler matter.

One solution for a variety of these potential issues is to start with a monolith. This allows for
a base software to bolt other things onto as you scale up, making a kind of dollhouse with
Lego extensions. While this may not be the most elegant approach, it is a way for a
business to proceed, especially with an existing database or program at the heart of
operations.

What is Service Oriented Architecture (SOA)?

SOA, or service-oriented architecture, defines a way to make software components


reusable via service interfaces. These interfaces utilize common communication
standards in such a way that they can be rapidly incorporated into new
applications without having to perform deep integration each time.

The Service Oriented Architecture is an architectural design which includes collection of


services in a network which communicate with each other. The complication of each service
is not noticeable to other service. The service is a kind of operation which is well defined,
self contained that provides separate functionality such as checking customer account
details, printing bank statements etc and does not depend on the sate of other services.
.

Why to use SOA?

 SOA is widely used in market which responds quickly and makes effective changes
according to market situations.
 The SOA keep secret the implementation details of the subsystems.
 It allows interaction of new channels with customers, partners and suppliers.
 It authorizes the companies to select software or hardware of their choice as it acts
as platform independence.

Features

 SOA uses interfaces which solves the difficult integration problems in large systems.
 SOA communicates customers, providers and suppliers with messages by using the
XML schema.
 It uses the message monitoring to improve the performance measurement and
detects the security attacks.
 As it reuses the service, there will be lower software development and management
costs.

Advantages

 SOA allows reuse the service of an existing system alternately building the new
system.
 It allows plugging in new services or upgrading existing services to place the new
business requirements.
 It can enhance the performance, functionality of a service and easily makes the
system upgrade.
 SOA has capability to adjust or modify the different external environments and large
applications can be managed easily.
 The companies can develop applications without replacing the existing applications.
 It provides reliable applications in which you can test and debug the independent
services easily as compared to large number of code.
Routers (Flow Controls in Anypoint Studio) route messages to various destinations in a
Mule flow. Some routers incorporate logic to analyze and possibly transform messages
before routing takes place. For example, various flow controls can: ... Broadcast the same
message to multiple processors.

A messaging bridge acts as a direct conduit between an inbound endpoint and an


outbound endpoint. It is a neutral component as it doesn't apply any business logic on the
messages that flow through it. This said, as we will see later on, a bridge can perform
protocol adaptation and data transformation.

Software as a service (SaaS) is a software distribution model in which a cloud provider


hosts applications and makes them available to end users over the internet. In this
model, an independent software vendor (ISV) may contract a third-party cloud provider to
host the application.

An Enterprise Service Bus (ESB) is a type of software platform known as middleware,


which works behind the scenes to aid application-to-application communication.
Think of an ESB as a “bus” that picks up information from one system and delivers it to
another.

The Enterprise Service Bus (ESB) is a software architecture which connects all the
services together over a bus like infrastructure. It acts as communication center in the
SOA by allowing linking multiple systems, applications and data and connects multiple
systems with no disruption.

) What is API?

API is the acronym for Application Programming Interface. It is a software interface that
allows two applications to interact with each other without any user intervention.

APIs provides product or service to communicate with other products and services without
having to know how they’re implemented.

) What are the features of API?

Here are some essential features of API:

 Efficiency
 Wider reach
 Customizable
 Personalization
 Data ownership
 Easy integration with GUI
 Time effective

Language-independent

40) What is caching?

The cache concept is a way of storing the copy of the file in the cache, or any temporary
storage location to access it quickly.

5) Name different types of web services

Different types of web services: 1) RESTful web services and 2) SOAP web services.

36) What are Web Services?


Web services are a standardized way or medium to propagate communication between the
client and server applications on the World Wide Web.

37) What is Restful Web Service?

Restful Web Service is a light-weight, maintainable, and scalable service that is built on the
REST architecture. Restful Web Service, expose API from your application in a secure,
uniform, stateless manner to the calling client. The calling client can perform predefined
operations using the Restful service.

38) Mention the difference between SOAP and REST

The difference between SOAP and REST is:

SOAP REST
SOAP stands for Simple Object Access Protocol REST stands for Representational State Transfer
SOAP cannot make use of REST since SOAP is a REST can make use of SOAP as the underlying protoc
protocol, and REST is an architectural pattern. services because, in the end, it is just an architectura
SOAP can only work with XML format. As seen from REST offers various data formats such as JSON, plain
SOAP messages, all data passed is in XML format. etc. But the most preferred format for transferring da
39) What is RAML?

The full form of RAML is the RESTful API Modeling Language. It is a YAML-based language
that describes RESTful APIs.

RAML is best for the information needed to describe RESTful APIs. It is similar to WSDL
(Web Services Description Language).

RAML contains request/response schema, URI parameter, endpoint URL, HTTP methods, and
query.

What are the advantages of SOAP?

The advantages of SOAP are:

 SOAP is the perfect medium that is developed for web service to talk with client
applications.
 SOAP is a light-weight protocol which can be used for data interchange between
applications.
 SOAP protocol can work any programming language based applications on Windows
and Linux platforms.
 It does not require customization to run the web services built on the SOAP protocol
to work on the WWW.

Related Articles

Related Articles

 Difference between Restless Webservice and Restful Webservice


 Comparison between GraphQL & RESTful Architecture
 Website Blocker Using Python
 Send SMS updates to mobile phone using python
 Python | Send SMS using Twilio
 How to send SMS alert using Python and MSG91 API
 Send Text messages to any mobile number using Fast2SMS API in Python
 Youtube Data API Subscription | Set-3
 Youtube Data API Subscription | Set-1
 Python: Convert Speech to text and text to Speech
 Speech Recognition in Python using Google Speech API
 Convert Text to Speech in Python
 Python Text To Speech | pyttsx module
 Text-To-Speech changing voice in Python
 Personal Voice Assistant in Python
 Voice Assistant using python
 Build a Virtual Assistant Using Python
 Python | Create a simple assistant using Wolfram Alpha API.
 Junk File Organizer in Python
 Desktop Notifier in Python
 Python Desktop News Notifier in 20 lines
 Morse Code Translator In Python
 Simple Chat Room using Python
 Socket Programming in Python
 Socket Programming with Multi-threading in Python
 Installation of Node.js on Linux
 Top 10 Projects For Beginners To Practice HTML and CSS Skills
 How to insert spaces/tabs in text using HTML/CSS?
 JavaScript Number toString() Method
 How to calculate the number of days between two dates in javascript?
Difference between Restless Webservice and Restful Webservice
 Difficulty Level : Basic
 Last Updated : 03 Jun, 2020
Here, the two terms are mostly similar to each other but they have some significant
differences. But before that, we need to understand what is REST. REST stands
for REpresentational State Transfer. It was introduced by Roy Fielding the man behind
HTTP (HyperText Transfer Protocol). He made REST so that we can make the best use of
HTTP. It performs actions using based on transfer protocols such as HTTP-post, get, put,
delete.
REST is also termed as an Architectural Style for web services and has mainly three
components –
 Data exchange format(JSON popularly)
 Transport (HTTP only)
 Service Definition (WADL/Swagger/..)
Rest Services also have the following principles:
 It does not contain any inbuilt encryption.
 It does not contain session and it is stateless.
 It only uses one protocol that is HTTP.
 It returns anything in form of JSON.
 Capable to perform CRUD operations using Hyper Text Transfer Protocol.

Restless WebService: It is a web service that does not obey REST architecture. It uses
an XML document to send and receive messages. It also uses SOAP that stands for
Simple Object Access Protocol. This service is useful for applications that are to be made
secure. It is easy to build a Restless web-service.

Restfull WebService: It is a web service that uses REST architecture. It also uses
request and response type requests with REST principles. This service is useful for
applications that have to communicate with different services, through API calls. These
applications are built for performing CRUD operations. It is a less secure way to built
applications using this service. Restful web service provides interconnecting with
different computers.

Difference between Restless and Restful webservices:


Basis terms Restless Web Service Restlful Web Service

It is based on the principles of REST


It is not based on the architecture and is integrable with other
Architecture principles of REST. computer systems on the network.

It does not uses REST


REST principles principles. It uses REST principles.

Communication It uses SOAP services. It uses REST services.

It supports only XML


Data Formats format. It supports JSON, HTML, etc format.

These services uses


service interface to These services uses URL to show
Functions show business logic. business logic.

Usability and It is less usable and It is more usable and flexible for the
Flexibility flexible for the users. users.

Security Aspects More secure as it Less secure as it uses the security layers
to communication protocols.
Basis terms Restless Web Service Restlful Web Service

designs it’s own security


layer.

It uses a small
Bandwidth bandwidth. It use

Scalability is the measure of a system's ability to increase or decrease in


performance and cost in response to changes in application and system processing
demands. ... Enterprises that are growing rapidly should pay special attention to scalability
when evaluating hardware and software.

At MuleSoft, we define microservices as an architectural pattern for creating


applications. Under this pattern, applications are structured as a collection of loosely
coupled services. This is distinct from traditional applications, or monoliths, that are
structured as single self-contained artifacts.

“What is the difference between an API and a microservice?”

I was recently asked this question by a senior banking executive. She went on to explain
that some of her stakeholders were struggling with the difference, and asked if MuleSoft
could help. Part of my job as a Client Architect is that of a translator––to help business folks
make sense of technology mumbo jumbo. I need to help people understand not just what
this tech jargon means, but how it might bring value to their business. So naturally, I was
up to the task. Answering this question also helped place Anypoint Platform in this overall
context––a context worthy of sharing in this post.

What are microservices?

At MuleSoft, we define microservices as an architectural pattern for creating applications.


Under this pattern, applications are structured as a collection of loosely coupled services.
This is distinct from traditional applications, or monoliths, that are structured as single self-
contained artifacts. Think of a microservice-based application as one built from Lego bricks,
and a monolith as one built from a single slab of concrete.

In its purest form, an individual microservice encapsulates some atomic business function,
such as “CreateOrder.” This function could be implemented using any programming
language (.NET, Java, Node.js). Individual microservices can be re-used across different
areas of the enterprise, or even externally by partners and customers.

A full microservices architecture can potentially encompass thousands of individual


microservices. In order to support the management of a large number of microservices, a
fully-formed microservices architecture will require support from other technologies and
processes. This includes cross-cutting services, APIs, CI/CD, and containerization––
technologies that are all considered integral to a microservices architecture.

Benefits of microservices

The primary benefit of microservices is that they have the potential to increase agility and
productivity for implementing enterprises. New business services are developed through a
combination of new microservices and the reuse of existing microservices. The resulting
new service can be rapidly deployed and tested in an automated cycle that will speed time
to market for new business initiatives.

Rapid deployment means that business stakeholders can verify in real-time that an
application meets its intended business objective. Once business objectives have been
verified, then security, resiliency, and scalability can be dynamically configured at the
microservice-level. This encourages operational flexibility and infrastructure optimization.

A fundamental difference between Kubernetes and Docker is that Kubernetes is meant to


run across a cluster while Docker runs on a single node. Kubernetes is more extensive
than Docker Swarm and is meant to coordinate clusters of nodes at scale in production in an
efficient manner.

Kubernetes is an open-source container orchestration platform that enables the


operation of an elastic web server framework for cloud applications. Kubernetes can
support data center outsourcing to public cloud service providers or can be used for web
hosting at scale.

. Kubernetes can then allow you to automate container provisioning, networking, load-
balancing, security and scaling across all these nodes from a single command line or
dashboard.

Docker is a very popular and powerful open-source containerization platform that is used
for building, deploying, and running applications. Docker allows you to decouple the
application/software from the underlying infrastructure.
A container is a standard unit of software bundled with dependencies so that applications
can be deployed fast and reliably b/w different computing platforms.

 Docker container doesn’t require the installation of a separate operating system. Docker
just relies or makes use of the kernel’s resources and its functionality to allocate them for
the CPU and memory it relies on the kernel’s functionality and uses resource isolation for
CPU and memory, and separate namespaces to isolate the application’s view of the OS
(operating system).
 All these aspects form the core part of DevOps which becomes all the more
important for any developer to know these in order to improve productivity, fasten
the development along with keeping in mind the factors of application scalability
and more efficient resource management.
 Imagine containers as a very lightweight pre-installed box with all the packages,
dependencies, software required by your application, just deploy to production with
minimal configuration changes.
 Lots of companies like PayPal, Spotify, Uber, etc use Docker to simplify the
operations and to bring the infrastructure and security closer to make more secure
applications.
 Being portable, Containers can be deployed on multiple platforms like bare
instances, virtual machines, Kubernetes platform etc. as per requirements of scale
or desired platform.

an you tell something about docker container?


 In simplest terms, docker containers consist of applications and all their
dependencies.
 They share the kernel and system resources with other containers and run as
isolated systems in the host operating system.
 The main aim of docker containers is to get rid of the infrastructure dependency
while deploying and running applications. This means that any containerized
application can run on any platform irrespective of the infrastructure being used
beneath.
 Technically, they are just the runtime instances of docker images

What are docker images?

They are executable packages(bundled with application code & dependencies, software
packages, etc.) for the purpose of creating containers. Docker images can be deployed to
any docker environment and the containers can be spun up there to run the application

What is a DockerFile?
 It is a text file that has all commands which need to be run for building a given image.

What is docker image registry?


 A Docker image registry, in simple terms, is an area where the docker images are stored.
Instead of converting the applications to containers each and every time, a developer can
directly use the images stored in the registry.
 This image registry can either be public or private and Docker hub is the most popular and
famous public registry available.
Kubernetes is a distributed open-source technology which helps us in scheduling and
executing application container within and across clusters. A Kubernetes cluster consists of
two types of resources:

The Master => Coordinates all activities in the cluster, for example, => scheduling
applications, maintaining applications' state, scaling applications, and rolling out new
updates

Nodes => A node is an instance of an OS that serves as a worker machine in a


Kubernetes cluster.

Also, Node will have two components

 Kubelet => Agent for managing and communicating with the master
 Tool (Docker/containers) => Tools for running container operations

Kubernetes is a distributed open-source technology which helps us in scheduling and


executing application container within and across clusters. A Kubernetes cluster consists of
two types of resources:

The Master => Coordinates all activities in the cluster, for example, => scheduling
applications, maintaining applications' state, scaling applications, and rolling out new
updates

Nodes => A node is an instance of an OS that serves as a worker machine in a


Kubernetes cluster.

Also, Node will have two components

 Kubelet => Agent for managing and communicating with the master
 Tool (Docker/containers) => Tools for running container operations
A branch is a copy of a codeline, managed in a version control system (VCS). Branching
helps software development teams work in parallel. It separates out “in-progress work”
from tested and stable code. The codebase in a VCS is often referred to as the trunk,
baseline, master, or mainline.

TrustStore is used to store certificates from Certified Authorities (CA) that verify the
certificate presented by the server in an SSL connection. While Keystore is used to store
private key and identity certificates that a specific program should present to both
parties (server or client) for verification.

Mule supports many types of keystores, including:

o JCEKS
o PKCS12
o JKS
o Keystore and Truststore are both important and essential for communication with
an SSL Certificate. Both are very similar in terms of construct and structure, as
both are managed by a key tool command.
o Truststore is used for the storage of certificates from the trusted Certificate Authority
(CA), which is used in the verification of the certificate provided by the server in
an SSL connection. On the other hand, a Keystore is used to store the private key
and own identity certificate to be identified for verification.

Security Considerations for Keystore and Truststore


Keystores contain private keys, whereas Truststore do not. Security for Keystores is strict
and exacting. In particular –

 Hadoop SSL (Secure Sockets Layer) has a requirement that Truststores and the
Truststore password have to be stored in plaintext, in a configuration file that can be
read easily by everyone.
 Keystore and key passwords are stored in plaintext, in a file that is readable only by
members of the appropriate group.
 Since Truststore does not contain any private and sensitive information, only a single
Truststore for an entire cluster is sufficient.
 But it is essential information that the passwords for both Truststore and Keystore
should not be the same because the password for Truststore is stored in clear files
and is visible to all. If the same password is used for a Keystore, the security will be
vulnerable and can be attacked by malicious parties and hackers.

Creating Trusutstores
If one is using the default Truststore, he/she needs to add Certificate Authority (CA) to the
Truststore or delete them from Truststore. If you are creating a custom Truststore, you
must build the Truststore by importing trusted certificates into new Truststores. While
creating a Truststore, a password has to be created/selected, and they should be the same
for a given service.

The purpose of a Keystore is to protect privacy and integrity with the use of a password-
based algorithm. The keys are kept secret to keep them safe and protected from unwanted
third parties and can only be accessed by someone having the password.

What is SSL handshake and how it works?

SSL Certificate works on a TCP (Transmission Control Protocol) protocol to send data
over the internet. SSL follows a handshake process that sets up a secure connection
without disturbing customers' shopping experience. ... After this exchange, the server sends
a certificate (public key) to the client.
How does SSL handshake works step by step?

The Standard SSL Handshake

1. Client Hello. Information that the server needs to communicate with the client using SSL. ...
2. Decryption and Master Secret. Server uses its private key to decrypt the pre-master
secret. ...
3. Server Hello. ...
4. Encryption with Session Key. ...
5. Authentication and Pre-Master Secret.

OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 focuses on client
developer simplicity while providing specific authorization flows for web applications,
desktop applications, mobile phones, and living room devices. This specification and its
extensions are being developed within the IETF OAuth Working Group.

OAuth 2.0 Grant Types

OAuth 2.0 specifies the following grant type methods for requesting a token:
o AUTHORIZATION_CODE
o IMPLICIT
o RESOURCE_OWNER_PASSWORD_CREDENTIALS
o CLIENT_CREDENTIALS
Authorization Code Grant Type
The Authorization Code grant type is the most frequently used grant type and the
most secure.
To get a token using this grant type, the following information needs to be specified in the
HTTP request to the Provider:
o Client ID of the client application
o Client Secret of the client application
o Redirect URL as specified on the client application definition

implicit
The implicit grant type is not as secure as, but easier to use than the authorization code
grant type. Javascript clients and mobile applications often use this grant type. The
authorization server issues an access token directly and skips the step of issuing an
intermediate access code.
Resource Owner Password Credentials
the resource owner password credentials grant type is less secure than both the implicit and
the authorization code grant types. The client needs to handle the user’s credentials. This
requires that users have a high degree of trust in the client. This grant type is often used
when the consumer of the protected resource is a widget of the same service.
Client Credentials
The client credentials grant type is the least secure grant type. Use this grant type when the
client is the resource owner or an authorization has previously been arranged with the
authorization server. In this grant type, an access token is obtained if the client identifier
and the client secret are valid.
36) What are Web Services?

Web services are a standardized way or medium to propagate communication between the
client and server applications on the World Wide Web.

37) What is Restful Web Service?

Restful Web Service is a light-weight, maintainable, and scalable service that is built on the
REST architecture. Restful Web Service, expose API from your application in a secure,
uniform, stateless manner to the calling client. The calling client can perform predefined
operations using the Restful service.

OA is based on some key principles which are mentioned below

1. Standardized Service Contract – Services adhere to a service description. A


service must have some sort of description which describes what the service is
about. This makes it easier for client applications to understand what the service
does.

2. Loose Coupling – Less dependency on each other. This is one of the main
characteristics of web services which just states that there should be as less
dependency as possible between the web services and the client invoking the web
service. So if the service functionality changes at any point in time, it should not
break the client application or stop it from working.

3. Service Abstraction – Services hide the logic they encapsulate from the outside
world. The service should not expose how it executes its functionality; it should just
tell the client application on what it does and not on how it does it.

4. Service Reusability – Logic is divided into services with the intent of maximizing
reuse. In any development company re-usability is a big topic because obviously one
wouldn’t want to spend time and effort building the same code again and again
across multiple applications which require them. Hence, once the code for a web
service is written it should have the ability work with various application types.
What is JVM (Java Virtual Machine) with Architecture JAVA Programming Tutorial

5. Service Autonomy – Services should have control over the logic they encapsulate.
The service knows everything on what functionality it offers and hence should also
have complete control over the code it contains.

6. Service Statelessness – Ideally, services should be stateless. This means that


services should not withhold information from one state to the other. This would
need to be done from either the client application. An example can be an order
placed on a shopping site. Now you can have a web service which gives you the price
of a particular item. But if the items are added to a shopping cart and the web page
navigates to the page where you do the payment, the responsibility of the price of
the item to be transferred to the payment page should not be done by the web
service. Instead, it needs to be done by the web application.

7. Service Discoverability – Services can be discovered (usually in a service


registry). We have already seen this in the concept of the UDDI, which performs a
registry which can hold information about the web service.

8. Service Composability – Services break big problems into little problems. One
should never embed all functionality of an application into one single service but
instead, break the service down into modules each with a separate business
functionality.

9. Service Interoperability – Services should use standards that allow diverse


subscribers to use the service. In web services, standards as XML and
communication over HTTP is used to ensure it conforms to this principle.
10.

11. you're doing an update, the table could have been locked, leading to the timeout.

12. If you do a select on the same table (using BW), do you get a response or a timeout?

13. Do you have any concurrent writing access to that table that could lead to a lock?

14. You need to give a bit more detail on your process if you want us to help you.

Problem connecting to MySQL from Tibco BW 5.11.

Products Versions

TIBCO ActiveMatrix BusinessWorks

Not Applicable
Products Versions

Not Applicable

Not Applicable

Summary

Problem connecting to MySQL from Tibco BW 5.11.

Environment

Details

Details

Description:

MySQL connection fails with BW 5.11. With BW 5.11 it throws "JDBC Connection Login
TImed Out". The same worked fine with the previous version of Tibco Active Matrix BW
5.7. The following URL format works with BW 5.7 but fails with BW 5.11 .
jdbc:tibcosoftwareinc:sqlserver://<server>:51401;databaseName=<dbname>
Test connection throws the following error.
"BW-JDBC-100034 "Configuration Test Failed. Exception
[java.sql.SQLNonTransientConnectionException] occurred.
java.sql.SQLNonTransientConnectionException: [tibcosoftwareinc][SQLServer JDBC
Driver]Conflicting connection information.

Symptoms:
JDBC Connection Login TImed Out error is thrown during the test connection. The
same works with previous version of BW products.

Cause:
The issue was caused by an invalid MYSQL URL.

Resolution

When the instance name is specified, do not specify the port number. Remove the
port number from the URL.

Below are some of the points using which you can trouble shoot the issue.
1) Make sure that your database is up and running
2) Check if there is any port blocking between TIBCO and Database machine.
Try to telnet the database port from TIBCO machine and check if you are
getting a connection.
3) If you are getting a connection, check what is the maximum timeout you
have configured in TIBCO JDBC connection. Increase the timeout value by 10
seconds.

2) I suggest, get the database team involved and check for the DB sessions from
TIBCO admin machine.

How can we achieve load balance and fault tolerance of SOAP over HTTP web service in the
Tibco domain?
Details

Resolution:
You can initiate Fault Tolerance of the BW Engine at deployment time in TIBCO
Administrator. When you have two Engines in Fault Tolerant mode, only one of the
Engines will be active at any given time. When the first Engine goes down the
Fault Tolerant Engine will become active.

For Load Balancing SOAP Servers, BW does not handle the SOAP load balancing
itself. You will have to use the standard HTTP load balancers available from a third
party. You can select one of the following external mechanisms:

1). Hardware Load Balancer (eg., Local Director) .


2). Software Load Balancer (eg., Resonate Software) .
3). DNS Round Robin (Most DNS servers will support this).

The following link could be useful for Apache as a reverse proxy server.
http://raibledesigns.com/tomcat/

In BW you cannot have the Engines be both Fault Tolerant and Load Balanced.
What you will have to do is:

- Have two independent BW Engines (with different subject prefixes) as primary


servers for Load Balancing.
- Have a Fault tolerant engine for each primary sever.

Basically you will have to have two pairs of BW Engines. However, only two
Engines will be active at any given time.

JDBC Query is used to Allow a query configured at design time to be executed. The values
can be modified per job based on prepared parameters.

SQL Direct on the other hand can have a fairly dynamic query since it's specified and
constructed at runtime for every job.

JDBC Query is better performant since it caches queries

edeliveryDelay

When redeliveryDelay is set, the EMS server waits the specified interval before returning an
unacknowledged message to the queue.
When a previously delivered message did not receive a successful acknowledgment, the
EMS server waits the specified redelivery delay before making the message available again
in the queue. This is most likely to occur in the event of a transaction rollback, session or
message recovery, session or connection close, or the abrupt exit of a client application.
However, note that the delay time is not exact, and in most situations will exceed the
specified redeliveryDelay.
Note: The redelivery delay is not available for routed queues.

The value can be specified in seconds, minutes, or hours. The value may be in the range of
15 seconds and 8 hours.
You can set redeliveryDelay using the form:

redeliveryDelay=time[sec|min|hour]

where time is the number of seconds. Zero is a special value that indicates no redelivery
delay.
You can optionally include time units, such as sec, min, or hour describe the time value as
being in seconds, minutes, or hours, respectively. For example:

redeliveryDelay=30min

specifies a redelivery delay of 30 minutes.


During the delay interval, messages are placed in the $sys.redelivery.delay queue. This
queue can be browsed, but it cannot be consumed from or purged. However, purging the
queue from which the delayed message came, or removing the message using its message
ID, immediately removes that message from $sys.redelivery.delay.
Note: While a message is on the $sys.redelivery.delay queue, it is not on the queue from
which it came and so it is not included in statistical message counts. This
includes maxmsgs, maxbytes, flowControl, and so on.

tibco ems delivery delay

MS Send Message

JMS Send Message is a synchronous activity that sends a message to the specified JMS
destination.

General

Delivery Delivery Delay feature, which is supported in EMS, is now supported


Delay(msec) in TIBCO BusinessWorks™ Container Edition 6.4.2.

It is the minimum length of time in milliseconds that must elapse after


a message is sent before the JMS provider may deliver the message to
a consumer.
n order for reducing the client’s waiting time in a server client scenario
For a queue based messaging only the prefetch value allows the the server to send
messages in batches so that the message will be ready for the client when ever the client is
ready. For automatic fetching its >1 and for disabling its "none".

More on for simple understanding , Prefetch value help to reduce client waiting time . It can
fetch(Consume) the messages faster than publisher send a messages to queue based on
prefetch value set per requirement.

his property used to limit the messages fetched from EMS queue by the receiver at
a time. The consumer will not be able to fetch more than the number of messages specified
by prefetch.

Automatic Fetch Enabled To enable automatic fetch, set prefetch to a positive integer.
Automatic fetch ensures that if a message is available, then it is waiting when client code is
ready to accept one. It can improve performance by decreasing or eliminating client idle
time while the server transfers a message. However, when a queue consumer prefetches a
group of messages, the server does not deliver them to other queue consumers (unless the
first queue consumer’s connection to the server is broken).

Flow Control In some situations, message producers may send messages more rapidly than
message consumers can receive them. The pending messages for a destination are stored
by the server until they can be delivered, and the server can potentially exhaust its storage
capacity if the message consumers do not receive messages quickly enough. To avoid this,
EMS allows you to control the flow of messages to a destination. Each destination can
specify a target maximum size for storing pending messages. When the target is reached,
EMS blocks message producers when new messages are sent. This effectively slows down
message producers until the message consumers can receive the pending messag

flowControl The flowControl property specifies the target maximum size the server can use
to store pending messages for the destination. Should the number of messages exceed the
maximum, the server will slow down the producers to the rate required by the message
consumers. This is useful when message producers send messages much more quickly than
message consumers can consume them. Unlike the behavior established by the
overflowPolicy property, flowControl never discards messages or generates errors back to
producer.
Resolution:
Description:
============
JMSCorrelationID of queue Requestor in TIBCO Businessworks does not work well
when using the static destination.

Environment:
===========
Version: all
Hardware: all
OS: all

Symptoms:
========
“JMS Queue Requestor” activity uses temporary destinations to ensure that reply
messages are received only by the process that sent the request. It will not work
well when using the static destinations

Resolution:
==========
The JMSCorrelationID was used to link the response message with the request
message. If you did not set this value, the response message’s JMSCorrelationID
should be the same as request messageID . Note that the EMS server will not
actively check JMSCorrelationID for request/reply, even if the JMSCorrelationID is
different. The requestor will receive any reply on that destination.

- “JMSCorrelationID” is used to link a response message with its related request


message. For this you need to use the message selector for the correlation ID set
while sending the request message if you want set correlation ID.

- “JMS Queue Requestor” activity uses temporary destinations to ensure that reply
messages are received only by the process that sent the request. It will not work
when using static destinations as there is no facility to provide the message
selector, which is needed for correlation ID.

- In this case you can use a combination of “JMS Queue Sender” and “Get JMS
Queue Message” in Request and “JMS Queue Receiver” and “Reply to JMS
Message” activities to use a correlation id along with message selector. (Refer to
the attached project. Filename: JMSCorrelationID.zip).

Reply to JMS message Tibco


Reply To JMS Message is a synchronous activity that sends a reply to a previously
received JMS queue or topic message. The Reply For Event field in the General tab lists the
activities that can receive the JMS message. The activity you select determines the response
of the reply message.
Difference between Get JMS Queue Message activity and Wait for JMS Queue
message activity

Details

Resolution:
The "Get JMS Queue Message" activity uses the pull mechanism to receive
messages from the JMS server. So if there is a message in the queue, it will be
received immediately. If there is no message, this activity will wait for a message
to arrive at the queue or timeout, whichever occurs first. It is not a good idea to
set timeout to 0 or blank, else this activity will wait indefinitely until a message
arrives at the queue. The "Wait for JMS Queue Message" activity works in passive
mode. It is notified once a message arrives on the specified queue.

Another difference is on the number of message these activities can


process. Suppose the Message Selector is not used, when bw engine starts up the
"Get JMS Queue Message" activity in this engine receives only one message from
queue, but the "Wait for JMS Queue Message" activity consumes all messages
from the queue.

Example usage of the "Wait for JMS Queue Message" activity could be that when
you send out a request to a request queue and then expect a response from a
response queue. In this case, you can use Candidate Event Key and Key fields to
get the correct response message from response queue.

KEYWORDS:GET JMS QUEUE MESSAGE,WAIT FOR JMS QUEUE MESSAGE,


DIFFERENCE

n. EMS provides a server-based solution to this problem. You can create bridges between
destinations so that messages sent to one destination are also delivered to all bridged
destinations.
How to configure an EMS route.
Description:
=========
1). Enable routing in the tibemsd.conf file on both servers (routing=enabled).

2). Create the route on both servers to point to the other server (create route
name url=URL zone_name=zone_name zone_type=1hop|mhop properties)

Where:

name is the name of the server at the other end of the route; it also becomes the
name of the route.

URL specifies the other server by its URL—including protocol and port.

zone_name specifies that the route belongs to the routing zone with this name.
When absent, the default value is default_mhop_zone

The zone type is either 1hop or mhop. When omitted, the default value is mhop.

properties is a space-separated list of properties for the route. Each property has
the syntax:
prop_name=value

If authorization is enabled on any routed EMS Servers, after setting the server
password, you also must make sure that on that server there is a user/password
that matches the name of the EMS Server that you are creating a route to.
Assume
there are two servers named EMS-SERVER1 and EMS-SERVER2 and in both of them
authorization is enabled. In that case, in the users.conf of EMS-SERVER1 you
should have a user EMS-SERVER2 with password of EMS-SERVER2, and in
users.conf of EMS-SERVER2, you should have a user called EMS-SERVER1 with
password of user EMS-SERVER1.

3). Use the tibemsadmin tool to connect to EMS-SERVER1 and execute the
following command:

a). set server password=&ltserver1_password>

b). create user EMS-SERVER2 password=&ltserver2_password> (if user "EMS-


SERVER2" is not already created) or

c). set password EMS-SERVER2 < server2_password> (if user "EMS-SERVER2" has
already been created in user.conf).
d). set server authorization=enabled

4). Use the tibemsadmin tool to connect to EMS-SERVER2 and execute the
following command:

a). set server password=&ltserver2_password>

b). create user EMS-SERVER1 password=&ltserver1_password> (if the user "EMS-


SERVER1" is not already created) or

c). set password EMS-SERVER1 < server1_password> (if user "EMS-SERVER1" has
already been created in user.conf).

d). set server authorization=enabled

There are sample config files for working with routes, "tibemsdroute-1.conf" and
"tibemsdroute-2.conf" in the &ltEMS>/bin directory for reference.

WADL is an XML file-format,

. 2. WADL is a machine-readable description of HTTP based REST web services.

whereas WSDL is an XML language for describing web services. 2. WADL is a


machine-readable description of HTTP based REST web services.

WSDL The Web Service Description Language (WSDL) is an XML vocabulary used to
describe SOAP-based web services. WADL The Web Application Description Language
(WADL) is an XML vocabulary used to describe RESTful web services.

Click to see full answer.

Also asked, what is WADL and WSDL?

The Web Application Description Language (WADL) is a machine-readable XML description


of HTTP-based web services. WADL is the REST equivalent of SOAP's Web Services
Description Language (WSDL), which can also be used to describe REST web services.

Subsequently, question is, what is difference between REST and


SOAP? KEY DIFFERENCE SOAP stands for Simple Object Access Protocol
whereas REST stands for Representational State Transfer. SOAP only works with XML
formats whereas REST work with plain text, XML, HTML and JSON. SOAP cannot make use
of REST whereas REST can make use of SOAP.

Correspondingly, what is the use of Wadl file?

WADL is a machine readable XML description of HTTP based web-services. WADL is


intended to simplify the reuse of web services that are based on the existing HTTP
architecture of the Web. It is platform and language independent and aims to promote the
reuse of applications beyond the basic use in a web browser.

The objective of Swagger is to create a “RESTful contract for your API, detailing all of its
resources and operations in a human and machine-readable format.” In this sense it is
a functional equivalent of WSDL documents for SOAP, providing automatically
generated descriptions that make it easier to discover

Swagger is an Interface Description Language for describing RESTful APIs expressed using
JSON. Swagger is used together with a set of open-source software tools to design, build,
document, and use RESTful web services. Swagger includes automated documentation,
code generation, and test-case generation. Wikipedia

Sending Data in the HTTP request The Invoke REST API activity contains different types of
parameters for sending data in a request: •

Template—this parameter is displayed when using a WADL file or a Swagger file to invoke
RESTful web service.

• Query

• Header

Body—this parameter contains four child parameters: — Form — Text — Binary — Multipart
Describing RESTful Web Service with WADL or Swagger Files If the protocol type is WADL or
Swagger, and a WADL file or Swagger file is given, the WADL file or Swagger file will be
mapped to the input parameters in the Input tab. Table 11 shows the rules for mapping a
WADL file to the input parameters. You are not allowed to alter the structure of the HTTP
request message in the Input tab. If the data structure in the WADL file or Swagger file
does not match the RESTful web service, edit the elements in the file, and then click Reload.

IBCO ActiveMatrix BusinessWorks Plug-in for REST and JSON Invoke REST API
activity uses Java key store for SSL connections. Java key store ships certificates
signed by a well-known CA such as Verisign. If the target server uses such
certificates, no additional SSL configuration is needed for Invoke REST API activity
since the default Java key store already has those CA. If the server uses
certificates that are not signed by a well-known CA, those certificates need to be
added into the Java key store as trusted certificates.

Resolution

If the Service Provider does not use well-known CA certificates or requires a specific
certificate, perform the following steps:
1. Import the intermediate and root certificates to the TIBCO_HOME\tibcojre\
version_number\lib\security\cacerts directory.

2. If the REST application requires a specific authentication other than the typical OAuth
authentication, you must request a client certificate from the same CA as that for your REST
application and then import the certificate to the TIBCO_HOME\tibcojre\version_number\lib\
security\cacerts directory.
3. You can also create a folder in the location where you store the trusted
certificates, and then create a BW_GLOBAL_TRUSTED_CA_STORE global variable
in your TIBCO ActiveMatrix BusinessWorks project to point to this folder.
The value you set for BW_GLOBAL_TRUSTED_CA_STORE must be a file URL, for
example, file:///c:/tibco/certs. See the information about trusted certificates in TIBCO
ActiveMatrix BusinessWorksTM Process Design for details about how to store certificates to
your project.
etails

Precondition:

Every OAuth 2.0 Token Server might have its own requirements to get the Access
Token, this Article shows a typical way to get the OAuth 2.0 access token for
reference, the users should work with their OAuth 2.0 Token Server team for the
detailed requirements.

To get OAuth 2.0 access token, the customer usually needs to get the URL for the
OAuth Token server and three parameters: "client_id", "client_secret" and
"grant_type". The customer also needs to know whether the OAuth Token server
requires the above parameters as a "Query" parameter or a "Form" parameter.

Resolution

1). If OAuth token server requires "Query" parameter:

a). Go to "Invoke REST API" activity-> "Configuration" Tab, specify OAuth Token
Server URL into "Resource URI", choose Method as "POST";

b). Go to "Input Editor" tab, expand Parameters->"Query", create three


parameters "client_id", "client_secret" and "grant_type" under "Query"

c). Go to "Input" tab, expand Parameters->"Query", and then specify or map


values for parameters "client_id", "client_secret" and "grant_type", save the
project and execute the process.

2). If OAuth token server requires "Form" parameter:

a). Go to "Invoke REST API" activity-> "Configuration" Tab, specify OAuth Token
Server URL into "Resource URI", choose Method as "POST";

b). Go to "Input Editor" tab, expand Parameters->"Body"->"Form", create three


parameters "client_id", "client_secret" and "grant_type" under "Form"

c). Go to "Input" tab, expand Parameters->"Body"->"Form", and then specify or


map values for parameters "client_id", "client_secret" and "grant_type", save the
project and execute the process.

Working with Path and Query Parameters

Path and query parameters are supported in TIBCO BusinessWorks Container Edition REST
APIs. Path parameters can be applied only at the root level when they apply to all
operations. They cannot be defined for individual operations only. Query parameters can be
applied at root as well as at individual operation level.
Define parameters in the resource service path by enclosing each parameter
in { } brackets. For example, to define the path parameter isbn for a book resource,
specify the resource path as follows:
/book/{isbn}
In this example, the client would invoke this service using the URL
http:/<host>:<port>/book/<isbn>.
Note: Path parameters that are not immediately enclosed in forward slashes are supported.
For example, the parameter authorName('{isbn}') in the resource service
path /book/authorName('{isbn}')/ is not directly contained by forward slashes, but will
still successfully pass.

Insert a question mark (?) after a parameter to add query parameters to a resource. In the
following example, isbn is defined as a query parameter, instead of the path parameter, in
the resource service path:
/book?{isbn}
Insert (&) to use it as a delimiter when defining multiple query parameters. In the following
example, the query parameters isbn and authorName are defined in the resource service
path:
/book?{isbn}&{authorName}

What is URI?
Uniform Resource Identifier is the full form of URI which is used for identifying each
resource of the REST architecture. URI is of the format:
<protocol>://<service-name>/<ResourceType>/<ResourceID>

There are 2 types of URI:

The key features of REST architectural style are: ● Client-server architecture: Provides a
separation of implementation details between clients and servers. ● Stateless
communication: During a client-server communication, the server does not store any
session information, making the client-server communication stateless. Every request is
complete in itself and must include all the information required to complete the request. ●
Cacheability: Provides an option to the client to cache response data and reuse it later for
equivalent requests; thus partially eliminating some client-server interactions. This results
in improved scalability and performance.

JavaScript Object Notation (full form of JSON) is a standard file format used to interchange
data. The data objects are stored and transmitted using key-value pairs and array data
types. In simpler terms, JSON data is (in some ways) the language of databases.

JSON has syntactic similarity to JavaScript because JSON is based on JavaScript object
notation syntaxes. But JSON format is text only, which makes it easy to read and use with
any programming language. This blog will introduce you to everything there is to know of
JSON.
Where is JSON used?

JSON data format is ubiquitous in web APIs, cloud computing, NoSQL databases (like
MongoDB), and increasingly also in Machine Learning.

Deciding Between SOAP and REST

Unless you plan to create your own web service, the decision of which protocol to use may

already be made for you. Extremely few web services, such as Amazon, support both. The

focus of your decision often centers on which web service best meets your needs, rather

than which protocol to use.

Soap Advantages

SOAP provides the following advantages when compared to REST:

• Language, platform, and transport independent (REST requires use of HTTP)

• Works well in distributed enterprise environments (REST assumes direct point-to-point

communication)

• Standardized

• Provides significant pre-build extensibility in the form of the WS* standards

• Built-in error handling

• Automation when used with certain language products

REST Advantages

REST is easier to use for the most part and is more flexible. It has the following advantages

over SOAP:

• No expensive tools require to interact with the web service

• Smaller learning curve

• Efficient (SOAP uses XML for all messages, REST can use smaller message formats)

• Fast (no extensive processing required)

• Closer to other web technologies in design philosophy


Locating Free Web Services

The best way to discover whether SOAP or REST works best for you is to try a number of

free web services. Rolling your own web service can be a painful process, so it’s much

better to make use of someone else’s hard work. In addition, as you work with these free

web services you may discover that they fulfill a need in your organization, and you can

save your organization both time and money by using them. Here are some to check out:

 https://dog.ceo/dog-api/

 https://swapi.co/

 https://graphical.weather.gov/xml/

 https://swagger.io/

One common concern about using a free web service is the perception that it could

somehow damage your system or network. But since they typically send you text; not

scripts, code, or binary data, the risks are small.

Of course, there’s also the concern that the web services will disappear overnight. In most

cases, they’re exceptionally stable and it’s unlikely that any of them will disappear anytime

soon. When in doubt, stick with web services from organizations with a large Internet

presence. And do some quick research on the service before you begin using it.

A Simple REST Example

Sometimes, simple is best. In this case, REST is about as simple as it gets because all you

need is an URL. Open your browser – it doesn’t matter which one – and type

http://rpc.geocoder.us/service/csv?address=1600+Pennsylvania+Ave,+Washington+DC in

the address field. Press Enter.

You’ll see the output in your browser in CSV format:


You see the latitude, followed by the longitude, followed by the address you provided. This

simple test works for most addresses in most major cities (it doesn’t work too well for rural

addresses – yet). The idea is that you obtain the latitude and longitude needed for use with

other web services. By combining web services together with a little glue code, you can

create really interesting applications that do amazing things in a short time with little effort.

Everyone else is doing the heavy lifting. You can also test your REST API with simple to use

tools like SoapUI.

A Simple SOAP Example

SOAP, by its very nature, requires a little more setup, but it's still impressively simple to

use.

Begin this example by creating Windows Forms application using Visual Studio. The sample

code uses C#, but the same technique works fine with other .NET languages (you’ll need to

modify the code to fit). Add labels, textboxes, and buttons as shown here (the Latitude and

Longitude fields are read-only).


Here’s where the automation comes into play. Right click References in Solution Explorer

and choose Add Service Reference from the context menu. You’ll see the Add Service

Reference dialog box. Type the following address into the address field:

http://rpc.geocoder.us/dist/eg/clients/GeoCoder.wsdl and click Go. Type GeocoderService in

the namespace field. Your dialog box should look like the one shown here.

Featured snippet from the web


Get the OAuth Access Token (Postman)

1. In Postman, go to Authorization and select OAuth 2.0 as Type.


2. Press button Get new Access Token.
3. Enter any name for <Token Name> .
4. In <Auth URL> enter the Authorization Endpoint URL you have copied before.
5. In <Access Token URL> enter the Token Endpoint URL you have copied before.
Click OK. Visual Studio adds the code needed to work with Geocoder in the background.

At this point, you’re ready to use the Web service. All you need to do is to add some code to

the Get Position button as shown here.

private void btnGetPosition_Click(object sender, EventArgs e)

// Create the client.

GeocoderService.GeoCode_PortTypeClient Client =

new GeocoderService.GeoCode_PortTypeClient();
// Make the call.

GeocoderService.GeocoderResult[] Result =

Client.geocode(txtAddress.Text);

// Check for an error result.

if (Result != null)

// Display the results on screen.

txtLatitude.Text = Result[0].lat.ToString();

txtLongitude.Text = Result[0].@long.ToString();

else

// Display an error result.

txtLatitude.Text = "Error";

txtLongitude.Text = "Error";

The code begins by creating a client. This is a common step for any web service you use

with Visual Studio (or other environments that support SOAP natively).
After you create the client, you use it to call one of the methods supported by the web

service. In this case, you call geocode() and pass the address you want to work with. The

result of the call is stored in a GeocoderResult variable named Result. A single address could

possibly end up providing multiple positions if you aren’t specific enough, so this information

is passed back as an array.

Let’s assume that no errors occur (resulting in a null return value). The example assumes

that you provided great information, so it places the information found in the first Result

entry into the Latitude and Longitude output. So, this example isn’t really that complicated

compared with REST, but as you can see, even a simple example is more work.

The Bottom Line(s)

There are a few bottom lines here.

First Bottom Line

One is that, to the question of REST vs SOAP, the ultimate answer is: “Depends.” Each

protocol has definite advantages and disadvantages. Selecting SOAP vs REST comes down

to the programming language you use, the environment you use it, and the requirements.

(And, as mentioned earlier, this article doesn’t even bring GraphQL into the equation yet.)

If you really want to avoid problems upfront, chart the pros and cons in your situation and

play it by the numbers.

Second Bottom Line

Remember that you don’t have to reinvent the wheel. It’s amazing to see companies spend

big bucks to create web services that already exist (and do a better job). Look for free

alternatives whenever possible. In many cases, the choice of web service also determines

your choice of protocol.

You might also like