Sponsored Links

Kamis, 10 Mei 2018

Sponsored Links

Microservices in the Insurance Industry
src: www.pagos.com

Microservices is a software development technique--a variant of the service-oriented architecture (SOA) architectural style that structures an application as a collection of loosely coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight. The benefit of decomposing an application into different smaller services is that it improves modularity and makes the application easier to understand, develop, test, and more resilient to architecture erosion. It also parallelizes development by enabling small autonomous teams to develop, deploy and scale their respective services independently. It also allows the architecture of an individual service to emerge through continuous refactoring. Microservices-based architectures enable continuous delivery and deployment.


Video Microservices



Details

There is no industry consensus yet regarding the properties of microservices, and an official definition is missing as well. Some of the defining characteristics that are frequently cited include:

  • Services in a microservice architecture (MSA) are often processes that communicate over a network to fulfill a goal using technology-agnostic protocols such as HTTP. However, services might also use other kinds of inter-process communication mechanisms such as shared memory. Services might also run within the same process as, for example, OSGI bundles.
  • Services in a microservice architecture are independently deployable.
  • 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 different programming languages, databases, hardware and software environment, depending on what fits best.
  • Services are small in size, messaging enabled, bounded by contexts, autonomously developed, independently deployable, decentralized and built and released with automated processes.

A microservices-based architecture:

  • Naturally enforces a modular structure.
  • Lends itself to a continuous delivery software development process. A change to a small part of the application only requires rebuilding and redeploying only one or a small number of services.
  • Adheres to principles such as fine-grained interfaces (to independently deployable services), business-driven development (e.g. domain-driven design), IDEAL cloud application architectures, polyglot programming and persistence, lightweight container deployment, decentralized continuous delivery, and DevOps with holistic service monitoring.
  • Provides characteristics that are beneficial to scalability.

Maps Microservices



History

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 many of them had been recently exploring. In May 2012, the same group decided on "microservices" as the most appropriate name. James Lewis presented some of those ideas as a case study in March 2012 at 33rd Degree in Kraków in Microservices - Java, the Unix Way, as did Fred George about the same time. Adrian Cockcroft at Netflix, describing this approach as "fine grained SOA", pioneered the style at web scale, as did many of the others mentioned in this article - Joe Walnes, Dan North, Evan Bottcher and Graham Tackley.

Dr. Peter Rodgers introduced the term "Micro-Web-Services" during a presentation at the Web Services Edge conference in 2005. On slide #4 of the conference presentation, he states that "Software components are Micro-Web-Services". Juval Löwy had similar precursor ideas about classes being granular services, as the next evolution of Microsoft architecture. "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 interfaces. 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 flexibility and improved simplicity by providing a platform to apply service-oriented architecture throughout your application environment". 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. 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. In this case, one can think of resource-oriented computing (ROC) as a generalized form of the Web abstraction. If in the Unix abstraction "everything is a file", in ROC, everything is a "Micro-Web-Service". 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.

Microservices is a specialization of an implementation approach for service-oriented architectures (SOA) used to build flexible, independently deployable software systems. The microservices approach is a first realisation of SOA that followed the introduction of DevOps and is becoming more popular for building continuously deployed systems.


Breaking Down Monoliths: Microservices vs. Self-Contained Systems
src: www.elastic.io


Philosophy

The philosophy of the microservices architecture essentially equates to the Unix philosophy of "Do one thing and do it well". It is described as follows:

  • The services are small - fine-grained to perform a single function.
  • The organization culture must embrace automation of testing and deployment. This eases the burden on management and operations and allows for different development teams to work on independently deployable units of code.
  • The culture and design principles must embrace failure and faults, similar to anti-fragile systems.
  • Each service is elastic, resilient, composable, minimal, and complete.

Microservices vs. Monolithic Architecture - Logz.io
src: logz.io


Linguistic approach

A linguistic approach to the development of microservices focuses on selecting a programming language that can easily represent a microservice as a single software artifact. A language well suited to microservices encourages the developer to think and program in terms of microservices from the start, instead of starting with a different programming paradigm only to refactor or retrofit a finished project so it can be deployed as a microservice. When effective, the gap between architecting a project and deploying it can be minimized.

One language intended to fill this role is Jolie. The simplicity of the Jolie programming language and its easy deployability also found applications in the area of Internet of Things and Smart Buildings where microservices are a suitable architectural choice.


