0% found this document useful (0 votes)
177 views

Seminar On Microservices: Submitted For Partial Fulfilment of Credits For MCA-362

The document provides an overview of microservices architecture. It defines microservices as distinct modules that focus on single functions and have well-defined interfaces. Examples given of companies using microservices include Netflix, Amazon, and eBay. Benefits discussed include simpler deployment, understanding, reusability, and defect isolation. The document then provides steps to get started with microservices including service decomposition, building/deploying, designing services carefully, decentralizing, and deploying with consumer driven contracts. Finally, pros and cons of the microservices approach are summarized.

Uploaded by

Jesica Tandon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views

Seminar On Microservices: Submitted For Partial Fulfilment of Credits For MCA-362

The document provides an overview of microservices architecture. It defines microservices as distinct modules that focus on single functions and have well-defined interfaces. Examples given of companies using microservices include Netflix, Amazon, and eBay. Benefits discussed include simpler deployment, understanding, reusability, and defect isolation. The document then provides steps to get started with microservices including service decomposition, building/deploying, designing services carefully, decentralizing, and deploying with consumer driven contracts. Finally, pros and cons of the microservices approach are summarized.

Uploaded by

Jesica Tandon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

1

Seminar on Microservices
Submitted for partial fulfilment of credits for MCA-362

Submitted By:
Khushboo Yadav
05304092017
MCA-6th Sem
2

What is
Microservice architecture, or simply microservices, is a
distinctive method of developing software systems that
tries to focus on building single-function modules with
Microservices? well-defined interfaces and operations. The trend has
grown popular in recent years as Enterprises look to
become more Agile and move towards a DevOps and
continuous testing.
Examples of 3

Microservices
Netflix has a widespread architecture that has evolved
from monolithic to SOA. It receives more than one
billion calls every day, from more than 800 different types
of devices, to its streaming-video API. Each API call then
prompts around five additional calls to the backend
service.

Amazon has also migrated to microservices. They get


countless calls from a variety of applications—including
applications that manage the web service API as well as
the website itself—which would have been simply
impossible for their old, two-tiered architecture to handle.

The auction site eBay is yet another example that has


gone through the same transition. Their core application
comprises several autonomous applications, with each
one executing the business logic for different function
areas.
4
5
SOA vs. Microservices

Both approaches have their advantages, so


how can you determine which one will work
best for your purposes? In general, it
depends on how large and diverse your
application environment is. Larger, more
diverse environments lend themselves more
to service-oriented architecture (SOA), which
supports integration between heterogenous
applications and messaging protocols via an
enterprise-service bus (ESB). Smaller
environments, including web and mobile
applications, don’t require such a robust
communication layer and are easier to
develop using a microservices architecture.
6
Simpler To Deploy Deploy in literal pieces
without affecting other
services.

Simpler To Understand Follow code easier since


the function is isolated and
less dependent.
Benefits Of
Reusability Across Business Share small services like
payment or login systems
across the business.
Microservices
Faster Defect Isolation When a test fails or service
goes down, isolate it
quickly with microservices.

Minimized Risk Of Change Avoid locking in


technlogies or languages -
change on the fly without
risk.
How Do I Get Started with a Microservices Architecture?
7

1. How to Decompose
One of the ways to make our job easier could be to define services
corresponding to business capabilities. A business capability is
something a business does in order to provide value to its end users.
Each service can be owned by a different team who becomes an
expert in that particular domain and an expert in the technologies
that are best suited for those particular services. This often leads to
more stable API boundaries and more stable teams.
8
2. Building and Deploying
• After deciding on the service boundaries of these small services,
they can be developed by one or more small teams using the
technologies which are best suited for each purpose. For example,
you may choose to build a User Service in Java with a MySQL
database and a Product Recommendation Service with
Scala/Spark.
• Once developed, CI/CD pipelines can be setup with any of the
available CI servers (Jenkins, TeamCity, Go, etc.) to run the
automated test cases and and deploy these service independently
to different environments (Integration, QA, Staging, Production,
etc).
3. Design the Individual Services 9
Carefully

When designing the services, carefully define them and think


