简体   繁体   English

RPC vs REST与WCF?

[英]RPC vs REST vs WCF?

Hello I'm currently working on a web application and I would like some of your help in using the correct way to implement my API. 您好我正在使用Web应用程序,我希望您能够使用正确的方法来实现我的API。

RPC is the way I've started implementing it because that was the most logical thing to do as a new web developer but I've been eyeing RESTful and WCF because they have been mentioned so many times in my research. RPC是我开始实现它的方式,因为作为一个新的Web开发人员,这是最合乎逻辑的事情,但我一直在关注RESTful和WCF,因为我的研究已经多次提到它们。

Is it common to have a RPC interface for more complex business logic intensive data manipulation and a REST like interface for the "rest". 具有用于更复杂的业务逻辑密集型数据操作的RPC接口和用于“休息”的类似REST的接口是常见的。

RPC is the way I've started implementing it because that was the most logical thing to do as a new web developer but I've been eyeing RESTful and WCF because they have been mentioned so many times in my research. RPC是我开始实现它的方式,因为作为一个新的Web开发人员,这是最合乎逻辑的事情,但我一直在关注RESTful和WCF,因为我的研究已经多次提到它们。

Let's de-tangle a bit: 让我们纠结一下:

  • RPC is a style of web service composition. RPC是一种Web服务组合的样式。
  • REST is a style of web service composition REST是一种Web服务组合方式
  • WCF is a technology stack which supports both RPC and REST styles WCF是一个支持RPC和REST样式的技术堆栈

Is it common to have a RPC interface for more complex business logic intensive data manipulation and a REST like interface for the "rest". 具有用于更复杂的业务逻辑密集型数据操作的RPC接口和用于“休息”的类似REST的接口是常见的。

At best, you could argue it's common to take complex and long running processes offline . 充其量,您可能会认为将复杂且长时间运行的进程脱机是很常见的。 Whether you do this using RPC or REST makes no difference. 无论您是使用RPC还是REST执行此操作都没有区别。 However, web services are generally a synchronous technology - although one way calls are supported this kind of semantic is better served by true asynchronous transport like message queues (which are also supported by WCF). 但是,Web服务通常是一种同步技术 - 尽管支持单向调用,但这种语义更好地通过消息队列(WCF也支持)等真正的异步传输提供服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM