我發現這裏的解決方案:http://www.redmine.org/boards/2/topics/41820?r=41882
From what I know, 3 scenarios:
You want to use a publicly exposed NodeJS service.
In that case just make an ajax call to your service (jQuery).
You want to use a non-public NodeJS service Run your NodeJS
service on localhost (listening to 127.0.0.1) and call it from the controller
of your plugin.
You want to use a task (executable).
Run a system("/my/path/executable #{param}") command from the controller
of your plugin.
I don't like solution number 3 because there is more possibilities of something
going wrong.