If I have a browser handling PHP application, a mobile backend in PHP and an API for the 2 of them, consider the request to log in.
In REST, all this logic would have to be duplicated in controllers in the browser PHP app and the mobile backend.
Not only would it be duplicated, the amount of calls needed is so much more than RPC.
REST.
Call 1 : Fetch user object by email address.
Call 2 : Fetch password by userId.
Call 3 : (If correct password) Change the last login time on user and save user.
That would all be done with one request in RPC. Loads of other examples where it takes 1 RPC call but takes 3+ REST api calls, not to mention duplicates code horribly across applications that have different authentication. The mobile backend uses OAuth and the browser uses PHP sessions.
I don't get why everyone hypes REST so much, it was the initial way I was taught to program, but then I started another job where they use RPC and it works so much better.
My question clearly puts forward different arguments and shows a different form of architecture. Don't just auto flag as a duplicate.