about what will be exposed, what protocols will be used to
interact with the service, etc.
It is very important to hide any complexity and
implementation details of the service and only expose what is
needed by the service’s clients. If unnecessary details are
exposed, it becomes very difficult to change the service later
as there will be a lot of painstaking work to determine who is
relying on the various parts of the service. Additionally, a great
deal of flexibility is lost in being able to deploying the service
independently.

Better approach
4. Decentralize Things
10

There are also some architectural patterns which can


help in decentralizing things. For example, you might
have an architecture where the collection of
services are communicating via a central message
bus.

This bus handles the routing of messages from


different services. Message brokers like RabbitMQ are
a good example.
11

5. Deploy
It’s important to write Consumer Driven Contracts
for any API that is being depended upon. This is to
ensure that new changes in that API don’t break
your API.
The Six Characteristics Of 12

Microservices

 Multiple Components : Software built as microservices can, by definition, be broken down into multiple
component services.
 Built For Business : The microservices style is usually organized around business capabilities and priorities.
 Simple Routing : Microservices act somewhat like the classical UNIX system: they receive requests,
process them, and generate a response accordingly.
 Decentralized : Decentralized governance is favored by the microservices community because its
developers strive to produce useful tools that can then be used by others to solve the same problems.
 Failure Resistant : Like a well-rounded child, microservices are designed to cope with failure. Since
several unique and diverse services are communicating together, it’s quite possible that a service could
fail, for one reason or another
 Evolutionary : Microservices architecture is an evolutionary design and, again, is ideal for evolutionary
systems where you can’t fully anticipate the types of devices that may one day be accessing your
application..
13

Pros
Microservicearchitecture gives developers the freedom to
independently develop and deploy services
A microservice can be developed by a fairly small team
Code for different services can be written in different languages
(though many practitioners discourage it)
Easy integration and automatic deployment (using open-source

Microservice
continuous integration tools such as Jenkins, Hudson, etc.)
Easyto understand and modify for developers, thus can help a new
team member become productive quickly

Pros The

The
developers can make use of the latest technologies
code is organized around business capabilities
Starts the web container more quickly, so the deployment is also faster
When change is required in a certain part of the application, only the
related service can be modified and redeployed—no need to modify
and redeploy the entire application
Easy to scale and integrate with third-party services
No long-term commitment to technology stack
14

Cons
Dueto distributed deployment, testing can become
complicated and tedious
Increasing number of services can result in information barriers
The architecture brings additional complexity as the developers
have to mitigate fault tolerance, network latency, and deal with a
variety of message formats as well as load balancing

Microservice Being

When
a distributed system, it can result in duplication of effort
number of services increases, integration and managing

Cons whole products can become complicated


In addition to several complexities of monolithic architecture, the
developers have to deal with the additional complexity of a
distributed system
Developershave to put additional effort into implementing the
mechanism of communication between the services
Handling use cases that span more than one service without
using distributed transactions is not only tough but also requires
communication and cooperation between different teams
15

Whether or not microservice architecture becomes the preferred style

The Future of of developers in future, it’s clearly a potent idea that offers serious
benefits for designing and implementing enterprise applications. Many
developers and organizations, without ever using the name or even

Microservice
labeling their practice as SOA, have been using an approach toward
leveraging APIs that could be classified as microservices.
We’ve also seen a number of existing technologies try to address parts

Architecture
of the segmentation and communication problems that microservices
aim to resolve. SOAP does well at describing the operations available
on a given endpoint and where to discover it via WSDLs. UDDI is
theoretically a good step toward advertising what a service can do
and where it can be found. But these technologies have been
compromised by a relatively complex implementation, and tend not to
be adopted in newer projects. REST-based services face the same
issues, and although you can use WSDLs with REST, it is not widely done.
Assuming discovery is a solved problem, sharing schema
and meaning across unrelated applications still remains a difficult
proposition for anything other than microservices and other SOA
systems. Technologies such as RDFS, OWL, and RIF exist and are
standardized, but are not commonly used. JSON-
LD and Schema.org offer a glimpse of what an entire open web that
shares definitions looks like, but these aren’t yet adopted in large
private enterprises.
16

Thank You

You might also like