I'm face to a big dilemm : in my company, we are working on microservices architecture and switching to a full SOA eco system.
Some consultants and developpers say it would be better to SOAP for web services, because it would allow to specify and give a validated format to all developer teams. I'm scared using SOAP we would be restricted at the end.
Based on your experience, for a SOA / Microservices architecture, would it be better to use SOAP or REST API ?
Thanks in advance for your helpful feedback.
REST approach can be used as well. Service contract, policies, versioning and other 'standard' SOA features can be also implemented with RESTful service.
SOA (service oriented architecture) is an architectural design approach that provides services to components through a communication protocol over a network. So, SOA is essentially a design pattern. And APIs can be used to implement SOA.
RESTful microservices are very scalable. SOAP is more suitable for enterprise systems and high-security systems, such as a banking system. security and high reliability is critical. Doesn't support error handling.
One of the most popular types of APIs for building microservices applications is known as “RESTful API” or “REST API.” REST API is a popular standard among developers because it uses HTTP commands, which most developers are familiar with and have an easy time using.
It's hard to choose an architecture style based on the information you provided in your question, as you don't explain the kinds of business requirements or constraints you have. Also you didn't explain what will be the use of those services.
I have been working with SOAP and REST for a while, I can tell you that both have adv/dis. But, instead of enumerating over those, I will try to give my reasons and scenarios in which I will choose one over the other.
REST
SOAP
Answering your question and thinking in a small/medium company trying to standardize the IT infrastructure, I would choose SOAP as it has more mature tool support in all areas. Personally, I like SOAP:fault messages, the RPC style for business operations that SOAP offers. Assuming that your microservices are not related to a specific field, I think have some kind of ESB could help you in managing the entire infrastructure and set your business rules. On occasion, people may think SOAP is over-engineering the solution. But, I go with the idea as it is a standard that has been in the market for a while.
Arguably the biggest benefit of a microservices architecture is the increase in speed with which you can roll out new features into production. In order to achieve that the microservices should be as much as possible independent from each other. WSDL-contracts have the tendency to result in a tighter coupling in comparison with REST-contracts. From this perspective it makes a lot of sense to opt for REST. But it all depends on the goals that you did want to accomplish when you decided to go for a microservices or a SOA architecture.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With