RMI in modern applications [closed]
Asked Answered
K

1

7

I'm studying computer science and this semester we started a project based on RMI in one of our courses. We were not allowed to choose the technique used. We make a simple client-server application for libraries where they can rent, reserve etc. books.

I remember that I once got told in another course that RMI is deprecated, but I do not remember the arguments.

So is RMI really deprecated and/or when should it be used and what are the modern alternatives?

Kindig answered 21/10, 2017 at 9:22 Comment(2)
No, RMI is not deprecated.Miltiades
Not only is it not deprecated, it is a foundation building block for every J2EE application on the planet. If you were told otherwise you were misinformed.Odlo
D
14

In the broadest sense, "RMI" is alive and well: there are many applications where one process exposes methods to be executed by another. The situation is slightly different when the term is used to mean the proprietary method of RMI that is built into the JVM, and has been around since the earliest days of Java. This method of RMI uses a protocol that is rather specific to Java, has no built-in support for propagating a transaction context or a security context, and is fiddly to route through firewalls. You can use the same RMI framework in Java with protocols like IIOP, which are language-agnostic and support transaction and security context propagation; but there are still problems with firewalls.

Traditional Java RMI is still widely used for remote management and monitoring, but I don't see it used much at the application level. It seems more popular these days to expose methods as web services, and invoke them using HTTP(S). There are frameworks for doing this in Java, and such services can be made language-independent.

Dallis answered 21/10, 2017 at 12:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.