GithubHelp home page GithubHelp logo

linhphamsociable / jar-hello-world Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sam/jar-hello-world

0.0 0.0 0.0 5 KB

This is just the jetty-hello-world program packaged as a single jar.

Ruby 100.00%

jar-hello-world's Introduction

JRuby+Jetty+JAR Hello World

Overview

This is an example “Hello World” web application as a demonstration for bundling a JRuby application with JAR dependencies up into a single unified JAR you can run with the only deployment requirement being a working Java on your target system.

This way if you have a system that’s already running a particular JRuby release, you can “vendor all the things” and deploy an application like this without worrying about breaking anything on your server since you don’t have to muck with any existing Ruby environment, Gems, Bundler, et all.

This article helped me figure out most of the tricky bits in writing this example. So many thanks to @tomdz.

Prerequisites

OpenJDK 7u6

  1. Downloaded the package for OSX
  2. Mount it
  3. Drag the 1.7.0u6.jdk you should find to /Library/Java/JavaVirtualMachines
  4. Select the new version as the default in Java Preferences (look for it with Spotlight)

Usage

From the root of the project run:

mvn clean install

Then you can just start it up!

java -jar target/jetty-hello-world-1.0.0-SNAPSHOT.jar

Benchmarking

To benchmark I run this:

httperf --num-conns=50 --num-calls=2000 --port 9292

After warm-up the second time I get over 7,000 requests per second.

jar-hello-world's People

Contributors

sam avatar

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.