Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FITS with Nailgun? #21

Open
jpstroop opened this issue Sep 28, 2015 · 2 comments
Open

FITS with Nailgun? #21

jpstroop opened this issue Sep 28, 2015 · 2 comments
Labels

Comments

@jpstroop
Copy link

Related to #18: FITS contains a script, fits-ngserver.sh that starts a Nailgun server, which would save us having to spin up the JVM for every call to FITS. We'd probably get a good performance boost.

me@here:~ $ fits-ngserver.sh $NAILGUN_JAR &
[1] 9820
me@here:~ $ You may now run FITS by typing: ng edu.harvard.hul.ois.fits.Fits [options]
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
NGServer started on all interfaces, port 2113.

me@here:~ $ time ng-nailgun edu.harvard.hul.ois.fits.Fits -i Desktop/pul-logo-tall-md-trans_0.png -o /tmp/sample.xml

real    0m1.854s // <------------------------------
user    0m0.000s
sys 0m0.000s
NGSession 1: 127.0.0.1: edu.harvard.hul.ois.fits.Fits exited with status 0
me@here:~ $ time ng-nailgun edu.harvard.hul.ois.fits.Fits -i Desktop/pul-logo-tall-md-trans_0.png -o /tmp/sample.xml

real    0m0.464s // <------------------------------
user    0m0.000s
sys 0m0.000s
NGSession 2: 127.0.0.1: edu.harvard.hul.ois.fits.Fits exited with status 0
@narogers
Copy link

Another alternative might be to run FITS as a service (https://github.com/harvard-lts/FITSservlet). I have been experimenting with it from the command line using CURL and it appears to be much more performant than fit.sh for a limited test run of TIFFs, RAW images, and JPEGs.

@narogers
Copy link

This is what I've done to get it working with a configurable option that calls local FITS if the file size is over a certain threshold (currently 500MB). It isn't perfect but shows that it shouldn't be too much work to implement.

https://github.com/ClevelandArtGIT/cma-archives/blob/master/app/services/cma/characterization_service.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants