I am in awe of both Linux and Java.
- Linux for its ability to combine multiple commands into a super command.Writing a impromptu shell script with a for statement has become so handy here.
- Java is cool because of its wonderful ability to develop fast code and interact with multiple libraries thats available. Moreso, with large companies developing distributed software over Java with Hadoop etc.
The problem is Unix pipes communication is not available for Java. There are 2-3 different Inter-Process Communication Libraries available and a couple of Posix based communication libraries available. I have been having problems using them in my codeline.
What I need is:
cat <fileName> | java process | head
The java process is a high process intensive work. So, when the default 10 entries using head are displayed, the head sends a SIGKILL event notification to Java Process. Since Java does not capture this, the process is not killed, but keeps on going till the java process is complete which takes a while.
Let me contact the authors of some of these java lib developers, to see how we can get this going.
Take a look at this: http://tldp.org/LDP/tlk/ipc/ipc.html
Comments
Leave a comment Trackback