Coder Social home page Coder Social logo

torquebox-lite's Introduction

No Longer Maintained

The TorqueBox project is no longer actively developed nor maintained. Do not use it for development or production usage unless you are willing and able to fix issues as they come up.

TorqueBox

This is TorqueBox 4 and represents a substantial change in direction from previous TorqueBox releases. We're moving to a lightweight, embedded model that runs without any Java application server, at the expense of a few of the more enterprisy features. For users that want to run in a Java application server or need those enterprisy features, we'll provide a way to take your TorqueBox application and run it unmodified on a stock WildFly installation.

Documentation

We have various guides available to help with installation, migration, usage, and deployment of TorqueBox 4.

Quickstart for running TorqueBox

Requirements

TorqueBox requires JRuby 1.7.x (in 1.9 or 2.0 mode) or JRuby 9.x.x running on Java 7+. The code has only been tested on JRuby 1.7.6 and higher but should work on earlier versions.

Installation

Read the Installation Guide for installation details.

Running directly

From inside your Rack application's root directory:

torquebox run

Rails

Ensure torquebox is in your Gemfile, then:

rails s torquebox

Rack

rackup -s torquebox

Motivation

We want a smaller, more modular TorqueBox that is easier to get started with, embeddable, and lets users bring in additional functionality as-needed. More details of our motivation and community feedback are expressed in an email thread from the torquebox-user mailing list.

Technology

TorqueBox runs on JRuby and sits on top of a new lightweight, pluggable, polyglot server codenamed WunderBoss (at least for now). All the new features of TorqueBox will be implemented in WunderBoss then exposed via a Ruby API in the TorqueBox project. This lets other projects, in other languages, reuse the same functionality by creating small language-specific API wrappers.

The web portion of WunderBoss uses JBoss Undertow, which is also the same web server used in WildFly (the successor to JBoss Application Server).

We aim to reuse the same underlying components as WildFly so that TorqueBox applications can run on top of WildFly in addition to running without it, to give users an option between a full-blown Java application server and a very lightweight, minimal server.

Current status

Right now TorqueBox 4 provides a high-performance Rack implementation for web applications and basic APIs for messaging, caching, and scheduled jobs. The Rack support is considered production-ready, but the messaging, caching, and scheduling implementations are still in a bit more flux.

Roadmap

We're developing TorqueBox 4 while also maintaining TorqueBox 3, and we expect it to take some time before TorqueBox 4 comes out of alpha and betas and into a final release.

Building TorqueBox

bundle install
rake build

Running specs

rake spec

Running integration tests

Make sure phantomjs is available on your $PATH - http://phantomjs.org/download.html.

The first time you run the integration tests may take longer as bundler gets invoked for each test application to install its dependencies. Subsequent runs with the same JRuby installation should be faster.

cd integration-tests
rake spec

Running a single integration test

cd integration-tests
SPEC=spec/basic_sinatra_spec.rb rake spec

Running specs with more verbose output

DEBUG=true rake spec

Running all integration test variants (disk, jar, wildfly)

There are several variants of integration tests. Each runs the same applications and same specs, but packaged in different ways. This takes quite a bit longer, but is what CI runs.

rake spec:all

Installing from source

rake install

Releasing

Preparation

TorqueBox 4 is released from the master branch of torquebox/torquebox-release.

Set up this repository as an additional remote for your workspace:

git remote add release [email protected]:torquebox/torquebox-release.git

Ensure that the master branch has the contents you wish to release. Using the -f flag to force is allowed in this case, since the torquebox-release repository is not a public-facing human-cloneable repository.

git push release master:master -f

Perform the build

Using the build system, select the torquebox4-release job, entering in the branch to release from (usually 'master'), the version to release, and the next version after release.

If something goes wrong in the release job and it needs to run again, be sure to reset the torquebox-release repository with the correct code first:

git push release master:master -f

Deploy RubyGems

After the job complete successfully, the generated RubyGems will need to be manually deployed. Download them from the job and push each using:

gem push <gem_name>.gem

You'll have to be an owner of the gems to do this. Bug bbrowning, bobmcw, or tcrawley if you are not.

Publish the release API documentation

The release API docs are built by the release job on CI. Download those and put them a _4x_docs//yardoc folder in the torquebox.org git repo.

Push changes from the release repository to the official repository

git fetch release --tags
git merge release/master
git push origin master
git push origin <release_tag>

Release the project in JIRA

Announce it

Post it on torquebox.org

Notify the torquebox-users@ list

Tweet it.

Set the /topic in #torquebox IRC channel using ChanServ (if you can).

torquebox-lite's People

Contributors

bbrowning avatar etehtsea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

torquebox-lite's Issues

(LoadError) no such file to load -- torquebox-configure

I added a config/torquebox.rb to my app and when I started it I got this:

...
11:51:19,090 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "myapp-knob.yml"
11:51:19,243 INFO  [org.torquebox.core] (MSC service thread 1-3) evaling: /Users/dentarg/projects/hg/myapp/config/torquebox.rb
11:51:19,724 ERROR [org.torquebox.core.runtime] (MSC service thread 1-3) Error during evaluation: require 'rubygems'
require 'torquebox-configure'
TorqueBox::Configuration::GlobalConfiguration.load_configuration( %q{/Users/dentarg/projects/hg/myapp/config/torquebox.rb} ).to_java: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- torquebox-configure
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1019) [jruby.jar:]
    at RUBY.require(/Users/dentarg/.rbenv/versions/jruby-1.7.0/lib/ruby/shared/rubygems/custom_require.rb:36)   at RUBY.(root)(<script>:2)
11:51:19,724 ERROR [org.torquebox.core] (MSC service thread 1-3) ============================================================
11:51:19,724 ERROR [org.torquebox.core] (MSC service thread 1-3) Failed to load '/Users/dentarg/projects/hg/myapp/config/torquebox.rb':
11:51:19,725 ERROR [org.torquebox.core] (MSC service thread 1-3)   (LoadError) no such file to load -- torquebox-configure
11:51:19,725 ERROR [org.torquebox.core] (MSC service thread 1-3) ============================================================
11:51:19,726 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."myapp-knob.yml".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myapp-knob.yml".PARSE: JBAS018733: Failed to process phase PARSE of deployment "myapp-knob.yml"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.x.incremental.1.jar:7.1.x.incremental.1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_37]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_37]
    at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to load /Users/dentarg/projects/hg/myapp/config/torquebox.rb
    at org.torquebox.core.processors.TorqueBoxRbProcessor.deploy(TorqueBoxRbProcessor.java:72)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.x.incremental.1.jar:7.1.x.incremental.1]
    ... 5 more
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- torquebox-configure
    at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1019)
    at RUBY.require(/Users/dentarg/.rbenv/versions/jruby-1.7.0/lib/ruby/shared/rubygems/custom_require.rb:36)   at RUBY.(root)(<script>:2)
11:51:19,730 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "myapp-knob.yml" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myapp-knob.yml\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myapp-knob.yml\".PARSE: JBAS018733: Failed to process phase PARSE of deployment \"myapp-knob.yml\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to load /Users/dentarg/projects/hg/myapp/config/torquebox.rb
    Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- torquebox-configure"}}
11:51:19,736 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment myapp-knob.yml in 6ms
11:51:19,740 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myapp-knob.yml\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myapp-knob.yml\".PARSE: JBAS018733: Failed to process phase PARSE of deployment \"myapp-knob.yml\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to load /Users/dentarg/projects/hg/myapp/config/torquebox.rb
    Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- torquebox-configure"}}}}

I could start the app without problems after adding torquebox-configure to my Gemfile and running bundle install.

Shouldn't torquebox-lite require torquebox-configure as a dependency?

Gem dependency issue: thor & jquery-rails

Please forgive me if this is a repeat issue (@see: https://issues.jboss.org/browse/TORQUE-931)

Is there a preferred version to get this to build? Thanks for all the hard work on this project!

$ jruby -v
jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_51-b13 [darwin-x86_64]

$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies.................
Could not find gem 'torquebox-configure (= 2.2.0) ruby', which is required by
gem 'torquebox-lite (>= 0) ruby', in any of the sources.Could not find gem
'torquebox-core (= 2.1.1) ruby', which is required by gem 'torquebox-lite (>= 0)
ruby', in any of the sources.Bundler could not find compatible versions for gem
"thor":
  In Gemfile:
    torquebox-lite (>= 0) ruby depends on
      thor (= 0.14.6) ruby

    jquery-rails (>= 0) ruby depends on
      thor (0.19.1)

Some gems in my Gemfile:

source 'https://rubygems.org'

gem 'rails', '4.1.0'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc
gem 'spring',        group: :development

gem 'devise'
gem 'acts-as-taggable-on'
gem 'paperclip', "~> 3.0"
gem 'kaminari'
gem 'sunspot_rails'
gem 'sunspot_solr', :groups => [:development, :test]
gem 'progress_bar'

# active admin
#gem 'activeadmin', github: 'gregbell/active_admin'
#gem 'polyamorous', github: 'activerecord-hackery/polyamorous'
#gem 'ransack',     github: 'activerecord-hackery/ransack'
#gem 'formtastic',  github: 'justinfrench/formtastic'
gem 'activeadmin', :path => File.join(File.dirname(__FILE__), '/vendor/gems/active_admin')
gem 'polyamorous', :path => File.join(File.dirname(__FILE__), '/vendor/gems/polyamorous')
gem 'ransack',     :path => File.join(File.dirname(__FILE__), '/vendor/gems/ransack')
gem 'formtastic',  :path => File.join(File.dirname(__FILE__), '/vendor/gems/formtastic')

gem 'activerecord-jdbcmysql-adapter'
gem 'bootstrap-sass'
gem 'fancybox2-rails'

group :development do
  gem 'quiet_assets'
  gem "better_errors"
  gem "binding_of_caller"
end

gem 'torquebox-lite'

Better instructions on basic usage needed in ReadMe

In order to make torquebox-lite as easy to use as puma or trinidad for non java people like myself, if you could include instructions on how to hot-redeploy apps and how to stop the torquebox-lite server in the ReadMe and/or torquebox-lite -h that would be awesome. I know theres a link to documentation but jesus thats a lot to read through and I couldn't really figure it out without delving into how torquebox as a whole works, when all I need to know is two basic commands

Incompatible with JDK 8

The current JDK is version 8, but this does not appear to work with torquebox-lite.

When starting torquebox-lite it will get stuck when starting the JBoss AS:

11:05:15,613 INFO [org.jboss.as](MSC service thread 1-6) JBAS015899: JBoss AS 7.2.x.slim.incremental.9 "Janus" starting

Nothing happens after this.

Reverting to JDK version 7 cures the problem.

This issue is more for informational purposes - I'm not sure whether this is a known issue or if support is planned, but if not I suggest an update to the README to point people in the right direction. More than happy to submit this change if it will not be fixed.

Make connection queueing behaviour configurable

Issue created as discussed on torquebox-users list:
http://torquebox.markmail.org/thread/k4muxphvcg36c7ag

Please make connection queueing behaviour easy configurable, so that connections above maximum thread limit can be set to either:

  • reset (current default?)
  • or wait for next available server thread

Motivation for this is to allow requests opportunity to be completed by highly-loaded web-server, albeit with a slower response time. Increase in aggregate response time can then be used as a signal to increase server fleet size (on something like heroku), increasing concurrency.

PID file

Where is the PID file for the torquebox-lite?

I have set JBOSS_PIDFILE=/var/run/torquebox/torquebox.pid
but the pid file does not exist.

Im using the PID file for monit so I can be sure torquebox-lite remains up on my development box.

R14 error Heroku

Hi,

I've been wondering what may have caused the R14 error in Heroku using torquebox-lite

Thanks

jruby 1.7.3 support

An error message comes up saying jruby 1.7.1 is the lastest officially supported jruby, if you guys could update it to work with the latest jruby that would be great

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.