You are on page 1of 6

Microservices

Microservices can be considered a specialisation or ex Architectures are symmetrical rather than hierarchitension of service-oriented architectures (SOA) used
cal (producer - consumer)
to build distributed software systems. As with SOA,
services in a microservice architecture (MSA)[1] are
A microservices-based architecture
processes that communicate with each other over a
network in order to fulll a goal. Also, like SOA, these
lends itself to a continuous delivery software develservices use technology-agnostic protocols.[2][3][4] The
opment process. A change to a small part of the
microservices architectural style is a rst realisation of
application only requires one or a small number of
SOA that followed the introduction of DevOps and is beservices to be rebuilt and redeployed[2]
coming more popular for building continuously deployed
[5]
systems.
is distinct from a service-oriented architecture
Because of its focus on incremental and localized
(SOA) in that the latter aims at integrating various
changes, Microservices tend to enable realization of ben(business) applications whereas several microserets and return on investment (ROI) more quickly than
vices belong to one application only
investment in large traditional transformation programs.
naturally enforces a modular structure[2]

In contrast to SOA, microservices respond to the questions of how big a service should be and how services
should communicate with each other. In a microservices
architecture, services should be small and the protocols
should be lightweight. The benet of distributing dierent responsibilities of the system into dierent smaller
services is that it enhances the cohesion and decreases the
coupling. This makes it easier to change and add functions and qualities to the system at any time.[6] It also allows the architecture of an individual service to emerge
through continuous refactoring,[7] and hence reduces the
need for a big up-front design and allows for releasing
software early and continuously.

2 History
Dr. Peter Rodgers introduced the term Micro-WebServices" during a presentation at Cloud Computing
Expo in 2005. On slide #4 of the conference presentation, he states that Software components are MicroWeb-Services. Juval Lwy had similar precursor ideas
about classes being granular services, as the next evolution of Microsoft architecture.[8][9][10] Services are composed using Unix-like pipelines (the Web meets Unix =
true loose-coupling). Services can call services (+multiple language run-times). Complex service-assemblies
are abstracted behind simple URI interface. Any service,
at any granularity, can be exposed. He described how
a well-designed service platform applies the underlying
architectural principles of the Web and Web services together with Unix-like scheduling and pipelines to provide
radical exibility and improved simplicity by providing a
platform to apply service-oriented architecture throughout your application environment.[11] The design, which
originated in a research project at Hewlett Packard Labs,
aims to make code less brittle and to make large-scale,
complex software systems robust to change.[12] To make
Micro-Web-Services work, one has to question and
analyze the foundations of architectural styles (such as
SOA) and the role of messaging between software components in order to arrive at a new general computing
abstraction.[13] In this case, one can think of resourceoriented computing (ROC) as a generalized form of the
Web abstraction. If in the Unix abstraction "everything
is a le", in ROC, everything is a Micro-Web-Service.

Microservices and Service-oriented Architecture's are


service architectures with dierent goals. SOA is more
focused on reusability and segregation whereas microservices focus on replacing a large application(s), mostly single, with a system that can incrementally evolve and is
easier to manage.

Details

Properties of Microservices:
The services are easy to replace
Services are organized around capabilities, e.g.,
user interface front-end, recommendation, logistics,
billing, etc.
Services can be implemented using dierent
programming languages, databases, hardware and
software environment, depending on what ts best
1

4 CRITICISM

It can contain information, code or the results of computations so that a service can be either a consumer or
producer in a symmetrical and evolving architecture.

moving responsibilities between services is more


dicult.
It may involve communication between dierent teams, rewriting the functionality
in another language or tting it into a dierent
infrastructure[2]

A workshop of software architects held near Venice in


