What are the benefits of switching legacy RPC-style services to REST?

I support an outdated application full of RPC style * web services. For example, we have the following services for creating and deleting users from the system:

Clients call these services by sending XML data through an HTTP POST. The XML request contains all the information the server needs to process the request (for example, authentication information, user information). The server then responds with an XML document containing any information the client should know about (for example, success / failure and description flags).

I am wondering what are the benefits of switching these RPC-style services to a more RESTful architecture. From what I read, this will mean the following:

  • To create users, clients will still need to send XML data via HTTP POST (or PUT, depending on whether they know the final URL and if they know all the necessary information for the user resource). However, authentication information will be transmitted in the HTTP headers using basic authentication .
  • To remove users, clients would send an HTTP DELETE call to https://example.com/users/ {user id}. Again, authentication information will be transmitted in the HTTP headers and not in the request body. As far as I know, no inquiry body should be needed.
  • Instead of specifying success / failure information in the XML document, the server should try to specify as much as possible using the status code / status code of the HTTP code.

, , RESTful:

- ? , RESTful .

* , " RPC", , XML-RPC SOAP.

+5
3

, , REST -, .

? ?

( , , ...) REST , HTTP-.

? ? .

, , (.. , , ..), REST, , , , .

POSTING POX (Plain Ol XML) ( JSON) HTTP, , .

HTTP, , , , .. , , API, .

, HTTP , REST . POX HTTP REST. ... POX HTTP.

SOAP XML-RPC... POX HTTP, XML SOAP ...

10- , REST , - .

.

Addenda:

, REST, - .

RPC, , .

, .

MS Windows Linux. Microsoft , MS Windows ( ) . .

, ​​Linux . , promises . Linux () , , - . , , , - .

Linux , . .

RPC. ( RPC), , .

, ( , ), .

, / , , . , , .

REST , (.. XML, ), HTTP- ( HTTP, REST-, ), HATEOS.

HATEOS, , , . .

- (), Amazon. , , " ", , URL . URL- , , -, . . .

, , " checkout" (.. "checkout" ), . , "http://amazon.com/checkout", .

, , , , , , , , , , , . , , , , , , Checkout.

- . "", " " (, HTML-, ?). -, , . , .

" , ?"

" , ".

- (, Amazon) RESTy, - , ( ) . - - -, , . .

, " , ", "", "mindset.

REST . , . , , .

, .

+12

...

REST... , , REST , - , . REST - .

REST " ", , . - , " ( ) ", , , , , , .

, , , , . Facebook, Twitter .. .

REST, , . - . REST - , , -.

, REST, , , , - .

+4

, , - soap-y, , REST .

, , " Fielding Thesis" Hypermedia-uber-alles REST - HTTP, RPC-like.

however, using the much simpler http and json-based protocols to provide RPC-apis, which Roy Fielding ridicules as not really REST, has some serious advantages. The complete SOAP-y web services package is a gigantic thing that carries a lot of stupid XML baggage left over from the idea that a web service is defined in terms of an arbitrarily complex XML document, and not as a set of logical parameters. Mere-RPC rest services avoid all this.

+2
source

All Articles