A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.wikipedia.org/wiki/Microservices below:

Microservices - Wikipedia

From Wikipedia, the free encyclopedia

Collection of loosely coupled services used to build computer applications

In software engineering, a microservice architecture is an architectural pattern that organizes an application into a collection of loosely coupled, fine-grained services that communicate through lightweight protocols. This pattern is characterized by the ability to develop and deploy services independently, improving modularity, scalability, and adaptability. However, it introduces additional complexity, particularly in managing distributed systems and inter-service communication, making the initial implementation more challenging compared to a monolithic architecture.[1]

There is no single, universally agreed-upon definition of microservices. However, they are generally characterized by a focus on modularity, with each service designed around a specific business capability. These services are loosely coupled, independently deployable, and often developed and scaled separately, enabling greater flexibility and agility in managing complex systems. Microservices architecture is closely associated with principles such as domain-driven design, decentralization of data and governance, and the flexibility to use different technologies for individual services to best meet their requirements. [2][3][4]

It is common for microservices architectures to be adopted for cloud-native applications, serverless computing, and applications using lightweight container deployment. According to Fowler, because of the large number (when compared to monolithic application implementations) of services, decentralized continuous delivery and DevOps with holistic service monitoring are necessary to effectively develop, maintain, and operate such applications.[5] A consequence of (and rationale for) following this approach is that the individual microservices can be individually scaled. In the monolithic approach, an application supporting three functions would have to be scaled in its entirety even if only one of these functions had a resource constraint.[6] With microservices, only the microservice supporting the function with resource constraints needs to be scaled out, thus providing resource and cost optimization benefits.[7]

In February 2020, the Cloud Microservices Market Research Report predicted that the global microservice architecture market size will increase at a CAGR of 21.37% from 2019 to 2026 and reach $3.1 billion by 2026.[8]

Cell-based architecture in microservices[edit]

Cell-based architecture is a distributed computing design in which computational resources are organized into self-contained units called cells. Each cell operates independently, handling a subset of requests while maintaining scalability, fault isolation, and availability. [2][9][10]

A cell typically consists of multiple microservices and functions as an autonomous unit. In some implementations, entire sets of microservices are replicated across multiple cells, enabling requests to be rerouted to another operational cell if one experiences a failure. This approach is intended to improve system-wide resilience by limiting the impact of localized failures. [2][9][10]

Some implementations incorporate circuit breakers within and between cells. Within a cell, circuit breakers may be used to mitigate cascading failures among microservices, while inter-cell circuit breakers can isolate failing cells and redirect traffic to those that remain operational. [2][9][10]

Cell-based architecture has been adopted in certain large-scale distributed systems where fault isolation and redundancy are design priorities. Its implementation varies based on system requirements, infrastructure constraints, and specific operational goals. [2][9][10]

In 1999, software developer Peter Rodgers had been working on the Dexter research project at Hewlett Packard Labs, whose aim was to make code less brittle and to make large-scale, complex software systems robust to change.[11] Ultimately this path of research led to the development of resource-oriented computing (ROC), a generalized computation abstraction in which REST is a special subset. In 2005, during a presentation at the Web Services Edge conference, Rodgers argued for "REST-services" and stated that "Software components are Micro-Web-Services... Micro-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 microservices platform "applies the underlying architectural principles of the Web and REST services together with Unix-like scheduling and pipelines to provide radical flexibility and improved simplicity in service-oriented architectures.[12]

Also in 2005, Alistair Cockburn wrote about hexagonal architecture which is a software design pattern that is used along with the microservices. This pattern makes the design of the microservice possible since it isolates in layers the business logic from the auxiliary services needed in order to deploy and run the microservice completely independent from others.

Microservice granularity[edit]

Determining the appropriate level of (micro)service granularity in a microservices architecture often requires iterative collaboration between architects and developers. This process involves evaluating user requirements, service responsibilities, and architectural characteristics, such as non-functional requirements. Neal Ford highlights the role of integrator and disintegrator factors in this context. Integrator factors, such as shared transactions or tightly coupled processes, favor combining services, while disintegrator factors, such as fault tolerance or independent scalability, encourage splitting services to meet operational and architectural goals. Additionally, fitness functions, as proposed by Neal Ford, can be used to validate architectural decisions and service granularity by continuously measuring system qualities or behaviors that are critical to stakeholders, ensuring alignment with overall architectural objectives. [13][14]

Mapping microservices to bounded contexts[edit]

A bounded context, a fundamental concept in domain-driven design (DDD), defines a specific area within which a domain model is consistent and valid, ensuring clarity and separation of concerns. [15] In microservices architecture, a bounded context often maps to a microservice, but this relationship can vary depending on the design approach. A one-to-one relationship, where each bounded context is implemented as a single microservice, is typically ideal as it maintains clear boundaries, reduces coupling, and enables independent deployment and scaling. However, other mappings may also be appropriate: a one-to-many relationship can arise when a bounded context is divided into multiple microservices to address varying scalability or other operational needs, while a many-to-one relationship may consolidate multiple bounded contexts into a single microservice for simplicity or to minimize operational overhead. The choice of relationship should balance the principles of DDD with the system's business goals, technical constraints, and operational requirements. [16]

The benefit of decomposing an application into different smaller services are numerous:

Criticism and concerns[edit]

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

The architecture introduces additional complexity and new problems to deal with, such as latency, message format design,[34] backup/availability/consistency (BAC),[35] load balancing and fault tolerance.[36] All of these problems have to be addressed at scale. The complexity of a monolithic application does not disappear if it is re-implemented as a set of microservices. Some of the complexity gets translated into operational complexity.[37] Other places where the complexity manifests itself are increased network traffic and resulting in slower performance. Also, an application made up of any number of microservices has a larger number of interface points to access its respective ecosystem, which increases the architectural complexity.[38] Various organizing principles (such as hypermedia as the engine of application state (HATEOAS), interface and data model documentation captured via Swagger, etc.) have been applied to reduce the impact of such additional complexity.

Microservices are susceptible to the fallacies of distributed computing, a series of misconceptions that can lead to significant issues in software development and deployment. [13]

Code sharing challenges[edit]

Ideally, microservices follow a "share-nothing" architecture. However, in practice, microservices architectures often encounter situations where code must be shared across services. Common approaches to addressing this challenge include utilizing separate shared libraries for reusable components (e.g., a security library), replicating stable modules with minimal changes across services, or, in certain cases, consolidating multiple microservices into a single service to reduce complexity. Each approach has its advantages and trade-offs, depending on the specific context and requirements. [39]

According to O'Reilly, each microservice should have its own architectural characteristics (a.k.a. non functional requirements), and architects should not define uniform characteristics for the entire distributed system.[13]

Computer microservices can be implemented in different programming languages and might use different infrastructures. 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 (RESTful HTTP, messaging, GraphQL ...). In a traditional system, most technology choices like the programming language impact the whole system. Therefore, the approach to choosing technologies is quite different.[40]

The Eclipse Foundation has published a specification for developing microservices, Eclipse MicroProfile.[41][42]