May 2011 used the term microservice to describe what
the participants saw as a common architectural style that
the complexity of a monolithic application is only
many of them had been recently exploring. In May 2012,
shifted into the network, but persists:
the same group decided on microservices as the most
appropriate name. James Lewis presented some of those
You can move it about but its still
ideas as a case study in March 2012 at 33rd Degree in
there!
Krakw in Microservices - Java, the Unix Way, as did
Robert Annett: Where is the
Fred George about the same time. Adrian Cockcroft at
complexity?[20]
Netix, describing this approach as ne grained SOA,
pioneered the style at web scale, as did many of the others
mentioned in this article - Joe Walnes, Dan North, Evan
Also, an application made up of any number of microserBottcher and Graham Tackley.[14]
vices has to access its respective ecosystem which may
have unnecessary complexity.[21] This kind of complexity
can be reduced by standardizing the access mechanism.
3 Philosophy
The Web as a system standardized the access mechanism
by retaining the same access mechanism between browser
The philosophy of the microservices architecture essen- and application resource over the last 20 years. Using the
tially equals to the Unix philosophy of Do one thing and number of Web pages indexed by Google it grew from
do it well. It is described as follows:[15][16][17]
26 million pages in 1998 to around 60 trillion individual pages by 2015 without the need to change its access
The services are small - ne-grained to perform a mechanism. The Web itself is an example that the complexity inherent in traditional monolithic software syssingle function.
tems can be overcome.[22][23]
The organization culture should embrace automation
of deployment and testing. This eases the burden on
4.1 Nanoservices
management and operations.
The culture and design principles should embrace Too-ne-grained microservices have been criticized as
failure and faults, similar to anti-fragile systems.
an anti-pattern, dubbed a nanoservice by Arnon RotemGal-Oz:
Each service is elastic, resilient, composable, minimal, and complete.[17]
[A] nanoservice is an anti-pattern where
a service is too ne grained. [A] nanoservice is a service whose overhead (commu4 Criticism
nications, maintenance etc.) outweighs its
utility.[24][25][lower-alpha 1]
The microservices architecture is subject to criticism for
a number of issues:
Problems include the code overhead (interface denition,
retries), runtime overhead (serialization/deserialization,
network trac), and fragmented logic (useful functionality not implemented in one place, instead requiring com the architecture introduces additional complexity bining many services).
and new problems to deal with, such as network
Proposed alternatives to nanoservices include:[25]
latency, message formats, load balancing and fault
tolerance,[19] ignoring one of these belongs to the
Package the functionality as a software library,
"fallacies of distributed computing"
rather than a service.
testing and deployment are more complicated[19]
Combine the functionality with other functionalities,
inter-service calls over a network have a higher cost
producing a more substantial, useful service.
in terms of network latency and message processing
Refactor the system, putting the functionality in
time than in-process calls within a monolithic service process[2]
other services or redesigning the system.
services form information barriers[18]

Users

6 Implementations

Bluemix

Baratine is an open-source JVM framework for


building reactive applications. In Baratine, applications are composed of individual services. Within a
service, only a single-thread is responsible for mutating data. Because of this data + thread abstraction,
Baratine solves the database access bottleneck that
plagues multi-threaded and multi-tier stacks. In addition, Baratines internals provide high availability,
recoverability, and thread context isolation to each
service.[34]

Cloud Foundry[19]

Docker

Google

Enduro/X framework enables to build distributed


microservices based applications for C/C++/Go.

GE Predix

Jolie,[35] The rst language for Microservices

The Guardian

KumuluzEE[36] is an open-source microservice


framework for Java EE (Java Dukes Choice Award
winner 2015)

Known users of the Microservices architecture:


Akana
Amazon - notably AWS API Gateway and Lambda
Apprenda[26]

HP Helion Development Platform


Interactive Intelligence
Jelastic
Microsoft Azure
Netix[27] (Netix receives nearly two-billion requests each day resulting in roughly 20 billion internal API calls.)
Nirmata[28]
nearForm[29]
Oracle[30]
Pivotal[31]
Red Hat Openshift[32]
Riot Games
Salesforce

Microsoft Service Fabric[37][38]


