when looking at gRPC, SOAP and REST neither of them use a naming service or registry. I was wondering why that is? what are the advantages to using a registry and what alternative do they use?
RMI means remote method invocation. It is an OO-oriented approach and can only call methods on an object. The system doesn't have any way to call a bare function or a "class method" (a.k.a., static method). It is "OO all the way."
But that means you need a way to get the first object reference so that you can start calling methods and get other objects. That is solved by a registry.
gRPC and SOAP are both RPC-style message passing (just data; no objects) which can have something similar to a class method, by just choosing not to pass an object name. REST is functionally much more similar to RPC than something like RMI, and also passes around data.
REST has "references" to "objects" like https://example.com/orders/1234, but you can still call https://example.com/orders to get the list of orders. In an RMI system you'd need to get a reference to an instance of OrderManager and query it for the system's orders.
RMI is like DCOM, CORBA, Android Binder, and D-Bus. You might find my CloudNativeCon 2019 talk on the subject useful. (I start talking about what makes a reference special earlier in the talk with Unix Domain Socket.) It was a goal of the talk to help people understand how dramatically different RMI is from RPC. Modeling objects in the communication system changes the system substantially, introducing interfaces, type checking for casts, and garbage collection. In my mind, the registry is the least important of the changes, although it is the most visible.
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