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.
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.
Is it common to have a RPC interface for more complex business logic intensive data manipulation and a REST like interface for the "rest".
Windows Communication Foundation (WCF) and gRPC are both implementations of the Remote Procedure Call (RPC) pattern. This pattern aims to make calls to services that run on a different machine, or in a different process, work seamlessly, like method calls in the client application.
The most fundamental difference between RPC and REST is that RPC was designed for actions, while REST is resource-centric. RPC executes procedures and commands with ease. Alternatively, REST is ideal for domain modeling and handling large quantities of data.
REST utilizes HTTP methods GET, POST, PUT, PATCH, and DELETE to perform CRUD operations. However, RPC only supports GET and POST requests. REST supports hypermedia which are hyperlinks included in the response to provide the client with links to other related resources whereas RPC does not.
RPC is the earliest, simplest form of API interaction. It is about executing a block of code on another server, and when implemented in HTTP or AMQP it can become a Web API.
What is REST? An architectural style for developing web services. A distributed system framework that uses Web protocols and technologies. What is WCF? It is a framework for building service-oriented applications. Using this, you can send data as asynchronous messages from one service endpoint to another.
Performance rankings were gRPC, WCF, .NET Core Web API and finally .NET Framework Web API. At first glance it seems very strange that WCF would out perform not only .NET Framework Web API (which was also the case in the Send operation) but also .NET Core Web API.
Most of the results confirmed the expectations that performance ranking would be gRPC, .NET Core Web API, .NET Framework Web API and finally WCF. The WCF data did exhibit a few unexpected and interesting results but nothing which convinced me that it wasn't the least performant overall.
In it the author (unnamed) found that the performance difference between gRPC and REST technologies became even more pronounced as the number of clients accessing the services increased. After reading this I decided to perform additional test runs where each set of operations was run on ten separate client instances simultaneously.
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.
Let's de-tangle a bit:
Is it common to have a RPC interface for more complex business logic intensive data manipulation and a REST like interface for the "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. 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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With