Professional Documents
Culture Documents
DeepDive
PH
T
AE
A SE S S E N T I A L G U I D E T O M I C R O S E R V I C E S
InfoWorld.com
Deep Dive
InfoWorld.com
Deep Dive
InfoWorld.com
Deep Dive
decentralized development teams that work and
change microservices independently. This makes
it easier to upgrade services and add functionality. Both the software and the development
process become more agile.
For all these reasons, microservices have
enjoyed increasing popularity. But every architecture has its strengths and weaknesses. Microservices architectures bring a whole new set of
problems that are hard to tackle.
In this Deep Dive, well explore the pros and
cons of microservices as we unpack this modern
method of building applications. Then well walk
through how to build a microservices-based
blogging application step by step to show how
microservices work in the real world. Finally, well
Conventional application architecture groups people according to their technical expertise. Microservices architecture tends to result in multiple small teams,
each dedicated to a single service that can be updated independently. This new
arrangement encourages ownership over particular functions.
UI Team
Supply
Middleware g uys
Orders
DBAs
Recommender
InfoWorld.com
Deep Dive
application in the first place? In theory, at least,
you can imagine they would live in separate application and data silos without major
problems. For example, if the average auction
received two bids, but only a quarter of all sales
received feedback, the bidding service would
be at least eight times as active as the feedback
application at any time of day.
FAQ: Your
microservices
questions,
answered
THINKSTOCK
AS DEVELOPERS
AND MANAGERS
WADE INTO
microservices,
many of the same
questions arise
again and again.
Here are some of
the most common
queries and their
responses.
If each service should have its own
database, then how do you associate
data between different databases?
The first concern that people have
when building microservices architectures is letting go of join tables. Once
you start building applications more
complicated than the simple blog
example in this article, this problem
becomes very apparent.
The simple solution is to use
application-level joins instead of database-level joins. This results in more
database queries more often than
a single SQL command might incur,
but you can mitigate that by incorporate caching within the microservice
InfoWorld.com
Deep Dive
If theres a bug, which microservice is responsible for it? The interdependencies between
microservices can make that question maddeningly hard to answer. Microservices communicate
with each other, generally through lightweight
JSON REST APIs. Unlike their predecessors
XML-RPC and SOAP, REST interfaces tend to be
THINKSTOCK
InfoWorld.com
Deep Dive
to discover the problem areas. When you are
dealing with a mesh of dozens or even hundreds
of separate applications talking to each other
with loosely defined APIs, you lose that luxury.
Nonetheless, with careful planning you
can overcome these difficulties. At the present
moment, you have relatively few off-the-shelf
microservices debugging tools to choose from.
You will probably have to stitch together your
own solutions based on other, partial situations out there. But when you architect around
microservices philosophies, you gain hidden benefits, such as tying in with other new technologies
such as PaaS, Linux containers, or Docker.
The easiest
way to think
about building
a microservicebased application is to start
with the front
end and work
backward.
InfoWorld.com
Deep Dive
Its important
to remember
that microservices are a
response to
hitting a glass
ceiling.
At some point,
traditional
monolithic
application
architectures
dont scale
anymore.
InfoWorld.com
Deep Dive
is, if your legacy application is still working well
and doesnt need to be changed much then
adopting microservices for their own sake will
gain you very little other than headaches.
After all, microservices bring quirks and
difficulties to the development process. Keeping
all these new services running can sometimes feel like juggling a dozen balls in the air.
Adopting declarative orchestration tools such
as Kubernetes can take some adjustment as
well. Complex microservices architectures have
their own lexicon to cover all the new software
patterns you will need to adopt.
Yet microservices arent nearly as daunting as
SOA used to be. In fact, microservices practices
can be implemented in even the smallest software projects and you dont need to throw
away all your old code to get started. You can
start by building faux microservices.
If you have a large application
that is getting out of hand,
with software lifecycles that