What's the alternative for Spring RMI? (since it's deprecated)

6.2k Views Asked by At

Spring seems to be deprecating its RMI:

As of Spring Framework 5.3, support for several remoting technologies is now deprecated for security reasons and broader industry support. Supporting infrastructure will be removed from Spring Framework for its next major release.

But I can't find any easy equivalent alternative to it. REST would sound like the best choice for simple stuff, but it does not cover solutions where the task is long running and/or a continuous flow of results is needed. So the implementation would be very absurdly painful with REST. Some consider submitting the tasks via REST to queues and then possibly querying for the results separately - but this sounds like an overkill and blows the amount of work needed to sky-high for something really simple that used to be available.

Is there a good alternative or some framework that uses the non-deprecated technologies and is officially available that deals with the above mentioned problems? When something is deprecated it usually indicates that something better is available that would be the better solution, so can somebody help me on educating me what it is?

2

There are 2 best solutions below

1
On

I have come across the same problem using Hessian. I think you still can make your own implementation. Spring only deprecates their own integrations to RMI technologies.

I think there are plenty of other technologies, but the message is clear. Spring will not make any own integrations.

I can think of these alternatives:

  • Hessian: still usable, but implement your own integration
  • gRPC
  • messaging (rabbit, pulsar, kafka, ...)
  • SOAP
0
On

Based on the spring documentation: https://docs.spring.io/spring-framework/docs/current/reference/html/integration.html#remoting-web-services

I can say, that probably these alternatives remain in future versions, but I did not try them:

  • Jax-WS
  • Spring Web Services
  • AMQP

I feel, that Spring Web Services is Spring's favorite. We will see when the 6.0 documentation is finished.