WTF is nailgun?

Just saw Charlie’s nailgun post and I am none the wiser.

JRuby Nailgun Support in 1.3.0 – Charles Oliver Nutter – Java, Ruby, and JVM guy trying to make sense of it all

You guys sometimes act like you live in a bubble. Out here where we are
implementing this stuff - and it is not only cool stuff, but damn useful
stuff - we sometimes need a paragraph or two of WTF it is you are
talking
about. Sorry to be a bore. Really sorry.

jruby --ng-server starts up a server. You can manage it however you
like.

Er, can you see the problem?


Best,
Marc


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Nailgun is meant to be a solution for slow starting JRuby programs.
Nailgun keeps an instance of the JVM running in the background so that
when you start JRuby, it uses that instance instead of creating a new
instance and incurring the cost of having to wait for JVM startup.

With Nailgun running in the background, JRuby scripts can start up as
fast as MRI Ruby scripts.

Ikai

On May 13, 2009, at 3:08 PM, marc wrote:

about. Sorry to be a bore. Really sorry.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Wed, May 13, 2009 at 6:08 PM, marc [email protected] wrote:

like.

http://xircles.codehaus.org/manage_email

2nd Google hit for “jruby nailgun”:
http://wiki.jruby.org/wiki/JRuby_with_Nailgun

marc wrote:

like.

Er, can you see the problem?

Sorry if it wasn’t clear; it has been discussed previously on this list
so I guess I thought an explanation would be extraneous.

Nailgun is a Java-based server and C-based client used to make running
command-line Java utilities faster. The server listens for requests from
the client, which takes options similar to the “java” command along with
command arguments. Basically using the server and client together keeps
a JVM in the background “warm” so the cost of cold startup is
eliminated.

In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.

Does that help clear things up?

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Marc, I just did a Google search on Nailgun:

http://martiansoftware.com/nailgun/index.html

Should give you more information if you are curious.

Ikai

On May 13, 2009, at 3:14 PM, Ikai L. wrote:

useful
Best,


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Tim U. wrote:

I do a “ng .//PowerFolder.jar” and it doesn’t like it complaining.

java.lang.ClassNotFoundException: ./PowerFolder.jar
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.martiansoftware.nailgun.NGSession.run(Unknown Source)

I know this is not a jruby question but…

Can anybody tell me what I am doing wrong?

The “server” needs to be started with jars you’ll want it to reference.
The client does not pass them along in the default setup.

With JRuby it will work because we pass through the client’s current
directory and jars loaded from within JRuby get loaded dynamically.

Check the Nailgun project page or download to see how you’re supposed to
run it. You pass the class to run as the first argument to “ng”.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.

In preparation I downloaded nailgun and started fooling around but due
to my
complete lack of java experience clearly I am not grokking how to use
it.

I installed it in ~/apps.
I did a make to create the binary and symlinked it /usr/local/bin.
I started the server with java -server -jar nailgun-0.7.1.jar

So I want to start powerfolders with nailgun instead of java…

I do a “ng .//PowerFolder.jar” and it doesn’t like it complaining.

java.lang.ClassNotFoundException: ./PowerFolder.jar
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.martiansoftware.nailgun.NGSession.run(Unknown Source)

I know this is not a jruby question but…

Can anybody tell me what I am doing wrong?

Thanks.

Tim U. wrote:

Thanks.

It seems like it will be much more useful with jruby than for general
purpose use.

The same can be said of many things on the JVM :slight_smile:

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

The “server” needs to be started with jars you’ll want it to reference. The
client does not pass them along in the default setup.

With JRuby it will work because we pass through the client’s current
directory and jars loaded from within JRuby get loaded dynamically.

Check the Nailgun project page or download to see how you’re supposed to
run it. You pass the class to run as the first argument to “ng”.

Thanks.

It seems like it will be much more useful with jruby than for general
purpose use. Otherwise you have to make a catalog of all the jars you
think
you may need and start the server with that.

Charles Oliver N. said:

jruby --ng-server starts up a server. You can manage it however you
command arguments. Basically using the server and client together keeps
a JVM in the background “warm” so the cost of cold startup is
eliminated.

In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.

Does that help clear things up?

Thanks v.much. Sounds excellent. Will have a play.


Best,
Marc


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Charles Oliver N. said:

Nailgun is a Java-based server and C-based client used to make running
command-line Java utilities faster. The server listens for requests from
the client, which takes options similar to the “java” command along with
command arguments. Basically using the server and client together keeps
a JVM in the background “warm” so the cost of cold startup is
eliminated.

In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.

Now that I’ve had a chance to play with this I am amazed. This is a
fantastic addition to the toolbox and I’m off to see where it takes me.


Best,
Marc

“Big change requires small steps.”


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email