WHAT IS MICROSERVICES
Ashish Ranjan
IT Recruiter- Talent Acquisition || B.TECH(EEE) || Tech & Non-Tech Hiring || Leadership Hiring || Corporate Hiring
In?software engineering, a?microservice?architecture is a variant of the?service-oriented architecture?structural style. It is an?architectural pattern?that arranges an application as a collection of?loosely coupled,?fine-grained?services, communicating through?lightweight protocols. One of its goals is that teams can develop and?deploy?their services independently of others. This is achieved by the reduction of several?dependencies?in the code base, allowing for developers to evolve their services with limited restrictions from users, and for additional complexity to be hidden from users.[1]?As a consequence, organizations are able to develop software with fast growth and size, as well as use off-the-shelf services more easily. Communication requirements are reduced. These benefits come at a cost to maintaining the decoupling. Interfaces need to be designed carefully and treated as a public?API. One technique that is used is having multiple interfaces on the same service, or multiple versions of the same service, so as to not disrupt existing users of the code.
Introduction[edit]
There is no single definition for microservices. A consensus view has evolved over time in the industry. Some of the defining characteristics that are frequently cited include:
A microservice is not a layer within a monolithic application (example, the web controller, or the backend-for-frontend).[8]?Rather, it is a self-contained piece of business functionality with clear interfaces, and may, through its own internal components, implement a layered architecture. From a strategical perspective, microservice architecture essentially follows the?Unix philosophy?of "Do one thing and do it well".[9]?Martin Fowler?describes a microservices-based architecture as having the following properties:[2]
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.[13]?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.[14]?With microservices, only the microservice supporting the function with resource constraints needs to be scaled out, thus providing resource and cost optimization benefits.[15]
领英推荐
History[edit]
There are numerous claims as to the origin of the term microservices. Whilst vice president of?ThoughtWorks?in 2004,?Fred George?began working on prototype architectures based on what he called the "Baysean Principles" named after Jeff Bay.[16]
As early as 2005, Peter Rodgers introduced the term "Micro-Web-Services" during a presentation at the Web Services Edge conference. Against conventional thinking and at the height of the?SOAP?SOA architecture hype curve he argued for "REST-services" and on slide #4 of the conference presentation, he discusses "Software components?are Micro-Web-Services".[17]?He goes on to say "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.[18]
Rodgers' work originated in 1999 with 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.[19]?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 2007, Juval L?wy in his writing[20]?and speaking[21][22]?called for building systems in which every class was a service. L?wy realized this required the use of a technology that can support such granular use of services, and he extended?Windows Communication Foundation (WCF)?to do just that,[23][24]?taking every class and treating it as a service while maintaining the conventional programming model of classes.
In 2005?Alistair Cockburn?wrote about?Hexagonal architecture (software)?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.
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.[25]?In May 2012, the same group decided on "microservices" as the most appropriate name. James Lewis pr