1

On one box there is a running java server I create.

Another app allows me to call shell scripts to perform authentication function.

I'm looking for an efficient way to talk between the shell script and the java server app.

Obvious is launching another java app and using RMI, but this is not scalable to large numbers of calls.

Is there a good way to do this with pipes or sockets that doesn't require large initialization overhead?

3 Answers 3

1
  1. you could use named pipes on linux/unix for example.
  2. you could install redis and communicate via redis blocking list using jedis also on linux.
  3. or like you point out you could use/write sockets.
Sign up to request clarification or add additional context in comments.

Comments

1

If the shell you refer to is bash, you can redirect to the special tcp device:

echo "Wake Up, Java!" > /dev/tcp/localhost/[portnum]

Comments

0

Not quite enough information to tell if you are really going about it correctly. However, java EE has a message passing API to make communication between java processes easier.

Java Messaging Service

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.