Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RPC vs. ServiceBus Style SOA

What would be the pros and cons of these architectures?

  1. By RPC I meant remote procedure call services like WCF, WebServices etc.

  2. Then on the other side, there's the more message oriented frameworks such as MSMQ, NServiceBus, ServiceStack etc.

  3. 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.

like image 300
Alwyn Avatar asked Jun 26 '13 18:06

Alwyn


People also ask

When should you use RPC?

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.

What is the difference between RPC and web services?

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.

What are the advantages of messaging over RPC?

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.

What is RPC example?

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.


1 Answers

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.

like image 115
mythz Avatar answered Oct 18 '22 16:10

mythz