-
Notifications
You must be signed in to change notification settings - Fork 18
Running as vertx module
Previously jubilee server was built as a jruby rack server, which embeds vertx. With the change introduced in jubilee 2.0, that in order to gain maximum performance output, the main component is converted to a vertx verticle, enables us to run this project as a vertx module.
This makes the code much simpler, as option parsing, clustering, high availability etc are handled by vertx itself. Meanwhile the server is decoupled from vertx, which means you can upgrade vertx whenever new versions are available and don't have to wait until release of jubilee.
There are certain limitations with this approach, e.g. require 'vertx'
only works when the code is running inside vertx container, that means rake tasks etc with load such files will fail. This can be fixed by package the jruby api_shims as a separate gem.
Add the following snippet to $VERTX\_HOME/conf/langs.properties
rackup=isaiah~mod-rack~0.1.1:org.jruby.jubilee.JubileeVerticleFactory
.ru=rackup
Make sure JRUBY_HOME is correctly set, and rack
gem is install before proceed.
Then run the rackup file as a normal verticle,
vertx run config.ru -conf config.json
Check the chatapp for example.
The code now resides in the branch maven
, it's named such because now it requires maven
to build the module.