![]() ![]() You would then have to call this multiple times, once for each item, in order to get your data. The REST developer would be concerned that his URI would become too long so he would define a GET method that would take a single item as parameter. The SOAP developer would define a method that would allow you retrieve the information for one or as many items as you like. Let's imagine a service that allows you to request informational data for thousands of different items. I feel this point if sometimes overlooked when hyping REST. REST doesn't really have a (good) answer for the situation where the request data may become large. For those types of services, you probably want to go with something like Apache Thrift, 0MQ, or the myriad of other binary RPC protocols. My personal opinion is that neither SOAP, nor REST (by REST I mean HTTP-based REST services) are appropriate for services requiring high throughput and low-latency. You can find work arounds for either SOAP's or REST's performance issues. However, I think that these are mostly minor issues when comparing SOAP and REST based services. TLS is much faster than using application level security mechanisms such as WS Security (WS Security also suffers from security flaws). ![]() ![]() REST applications typically use TLS or other session layer security mechanisms. ![]() Security is another key performance concern. This was fixed with version 1.2 with the introduction of GET bindings, however this may be an issue if using the older version or not using the appropriate bindings. The SOAP 1.1 binding only defines the use of the POST verb. While SOAP uses HTTP, it does not take advantage HTTP's supporting infrastructure. One thing the other answers seem to overlook is REST support for caching and other benefits of HTTP. (JSON and REST do have similar stuff coming but the tool support is far behind) Moreover, XML as representation has schemas and validators, which in some cases may be a key issue. For example, consultants love it because they can use tools to define the interface and generate the wsdl file and developers love it because they can use another set of tools to generate all the networking code from that wsdl file. RESTful interfaces tend to be a bit more "chatty", so depending on your domain and how you design your resources, you may end up doing more HTTP requests. However, couple of things to consider (since you asked 'what will you lose?'): So, not only your server becomes leaner but the client too. Also, it (in my opinion) will make your interface easier to consume for your clients. In short, I would say 'yes', you'll be more performant with REST. Furthermore if you encode your representations in JSON (as opposed to XML), you'll save many more bytes. So, if your service runs on top of HTTP anyway, you can't get much leaner than REST. bandwidth), REST has much better performance. If you mean the performance of the network (i.e. Anyway, the performance difference itself is not that big, but RESTful service is more easy to scale up since you don't have any server side sessions. Usually SOAP brings with it a stack of different (generated) handlers and parsers. If you mean the load of the server, REST has a bit better performance because it bears minimal overhead on top of HTTP. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |