You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Below are documentation on Polyglot and Softwareserver, including how they work together. Intended for developers or interested users. Started with what Rui learned as part of work of BD-460 "Software Server not setting correct public IP on checkins".

  • User Interface

A user interacts with Polyglot. Polyglot works internally with software servers. By default Polyglot runs on port 8184, Softwareserver on port 8182. A user can use "http://<polyglot_ip>:8184/" to see the available endpoints / URLs, such as "http://<polyglot_ip>:8184/servers" to see the server IP list, or "http://<polyglot_ip>:8184/form" to use a form to submit a conversion request.

  • Internal Working

A Polyglot process goes to RabbitMQ, gets the consumer IPs, connects to these IP's softwareserver at the URL "<softewareserver_ip>:8182/applications". If the URL is accessible and contains valid content, Polyglot adds the IP to its server list.

A Softwareserver connects to RabbitMQ, picks up jobs (aka msgs) in the queues, processes them, and sends the results back by accessing Polyglot's endpoint at "<polyglot_ip>:8184/checkin/<jobid>/<result_url>".

  • Implementation Details

Both Polyglot and softwareserver are implemented in Java, currently using Restlet. Current configuration files are:

    • Polyglot – PolyglotRestlet.conf (Polyglot port #, Softwareserver port #, etc.), PolyglotStewardAMQ.conf (RabbitMQ URI)
    • Softwareserver – SoftwareServerRestlet.conf (port #, RabbitMQ URI).

Softwareserver job checkin is in SoftwareServerRESTUtilities.java, Polyglot accessing RabbitMQ part is in polyglot/PolyglotStewardAMQ.java.

  • Installation of Required Software Packages on Ubuntu Trusty (14.04)

Need to install the programs used in Softwareserver scripts:

      convert, unoconv, daffodil, ffmpeg, 7z and 7za, libreoffice, avconv, xvfb-run, eog, flac, ps2pdf, gthumb, htmldoc, kabeja, rar (requires "multiverse"), unzip, unrar, cabextract, ncdump, pdf2djvu, prince, soundconverter, TeighaFileConverter, txt2html, unrtf, cvlc

which are in the following Ubuntu packages:

      imagemagick, unoconv, (daffodil/), ffmpeg, p7zip-full, libreoffice*, libav-tools, xvfb, eog, flac, ps2pdf, gthumb, htmldoc, (kabeja?), rar, unrar, cabextract, netcdf-bin, pdf2djvu, (prince?), soundconverter, (TeighaFileConverter?), txt2html, unrtf, vlc-nox

unzip was already installed. ps2pdf is in ghostscript, already installed.

 

To install those that are available on Ubuntu 14.04 and copy Daffodil, do:

sudo vi /etc/apt/sources.list   # to uncomment the 4 multiverse lines.
sudo apt-get update
sudo apt-get install -y imagemagick unoconv p7zip-full libav-tools xvfb eog flac gthumb htmldoc rar unrar cabextract netcdf-bin pdf2djvu soundconverter txt2html unrtf vlc-nox

cd /home/polyglot
sudo scp -pr dap-dev.ncsa.illinois.edu:/home/polyglot/daffodil .
sudo chown -R --reference=/home/polyglot /home/polyglot/daffodil
  • No labels