简体   繁体   中英

What's exactly a microservice in SOA

I've been trying to get my head around some SOA principles and I came across this page which describes a microservice in SOA:

http://soapatterns.org/design_patterns/micro_task_abstraction

Solution: Individual units of non-agnostic logic with specialized processing and deployment requirements are separated using the microservice model and abstracted into a microservice layer in which there is the architectural freedom to tailor environments in support of specialized service processing and deployment requirements.

What are exactly these specialized processing and deployment requirements?

And what's the key difference between a microservice and a taskservice in SOA? as they both appear to me none-agnostic and can be composited of other entity and utility services.

Service Oriented Achitecture (SOA) deals with defining services, design of what the services are meant to do, their interface , governance, service lifecycle, operational SLA's and "usage agreements" (these last two lead to a number of non-functional requirements), among others.

Microservices can be considered more of a development and deployment approach. If SOA is defined correctly (your interfaces are clean, designed with appropriate granularity, loosely coupled), it is easier for you to apply a microservices approach, subject to your technical platform. Once you have defined a service, your implementation considerations would include infrastructure, application servers, build and deployment mechanisms. A key defining feature of a microservice deployment model is that as much of the "stack" is self-contained within a single deployable unit (can be referred to as a container ).

Using a Java example, at the very least a microservice might be one service or function (exposed as Rest or SOAP) running in its own standalone JVM (bundled libraries, application/web server) which you can refer to as a container ( example here ). Contrast this with a more "traditional" approach where you might have one team managing the application server on which you might deploy multiple services or functions. The major benefit is you can avoid conflicting dependencies, your environment is fully in your control (effectively a few lines of code) and your service might perform more predictably as it has no interference from other services contending for the same resources (JVM threads, Data sources to name a few).

Specialised container management tools such as docker and associated scripting allow you to put together any required configuration you need from your environment.


Update 16/Jan/2018 Also note this paragraph on the distinction between SOA and Microservices as concepts. I translate it as: People didn't do SOA right so needed a new buzzword. True to an extent. However, you could also see the two as complementary concepts - SOA being more design heavy while microservices being a more deployment focused methodology.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM