Reputation: 609
My understanding is that both in SOA and in Microservices modules should be independant and reusable. But what really distinguishes the two?
Upvotes: 10
Views: 5219
Reputation: 439
I tend to agree with Chris Richardson's[1] definition.
3 main areas where SOA and micro services diverge:
Inter process communication
SOA:
Smart pipes eg. ESB
Protocols - SOAP, WS*
Micro service:
Dumb pipes eg. Message broker
Protocols eg. REST, gRPC
Database
SOA:
Shared databases
Micro Service:
Databases per service
Services tend to be monolith in SOA whereas small in nature as micro services.
[1]: https://microservices.io/index.html
Upvotes: 2
Reputation: 4146
The difference between them (from real-life production project) is that SOA project has ESB (like Mule ESB, Camel or other) which intended to route messages (SOAP, JSON etc) from one service to another, and acts like a mediation layer between services. Services in turn, does not know about each other and just send\receive messages from ESB.
In opposite to SOA, microservice architecture implies that services will communicate with each other directly, using some protocol (usually HTTP). Microservices similar to SOA in that we focus on business functionality and separate it into single, small deployable chunk.
Upvotes: 0
Reputation: 41
SOA and microservices have much in common and at first sight, it seems that the latter is just a new hyped buzzword for what SOA has already described. Yet, there are some differences between both.
What are Microservices?
Let´s first look at what a microservice is. Although there is no common definition for what a microservice is, there are a couple of common characteristics that definitions of microservices share. Those are:
What is Service Oriented Architecture (SOA)?
SOA, which stands for Service Oriented Architecture, is a software architecture style where generic services are provided to other components in the same architecture that provide more complex services based on the shared generic services. In the end, it is similar to a company´s shared services center.
Let´s imagine the following situation: A company that is operating in different countries has no shared services center at the moment. Therefore, basic HR and Finance activities, such as payroll and accounting are done individually in every country. By implementing a shared services center, the company can send all requests related to those activities to one single point of contact where the activities are executed. When the task is finalized, the results are sent back to the individual country. The individual countries then use the results, adapt them to country rules or their individual workforce and provide an additional, more sophisticated, or more individual service to their customers. SOA works in a very similar way. It allows to extract basic services from individual applications and bundles them in a shared services module instead. This shared services module then executes the tasks and provides the results back to the individual applications, which use them further.
So let´s investigate what SOA and microservices have in common and what not.
What do Microservices and SOA have in Common?
Both enable an integration into the wider IT – in contrast to monolithic systems that have no integration outside their own boundaries. A monolithic system can be the better option in areas where security is highly important or where there are no synergies with other systems expected, however, with the broad adoption of cloud technology and the required scalability, integrated systems are usually the preferred solution for architects Both try to identify independent pieces of software that can be applied in different contexts and environments. SOA does this with the help of services that deliver information from one to another system and microservices do this with APIs that provide standardized interfaces for communication SOA can have very different scopes, from very small to very big. Unlike the name suggests, this is also true for microservices, which can be just the authentication of a user at a service or the full purchase process behind your e-commerce basket
What are the Differences Between Microservices and SOA?
The objective of SOA is to design systems as a set of loosely coupled services that enable the integration of applications. On the contrary, microservices have the objective to work on different platforms and in different environments that emerged due to the manifold cloud environments and mobile solutions that require to work on different operating systems. SOA is not dynamic and cannot fit for different purposes. They must be adapted or redeveloped every time a critical architecture piece of the involved technology changes. On the contrary, microservices try to be more independent by building on standardized interfaces that are valid across different technologies. However, there are often different standards, which can in the end lead to the same challenge that SOA has. SOA typically shares fundamental components across different services. On the contrary, microservices usually have everything they need within the service, duplicated in every single microservice. Microservices are hence a bit slower, but less dependent on underlying services in order to work.
SOA and microservices are quite similar concepts. Some might also argue that microservices are a particular type of SOA. In the end, SOA and microservices both have their purposes. SOA helps to interconnect large enterprise systems (e.g. an HR or ERP system) so that they can communicate and interchange data. In contrast to that, microservices have the goal to work in different environments and independent from those environments, such as on web-based systems, operating systems, or cloud environments.
Upvotes: 1
Reputation: 5161
Microservices Architecture is not an invention. Enterprises such as Amazon, Netflix, and eBay used the divide and conquer strategy to functionally partition their monolithic applications into smaller units, and resolved many issues. Following the success of these companies, many other companies started adopting this as a common pattern to refactor their applications. Eventually the pattern was termed as Microservices Architecture. Nothing radically new has been introduced in MSA. MSA is the logical evolution of SOA and supports modern business use cases.
Microservices vs SOA: How Are They Different?
Upvotes: 6
Reputation: 425
Both rely on the services as the main component but a lot of differences there. Few are below
SOA:
MicroService:
Follows “share-as-little-as-possible” architecture approach
Uses lightweight protocols such as HTTP/REST & AMQP
Single-threaded usually with use of Event Loop features for non-locking I/O handling
More focused on decoupling
Strong focus on DevOps / Continuous Delivery
Upvotes: 14