2

There seems to be a lot of hype around serverless computing these days and I try to understand what is the major difference between the remote procedure call framework?

As far as I am concerned - it is the same thing. You call a method or function on someone else machine.

Dzh
  • 195
  • 1
  • 7

2 Answers2

2

In basic way yes, it is the same. You're using some another resources in way they owners described.

RPC is one of protocols how you can access remote resources, defined in RFC 1831. Another protocol is ie. SOAP. In general RPC is quite old technology, that RFC was published in 1995.

FaaS is "business word" used to "rebranding" that old stuff like RPC and remote calls in general, because todays people and companies are willing to buy anything aaS. FaaS in generaly can use any protocol, they even can describe its own.

Using depends of your needs. If you need just to connect two of your services or prepare API for integration of 3rd party software, use RPC or some another standard.

Ondra Sniper Flidr
  • 2,623
  • 11
  • 18
  • You're missing the point that with serverless, someone is remotely invoking code that you write, without your having to manage the servers the code is running on. You can't do that by merely picking a protocol, regardless of which protocol it is. The protocol involved isn't the important part. The fact that someone else manages the servers your code runs on (including scaling the fleet and managing the trigger) is the important part. – Jeff Learman Sep 07 '16 at 16:36
  • But this question is not about serverless, it is about remote calls of code. RPC and FaaS both are used to call remote codes. From this point of view there is no different if code you're calling is managed by you or someone on different side of globe, no differents if you wrote that code or someone else. – Ondra Sniper Flidr Sep 08 '16 at 09:34
  • The question specifically mentions serverless. – Jeff Learman Sep 09 '16 at 00:01
  • Yes, but core of question is about differences between RPC and FaaS. From this point of view is serverless irrelevant. I can have RPC and FaaS on serverless infrastructure same as on real hardware. – Ondra Sniper Flidr Sep 09 '16 at 14:31
  • The difference between RPC and FaaS is that with RPC, you're running code on another machine that was already there (or you loaded it and started it etc.) So, it's either a standard RPC call, or else you own and manage the other machine and have loaded your software on it. With FaaS, you're running your code on a cloud service's provider's machine, in a secure container that you don't manage. Furthermore, FaaS can be triggered by lots of different events, whereas RPC can only happen from an RPC call. – Jeff Learman May 28 '20 at 16:46
-1

First, regarding "call a method or function on someone else's machine" -- that works only if the service you're calling is a standard one that resides on someone else's machine, or code someone else wrote and happens to be running on their machine. With Serverless, you write the code that runs on someone else's fleet of machines.

Furthermore, with RPC for a service you're creating (your own service), you need to manage the fleet of servers that runs the code that provides the RPC service. Calling code needs to know the hostname or IP address where the RPC service is running, and if it's a fleet, you need to manage load sharing of some kind. You need to estimate how many servers you need in the fleet, and pay for the excess when you're not using it, or handle the issues if it's not big enough. You need to manage the process that serves the RPC on the server fleet. You need to deploy it to the fleet with a Continuous Delivery strategy.

With Serverless, you just write the code, attach the trigger, and let the "serverless" service manage and allocate the resources to run it. (OK, you still have to manage a CD strategy!)

Furthermore, RPC is similar to only one type of Serverless invocation: direct ones, from the serverless API. In contrast, serverless invocations can be tied to events in the cloud, such as stores to a database or filesystem or queuing data on a queue. With RPC, you need to write the code to detect the event and invoke the RPC call. With Serverless, you configure it and let the system handle the details.

One might object to the term "serverless", since of course there is a server -- but it's a server (or actually, a fleet of servers) you don't need to know about or think about, and that's the point of the name.

For a great explanation, see http://martinfowler.com/articles/serverless.html

Jeff Learman
  • 198
  • 1
  • 1
  • 9