Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am working on a Spring web application where I have a need to interact with a remotely based command-line java application to run a simple search query on this application and get back the results. I initially had integrated this into my Spring app but my app is, itself, needing a lot of memory (its an app that involves huge amounts of data) and I don't think they can coexist on one server anymore.

I am running everything on Amazon ec2 so the latency between the servers should be really low. I figure I could use a direct SSH connection but am not so sure if this is the best approach. I'd like to keep the command-line app I am interacting with as simple as possible (would rather not make it into a web-service if I don't have to). I'm still fairly new to Java so sorry if this sounds like a basic question.

like image 339
Rick Avatar asked Jul 26 '26 01:07

Rick


1 Answers

You have several options other than a web service. Some of them are:

  1. Protocol Buffers

  2. JMS

  3. Simple socket based client/server Java

  4. Thrift

like image 165
anubhava Avatar answered Jul 27 '26 16:07

anubhava



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!