Microservices with Spring
src: raw.githubusercontent.com


Technologies

Each microservice can be implemented in a different programming language and might use a different infrastructure. Therefore the most important technology choices are the way microservices communicate with each other (synchronous, asynchronous, UI integration) and the protocols used for the communication (REST, messaging, ...). In a traditional system most technology choices like the programming language impact the whole systems. Therefore the approach for choosing technologies is quite different.


The release of
src: matthiasnoback.nl


Criticism

The microservices approach is subject to criticism for a number of issues:

  • Services form information barriers
  • Inter-service calls over a network have a higher cost in terms of network latency and message processing time than in-process calls within a monolithic service process
  • Testing and deployment are more complicated
  • Moving responsibilities between services is more difficult. It may involve communication between different teams, rewriting the functionality in another language or fitting it into a different infrastructure
  • Viewing the size of services as the primary structuring mechanism can lead to too many services when the alternative of internal modularization may lead to a simpler design.

Cognitive load

The architecture introduces additional complexity and new problems to deal with, such as network latency, message formats, load balancing and fault tolerance.

The complexity of a monolithic application is only shifted into the network, but persists:

You can move it about but it's still there!

Also, an application made up of any number of microservices has to access its respective ecosystem, which may have unnecessary complexity. This kind of complexity can be reduced by standardizing the access mechanism. The Web as a system standardized the access mechanism by retaining the same access mechanism between browser and application resource over the last 20 years. Using the number of Web pages indexed by Google it grew from 26 million pages in 1998 to around 60 trillion individual pages by 2015 without the need to change its access mechanism. The Web itself is an example that the complexity inherent in traditional monolithic software systems can be overcome.

Nanoservices

Too-fine-grained microservices have been criticized as an anti-pattern, dubbed a nanoservice by Arnon Rotem-Gal-Oz:

[A] nanoservice is an anti-pattern where a service is too fine grained. [A] nanoservice is a service whose overhead (communications, maintenance etc.) outweighs its utility.

Problems include the code overhead (interface definition, retries), runtime overhead (serialization/deserialization, network traffic), and fragmented logic (useful functionality not implemented in one place, instead requiring combining many services).

Proposed alternatives to nanoservices include:

  • Package the functionality as a software library, rather than a service.
  • Combine the functionality with other functionalities, producing a more substantial, useful service.
  • Refactor the system, putting the functionality in other services or redesigning the system.

How to Design Microservices Architecture? Uber Architecture - A ...
src: i.ytimg.com


See also

  • Conway's law
  • Cross-cutting concern
  • DevOps
  • Fallacies of distributed computing
  • Representational state transfer (REST)
  • Service-oriented architecture (SOA)
  • Unix philosophy
  • Self-contained Systems
  • Serverless computing
  • Web-oriented architecture (WOA)

Microservices & Its Cousins â€
src: www.capgemini.com


References


Microservices: What's the utility infrastructure look like ...
src: garysmicroservices.files.wordpress.com


Further reading

  • Microservices - Definition, Principles and Benefits
  • S. Newman, Building Microservices - Designing Fine-Grained Systems, O'Reilly, 2015
  • E. Wolff, Microservices: Flexible Software Architecture, Addison-Wesley, 2016
  • E. Wolff, Microservices Primer: A Short Overview, Leanpub / Createspace, 2016
  • E. Wolff, Microservices - A Practical Guide, Leanpub / Createspace, 2018
  • E. Wolff, Microservices Recipes - Technology Overview, Leanpub / Createspace, 2017
  • I. Nadareishvili et al., Microservices Architecture - Aligning Principles, Practices and Culture, O'Reilly, 2016, http://transform.ca.com/rs/117-QWV-692/images/CA%20Technologies%20-%20OReilly%20Microservice%20Architecture%20eBook.pdf
  • C: Richardson, Microservice architecture pattern language http://microservices.io/
  • SEI SATURN 2015 microservices workshop, https://github.com/michaelkeeling/SATURN2015-Microservices-Workshop
  • Wijesuriya, Viraj Brian (2016-08-29) Microservice Architecture, Lecture Notes, University of Colombo School of Computing, Sri Lanka

Source of the article : Wikipedia

Comments
0 Comments