Skip to content

RPC vs Messaging systems

April 21, 2012
tags:

RPC have:

Non-Local Exceptions
Indirect Memory Allocation
Blocking Calls
Static Interfaces (in strongly typed languages)

Enter Messaging. Messaging solves all of the above problems in one fell swoop, and if you decide to use a standard, like HTTP, for the connections then you can even talk to you messaging services via you browser or standard Unix command line tools like wget or curl.

 

The simplest example is if you have a scenario where you RPC->RPC->RPC, you end up having a call stack that’s 3 processes/machines deep. Any one of those processes/machine could fail during processing, and the entire stack unwinds.

If you were messaging, the actual connectivity between the processes is much less. You hand the message off, and you’re on your way. Now if one of the processes fail, there’s a good chance of it being restarted where it left off, since, typically, the message is still sitting on a queue somewhere waiting for a new process to fetch it. The overall time may be longer, but it’s a much more robust system.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: