Spring / Java, a good method for remotely interacting with Java command line applications on another server?

I am working on a Spring web application where I need to interact with a remote Java command line application to run a simple search query in that application and return the results. I originally integrated this into my Spring application, but my application alone needs a lot of memory (this is an application that includes a huge amount of data), and I don't think that they can coexist on the same server anymore.

I run everything on Amazon ec2, so the latency between the servers should be really low. I believe I can use a direct SSH connection, but I'm not sure if this is the best approach. I would like the command-line application with which I am interacting to be as simple as possible (most likely, it would not turn into a web service if I do not need it). I'm still pretty new to Java, so sorry if that sounds like a basic question.

+3
source share
2 answers

You have several options besides the web service. Some of them:

+2
source

Assuming you have or maybe spring at both ends -

Spring . (RmiServiceExporter )

/.

hello Java . "" -.

( rmi, , rmi , . , SO ?;))

0

All Articles