rest - Can Restful web service contain functions -
i new web-services. understood restful services method achieve distributed computing. know rmi method achieve along many other technologies such soap. question is, see admiration restful web service in internet. know restful can contains states of objects. can't contain functions. not it? have got wrong? how strong achieve distributed computing. why better rmi or soap then?
the basis of rest resources - not confused 'objects' - , verbs. "resource" has uri, , "post" verb explicitely meant used submit data processed, without defining "processing" consists in:
the post method requests the target resource process representation enclosed in request according resource's own specific semantics
https://tools.ietf.org/html/rfc7231#section-4.3.3 (emphasis mine)
the rfc quite states successful post doesn't have result in creation of new resource:
if 1 or more resources has been created on origin server result of processing post request (...)
note "if"...
iow it's legal have resource goal either run computation , return result without creating new resource (actually should use request fwiw, cf search engines etc) or launch business process or whatever possibly change application's state 1 way or another.
as "why better rmi or soap", try implement soap service , soap client , you'll find out there's lot of overhead implied don't buy more can plain rest api.
wiki
Comments
Post a Comment