MicroService4Net,[39] an implementation that uses
Windows services and self hosting web API in order
to create micro services easily (C#)
NetKernel is a uniform resource engine or operating system for developing, testing and running complex, distributed microservice architectures. It consists of a pure-Java microkernel that embodies the
ROC abstraction, combined with a small core set of
libraries, to provide a minimal ROC system. The
system is modular and is extensible both with user
modules and with o-the-shelf ready to use dedicated function modules that can be installed from
NetKernels repositories. Modules are hot-swapable
allowing for zero-downtime evolution of the software conguration. Out of the box the core platform
is accompanied by a comprehensive set of modules
which provides a complete self-contained application server, featuring: languages, transformationtools, integrated developer tools, operational monitoring/control etc.[40]
Nirmata

SAP Hybris - used for YaaS. See https://www.yaas.


io

Red Hat Openshift[32] is a Platform as a Service


(PaaS) that allows developers to quickly develop,
host, and scale applications in a cloud environment.

SoundCloud

rupy Virtual Host PaaS with distributed DB for


Java.

Spotify[33]
Uber
Wix.com

Seneca Microservices Framework and Protocol


Spring Cloud Spring Cloud provides tools for
Spring Boot developers to quickly build some of
the common patterns in distributed systems (e.g.

9
conguration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership
election, distributed sessions, cluster state).
Test tool for Microservices: Wilma[41][42]
Vert.x

[43]

See also
Self-contained Systems
Conways law
Fallacies of distributed computing
Service-oriented architecture (SOA)

[9] Lwy, Juval (2007). Programming WCF Services 1st Edition. pp. 543553.
[10] Lwy, Juval (May 2009). Every Class As a Service. Microsoft TechEd Conference, SOA206. Archived from the
original on 2010.
[11] Rodgers, Peter. Service-Oriented Development on
NetKernel- Patterns, Processes & Products to Reduce
System Complexity. CloudComputingExpo. SYS-CON
Media. Retrieved 19 August 2015.
[12] Russell, Perry; Rodgers, Peter; Sellman, Royston (2004).
Architecture and Design of an XML Application Platform. HP Technical Reports. p. 62. Retrieved 20 August
2015.

Representational state transfer (REST)


RISC, RISC vs CISC as analog debate

[14] James Lewis and Martin Fowler. Microservices.

Web-oriented architecture (WOA)


Cross-cutting concern
Serverless computing

[15] Lucas Krause. Microservices: Patterns and Applications.


ASIN B00VJ3NP4A.
[16] Lucas Krause. Philosophy of Microservices?".
[17] Jim Bugwadia. Microservices: Five Architectural Constraints.

Openshift

[18] Jan Stenberg (11 August 2014). Experiences from Failing with Microservices.

Notes

[19] Developing Microservices for PaaS with Spring and


Cloud Foundry.

[1] Spelling and grammar corrected.

[8] Lwy, Juval (October 2007). Every Class a WCF Service. Channel9, ARCast.TV.

[13] Hitchens, Ron (Dec 2014). Swaine, Michael, ed. Your


Object Model Sucks. PragPub Magazine. Pragmatic
Programmers: 15.

Unix philosophy

REFERENCES

References

[1] Microservices: yesterday, today, and tomorrow (PDF).


Retrieved 6 July 2016.
[2] Martin Fowler. Microservices.
[3] Newman, Sam. Building Microservices. O'Reilly Media.
ISBN 978-1491950357.
[4] Wol, Eberhard. Microservices: Flexible Software Architectures. ISBN 978-1523361250.

[20] Robert Annett. Where is the complexity?".


[21] BRASS Building Resource Adaptive Software Systems.
U.S. Government. DARPA. April 7, 2015. Access
to system components and the interfaces between clients
and their applications, however, are mediated via a number of often unrelated mechanisms, including informally
documented application programming interfaces (APIs),
idiosyncratic foreign function interfaces, complex illunderstood model denitions, or ad hoc data formats.
These mechanisms usually provide only partial and incomplete understanding of the semantics of the components themselves. In the presence of such complexity, it is
not surprising that applications typically bake-in many assumptions about the expected behavior of the ecosystem
they interact with.

[5] Balalaie, A.; Heydarnoori, A.; Jamshidi, P. (2016-05-01).


Microservices Architecture Enables DevOps: Migration
to a Cloud-Native Architecture. IEEE Software. 33 (3):
4252. doi:10.1109/MS.2016.64. ISSN 0740-7459.

[22] Alpert, Jesse; Hajaj, Nissan. We knew the web was big.
Ocial Google Blog. Google.com. Retrieved 22 August
2015.

[6] Oliver Wolf. Introduction into Microservices.

[23] The Story. How search works. Google.com. Retrieved


22 August 2015.

[7] Chen, Lianping; Ali Babar, Muhammad (2014). Towards


an Evidence-Based Understanding of Emergence of Architecture through Continuous Refactoring in Agile Software
Development. The 11th Working IEEE/IFIP Conference
on Software Architecture(WICSA 2014). IEEE.

[24] Services, Microservices, Nanoservices oh my!, Arnon


Rotem-Gal-Oz
[25] Pratical SOA: 1.1: Nanoservices, Arnon Rotem-Gal-Oz,
2010

[26] How Enterprise PaaS can add Critical Value to Microservices.


[27] Microservices (PDF).
[28] Microservices.
[29] NodeCrunch Tag Archives: microservices.
[30] Microservices and the Integration Platform.
[31] Let your developers move faster with composable services.
[32] Develop, Host and Scale Apps in the Cloud.
[33] Schedule Thursday (3rd Dec.) - conference. gotocon.com. Retrieved 2016-04-19.
[34] Baratine.
[35] http://www.jolie-lang.org/
[36] KumuluzEE.
[37] overview
[38] blog announcement
[39] http://www.codeproject.com/Tips/894355/
MicroService-Net-Create-Micro-Services-Easily-with
[40] Products > Platform. 1060 Research Ltd. Retrieved 12
October 2015.
[41] Wilma documentation
[42] Wilma source code
[43] Vertx.

10

Further reading

Armin Balalaie, Abbas Heydarnoori, Pooyan


Jamshidi, Migrating to Cloud-Native Architectures Using Microservices: An Experience Report,
arXiv preprint arXiv:1507.08217
Armin Balalaie, Abbas Heydarnoori, Pooyan
Jamshidi, Microservices Architecture Enables DevOps: Migration to a Cloud-Native Architecture,
IEEE Software, May/June 2016.
Wijesuriya, Viraj Brian (2016-08-29) Microservice
Architecture, Lecture Notes, University of Colombo
School of Computing, Sri Lanka

11

11
11.1

TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

Text and image sources, contributors, and licenses


Text

Microservices Source: https://en.wikipedia.org/wiki/Microservices?oldid=739356134 Contributors: Nealmcb, Kku, Nickg, Greenrd, Albany45, R, Diego Moya, Vald, Nbarth, Frap, Attys, Iridescent, Sanspeur, Rampa1987, CiaranHarron, Jhureley1977, Doc James, Cyfal,
JL-Bot, Niceguyedc, JustinClarkCasey, Rob Bednark, Chomsnl1, Chrilloni, Yobot, AnomieBOT, Dpurrington, Opex jr, Alvb, Search.ptw,
I dream of horses, Primaler, Jandalhandler, Cnwilliams, Lopifalko, Olof nord, Checkingfax, KennethTan1971, Tyrantbrian, Raywalk,
Dmearls, BG19bot, Noopman, Pooyanjamshidi, Cats paw, Phantummm, K0zka, Gorohoroh, P1973h, ColRad85, Sconaomi, Cguidi,
Kennedyangela, Kimw001, Xnts, CodeCleaner, Tkohegyi, My Chemistry romantic, Majora, Someone2, Zbrad, Lindenc, Madarsv, Kveigar,
Amit.kasher, Wolfoo2931, Irb zg, Benaryorg, Cbzha, BlueRiver02703, DrDivago2016, IDesignInc and Anonymous: 66

11.2

Images

11.3

Content license

Creative Commons Attribution-Share Alike 3.0

You might also like