standalone firefly tools with an embedded tomcat 7 no additional dependencies besides java 1.8

13
Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Upload: harry-roberts

Post on 13-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Standalone Firefly Toolswith an embedded Tomcat 7

No additional dependencies besides Java 1.8

Page 2: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Where is it?

• https://github.com/lsst/firefly/releases/

OR

• https://github.com/lsst/firefly then click ‘releases’ tab

Page 3: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Steps

• Download fftools-exec.war from github

• Override properties with ./config/fftools/app.prop

• Launch Firefly Server: java -jar fftools-exec.war <optional params>

Page 4: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Options

java -jar fftools-exec.war --help

-extractDirectory <extractDirectory>-httpPort <httpPort>-Xmx<memory allocation>-Dserver_config_dir=<config directory>

Page 5: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

External Task Launcher

allows Firefly to get Image, Table or JSONfrom an external process

allows user to extend Firefly server capabilities

Page 6: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Python Launcher – now and then

• For now, Python launcher is an executable on the same machine started with the same UID as Firefly server

• Later, Python launcher is local or remote need to handle both scenarios

Page 7: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Sample Python Task Launcher

at Firefly Githubsrc/firefly/python/SamplePythonLauncher.py• Illustrates communication protocol between

Firefly and Python code: -d DIR work directory -i FILE json file with task params -n TASK task name (no spaces) -o DIR output file directory

Page 8: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Setting Python Launcher Location

Override the property:config/fftools/app.prop python.exe= python <myPythonLauncher.py>

Pass it to Firefly Tools with embedded Tomcat:java -httpPort 8000 -Xmx8g -jar fftools-exec.war -Dserver_config_dir=./config

Page 9: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

JavaScript API

• Image Viewer with an image from external task • Table or XY Plot Viewer with a table from external task• Getting JSON data from an external task and passing them to - Firefly widget - another JS visualization tool

Page 10: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

JavaScript API: JSON

Page 11: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

Documentation

On LSST Firefly Github: https://github.com/lsst/firefly

Check “Adding Python Launcher to Firefly”

Page 12: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

JavaScript API: FITS

Page 13: Standalone Firefly Tools with an embedded Tomcat 7 No additional dependencies besides Java 1.8

JavaScript API: Table