What would be the pros and cons of these architectures?
By RPC I meant remote procedure call services like WCF, WebServices etc.
Then on the other side, there's the more message oriented frameworks such as MSMQ, NServiceBus, ServiceStack etc.
Then there is the hybrid approach such as WebAPI, which is some sort of a remote Active Record Pattern (Out of the box it only supports a very limited number of verbs such as "Get", "Put" "Post" etc.).
Disregarding, how it's actually implemented (aka. I don't really care about durability, transaction etc. because all that can be implemented regardless of the abstraction), what would be the benefits and drawbacks of these abstractions?
Again, no low level implementation details please, I just want the difference in terms of sound architecture, best patterns and practices, or even circumstances that would be most appropriate to employ each and why.
Remote Procedure Call is a software communication protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network's details. RPC is used to call other processes on the remote systems like a local system.
RPC allows for the processing of multiple threads that share a given address. RPC employed on a platform that uses EJB. Web Service used in non-Java platforms when an app wants access. Web Service also is used for synchronization of asynchronous communication.
Load in messaging systems Systems built on message queues don't do load shedding like RPC systems because they have storage on disk to store incoming requests as they come in. This makes a queue-based system more resilient under a higher load than an RPC system.
Other examples of the use of RPC in experiments at CERN include: remote monitoring program control, remote FASTBUS access, remote error logging, remote terminal interaction with processors in VMEbus, the submission of operating system commands from embedded microprocessors, and many less general functions.
The only benefit of RPC is that it looks familiar and gives developers the illusion that a service call looks and acts just like a normal method call.
Otherwise RPC method signatures are tightly-coupled, fragile and brittle and ties the contract of your service to its single server implementation. Here's an earlier answer comparing the same WCF and Web API RPC services re-written in a message-based service.
For background reading I've described the differences between RPC vs Message based services in the WCF vs ServiceStack interview on InfoQ as well as what a message-based service is and their many advantages.
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