Reputation: 91
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.
Upvotes: 9
Views: 10508
Reputation: 19543
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.
Upvotes: 11
Reputation: 1437
With the evolution of standards such as RAML and Swagger to define the REST APIs, the difference between SOAP and REST web services is narrowing. If the focus is on exposing APIs as the earlier answerer mentioned, REST is a better choice as there are plenty of lightweight API management products that support this.
Upvotes: 0
Reputation: 131
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.
Upvotes: 3