Ruby daemons and JRuby - alternative options

后端 未结 4 2102
梦谈多话
梦谈多话 2021-01-01 02:06

I have an app that I am migrating from Ruby to JRuby (due to need for better Web Service Security support via Java). One of the gems I use is daemons to create a background

相关标签:
4条回答
  • 2021-01-01 02:40

    Since you cannot fork in JRuby you are basically left with having to refactor your daemon code so that the daemon can be executed as a standard foreground application then create a separate daemon launcher that will run and background the daemon. You can look at spoon and also check this gist which uses spoon to create a more elaborate launcher. Also jruby-jsvc provides the glue to use jsvc with a JRuby daemon.

    0 讨论(0)
  • 2021-01-01 02:42

    You might be interested in http://torquebox.org/ it includes scheduling.

    0 讨论(0)
  • 2021-01-01 02:42

    There is an alternative, called Spoon written by Charles Nutter. See his blog http://blog.headius.com/2009/05/fork-and-exec-on-jvm-jruby-to-rescue.html and the gist https://gist.github.com/321084 for an example.

    0 讨论(0)
  • 2021-01-01 02:56

    I created a gem for the easy creation of Ruby & JRuby daemons: raad (Ruby as a daemon). It works identically with MRI Ruby or JRuby, simple, lightweight, transparent.

    0 讨论(0)
提交回复
热议问题