Web service differences between REST and RPC

后端 未结 9 1283
情歌与酒
情歌与酒 2020-12-07 06:54

I have a web service that accepts JSON parameters and have specific URLs for methods, e.g.:

http://IP:PORT/API/getAllData?p={JSON}

This is

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 07:28

    REST is best described to work with the resources, where as RPC is more about the actions.

    REST stands for Representational State Transfer. It is a simple way to organize interactions between independent systems. RESTful applications commonly use HTTP requests to post data (create and/or update), read data (e.g., make queries), and delete data. Thus, REST can use HTTP for all four CRUD (Create/Read/Update/Delete) operations.

    RPC is basically used to communicate across the different modules to serve user requests. e.g. In openstack like how nova, glance and neutron work together when booting a virtual machine.

提交回复
热议问题