In a service mesh, each service instance is paired with an instance of a reverse proxy server, called a service proxy, sidecar proxy, or sidecar. The service instance and sidecar proxy share a container, and the containers are managed by a container orchestration tool such as Kubernetes, Nomad, Docker Swarm, or DC/OS. The service proxies are responsible for communication with other service instances and can support capabilities such as service (instance) discovery, load balancing, authentication and authorization, secure communications, and others.

  1. ^ Fowler, Martin (2002). Patterns of Enterprise Application Architecture. Addison-Wesley Professional. ISBN 978-0321127426.
  2. ^ a b c d e Newman, Sam (2015-02-20). Building Microservices. O'Reilly Media. ISBN 978-1491950357.
  3. ^ Wolff, Eberhard (2016-10-12). Microservices: Flexible Software Architectures. Addison-Wesley. ISBN 978-0134602417.
  4. ^ Nadareishvili, I., Mitra, R., McLarty, M., Amundsen, M., Microservice Architecture: Aligning Principles, Practices, and Culture, O'Reilly 2016
  5. ^ Martin Fowler (28 August 2014). "Microservice Prerequisites". Archived from the original on Oct 3, 2023.
  6. ^ Richardson, Chris (November 2018). Microservice Patterns. Manning Publications. 1.4.1 Scale cube and microservices. ISBN 9781617294549.
  7. ^ Mendonca, Nabor C.; Jamshidi, Pooyan; Garlan, David; Pahl, Claus (2019-10-16). "Developing Self-Adaptive Microservice Systems: Challenges and Directions". IEEE Software. 38 (2): 70–79. arXiv:1910.07660. doi:10.1109/MS.2019.2955937. S2CID 204744007.
  8. ^ Research, Verified Market. "Cloud Microservices Market 2020 Trends, Market Share, Industry Size, Opportunities, Analysis and Forecast by 2026 – Instant Tech Market News". Retrieved 2020-02-18.
  9. ^ a b c d Richardson, Chris (2019). Microservices patterns: with examples in Java. Shelter Island, NY: Manning Publications. ISBN 978-1-61729-454-9.
  10. ^ a b c d Christudas, Binildas (2019). Practical Microservices Architectural Patterns: Event-Based Java Microservices with Spring Boot and Spring Cloud. Berkeley, CA: Apress L. P. ISBN 978-1-4842-4501-9.
  11. ^
  12. ^ Rodgers, Peter (Feb 15, 2005). "Service-Oriented Development on NetKernel- Patterns, Processes & Products to Reduce System Complexity". CloudComputingExpo. SYS-CON Media. Archived from the original on 20 May 2018. Retrieved 19 August 2015.
  13. ^ a b c Fundamentals of Software Architecture: An Engineering Approach. O'Reilly Media. 2020. ISBN 978-1492043454.
  14. ^ Building Evolutionary Architectures: Support Constant Change. O'Reilly Media. 2017. ISBN 978-1491986363.
  15. ^ Fundamentals of Software Architecture: An Engineering Approach. O'Reilly Media. 2020. ISBN 978-1492043454.
  16. ^ Building Microservices by Sam Newman. ISBN 978-1492034025.
  17. ^ a b Chen, Lianping (2018). Microservices: Architecting for Continuous Delivery and DevOps. The IEEE International Conference on Software Architecture (ICSA 2018). IEEE.
  18. ^ Yousif, Mazin (2016). "Microservices". IEEE Cloud Computing. 3 (5): 4–5. doi:10.1109/MCC.2016.101.
  19. ^ Dragoni, Nicola; Lanese, Ivan; Larsen, Stephan Thordal; Mazzara, Manuel; Mustafin, Ruslan; Safina, Larisa (2017). "Microservices: How to Make Your Application Scale" (PDF). Perspectives of System Informatics. Lecture Notes in Computer Science. Vol. 10742. pp. 95–104. arXiv:1702.07149. Bibcode:2017arXiv170207149D. doi:10.1007/978-3-319-74313-4_8. ISBN 978-3-319-74312-7. S2CID 1643730.
  20. ^ Newman, Sam (2015). Building Microservices. O'Reilly. ISBN 978-1491950357.
  21. ^ Wolff, Eberhard (2016). Microservices: Flexible Software Architecture. Addison Wesley. ISBN 978-0134602417.
  22. ^ Knoche, Holger; Hasselbring, Wilhelm (2019). "Drivers and Barriers for Microservice Adoption – A Survey among Professionals in Germany". Enterprise Modelling and Information Systems Architectures. 14: 1:1–35–1:1–35. doi:10.18417/emisa.14.1.
  23. ^ a b Taibi, Davide; Lenarduzzi, Valentina; Pahl, Claus; Janes, Andrea (2017). "Microservices in agile software development: A workshop-based study into issues, advantages, and disadvantages". Proceedings of the XP2017 Scientific Workshops. pp. 1–5. doi:10.1145/3120459.3120483. ISBN 978-1-4503-5264-2. S2CID 28134110.
  24. ^ Richardson, Chris. "Microservice architecture pattern". microservices.io. Retrieved 2017-03-19.
  25. ^ Chen, Lianping; Ali Babar, Muhammad (2014). "Towards an Evidence-Based Understanding of Emergence of Architecture through Continuous Refactoring in Agile Software Development". Proceedings Working IEEE/IFIP Conference on Software Architecture 2014 WICSA 2014. The 11th Working IEEE/IFIP Conference on Software Architecture(WICSA 2014). IEEE. doi:10.1109/WICSA.2014.45.
  26. ^ Balalaie, Armin; Heydarnoori, Abbas; Jamshidi, Pooyan (May 2016). "Microservices Architecture Enables DevOps: Migration to a Cloud-Native Architecture" (PDF). IEEE Software. 33 (3): 42–52. doi:10.1109/ms.2016.64. hdl:10044/1/40557. ISSN 0740-7459. S2CID 18802650.
  27. ^ Stenberg, Jan (11 August 2014). "Experiences from Failing with Microservices".
  28. ^ a b Martin Fowler. "Microservices". Archived from the original on 14 February 2018.
  29. ^ Calandra, Mariano (7 April 2021). "Why unit testing is not enough when it comes to microservices".
  30. ^ Lanza, Michele; Ducasse, Stéphane (2002). "Understanding Software Evolution using a Combination of Software Visualization and Software Metrics" (PDF). Proceedings of LMO 2002 (Langages et Modèles à Objets): 135–149. Archived from the original (PDF) on Feb 27, 2021.
  31. ^ Richardson, Chris (November 2018). "Chapter 4. Managing transactions with sagas". Microservice Patterns. Manning Publications. ISBN 978-1-61729454-9.
  32. ^ Devoxx (Aug 30, 2017). "10 Tips for failing badly at Microservices by David Schmitz". YouTube. Archived from the original on Apr 22, 2021.
  33. ^ a b c Löwy, Juval (2019). Righting Software 1st ed. Addison-Wesley Professional. pp. 73–75. ISBN 978-0136524038.
  34. ^ Pautasso, Cesare (2017). "Microservices in Practice, Part 2: Service Integration and Sustainability". IEEE Software. 34 (2): 97–104. doi:10.1109/MS.2017.56. S2CID 30256045.
  35. ^ Pautasso, Cesare (2018). "Consistent Disaster Recovery for Microservices: the BAC Theorem". IEEE Cloud Computing. 5 (1): 49–59. doi:10.1109/MCC.2018.011791714. S2CID 4560021.
  36. ^ "Developing Microservices for PaaS with Spring and Cloud Foundry".
  37. ^ Fowler, Martin. "Microservice Trade-Offs".
  38. ^ "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 ill-understood model definitions, 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".
  39. ^ a b c d e Richards, Mark. Microservices AntiPatterns and Pitfalls. O'Reilly.
  40. ^ Wolff, Eberhard (2018-04-15). Microservices - A Practical Guide. CreateSpace Independent Publishing Platform. ISBN 978-1717075901.
  41. ^ Swart, Stephanie (14 December 2016). "Eclipse MicroProfile". projects.eclipse.org.
  42. ^ "MicroProfile". MicroProfile. Retrieved 2021-04-11.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4