I am a newbie here and am planning to write a logviewer node.js app . My idea is to login to multiple linux servers at once ( via ssh) and do a grep on few different types of logs in each server and display the results, server wise on a page. I am not sure if this is a good use case for using node.js . Icould write some shell scripts to do the same but wat to take the node.js approach. Could you please guide me if this is the right path for the scenerio im thinking of?
Given that you are going to use SSH to the remote servers to collect the information you need, some concerns arise:
* Once you are SSH'ed in, you are now stringing a bunch of shell commands together to generate the data. Your code is going to have a lot of these long quoted strings, and that part is not going to be JavaScript.
* Node’s extreme async (0.10 and earlier) will/might grow tiring. There are ways out of it, but let’s discuss that in the next round.
I’d say neither of these rule out Node. Rather, I’d suggest investigating options that let you do your remote operations programmatically in JS, and with ways to make your remote commands block, when needed. On an unrelated thread I recommended Flightplan for these kinds of remote operations. I think you may benefit from looking at it and at alternatives to it.
댓글 없음:
댓글 쓰기