Web
Comparison between REST and SOAP with HTTP
데먕
2019. 8. 23. 11:57
1. Overview
Let's analyze SOAP and Rest with protocols.
2. Comparison between SOAP and REST
SOAP | REST | |
History | SOAP(Simple Object Access Protocol) was created in 1998 by Dave Winer, Don Box, Bob Atkinson and Mohsen AIGhosein in collaboration with Microsoft | REST(Representational State Transfer) was Created in 2000 by Roy Thomas Fielding. Developed in an academic environment, this protocol embraces the philosophy of the open Web |
Concept | SOAP makes data available as services, E.g: getUserInfoamtion, getPayments, getBook, setCostomer | REST makes data available as resources, E.g: user, payments |
Services | Back-end Services | Front-end Services |
Media Type | SOAP, WS-* | JSON, XML, form-UML-encoded, custom |
Transports | HTTP, TCP, UDP, Queues, Web Sockets, custom | HTTP only |
Message Patterns | Request-reply, one-way, duplex | Request-reply only |
Cache | SOAP-based reads cannot be cached | REST-based reads can be cached. Performs and scales better |
Pros |
|
|
Cons |
|
|
Security | Support both SSL security and WS-security, which adds some enterprise security features. Supports identity through intermediaries, not just point to point SSL. | Supports only point-to-point SSL security |
ACID | Having comprehensive support for both ACID based transaction management for short-lived transactions and compensation based transaction management for long-running transactions. It also supports two-phase commit across distributed resources. | REST supports transactions, but it is neither ACID compliant nor can provide two-phase commit across distributed transactional resources as it is limited by its HTTP protocol. |
Used When |
|
|
Do not use When |
|
|
Commonly use for |
|
|
Real Example |
|
|
- Processing
- Architecture
- Transmission verification Architecture
3. References
https://searchapparchitecture.techtarget.com/definition/RESTful-API
https://searchapparchitecture.techtarget.com/definition/REST-REpresentational-State-Transfer
https://en.wikipedia.org/wiki/Representational_state_transfer
https://en.wikipedia.org/wiki/SOAP
https://liulyndon.blogspot.com/2017/08/mvc-rest-api-vs-soap-web-services.html