Git Product home page Git Product logo

blast-workqueue's Introduction

blast-workqueue

Build Status

Integrate WorkQueue with SequenceServer.

Currently it still require some modification on the SequenceServer code. Modify command method in lib/sequenceserver/blast/job.rb from:

@command ||= "#{method} -db '#{databases.map(&:name).join(' ')}'" \
             " -query '#{qfile}' #{options}"

to:

@command ||= "blast_workqueue \"#{method} -db '#{databases.map(&:name).join(' ')}'" \
             " -query '#{qfile}' #{options}\""

Frontend

Called for every single BLAST search:

Usage:

./blast_workqueue "blastn -db /var/db/est_human -query /tmp/query.fa -evalue 1e-5"

Backend

Constantly running, upon receiving msg from a frontend, create a WorkQueue task and dispatch it to work_queue_worker connect to the backend.

A password file can be used to authenticate between work_queue_worker and the backend.

Usage:

./blast_workqueue-backend
./blast_workqueue-backend --password <pwd-file>
./blast_workqueue-backend --unix-sock <unix-sock-path>
./blast_workqueue-backend --ip <ip-to-listen-on> --port <port>
./blast_workqueue-backend --help

Communication between Frontend and Backend

Commuication is done via socket, (support both unix socket and tcp socket).

Use Unix socket by default, with a path of "/var/www/sequenceserver/backend.server"

Current Limitation/Caveat

  • The input cmd from frontend to backend and the output from backend to frontend are both as a file in /tmp, only the filename is send via socket, there is no clean up done by the frontend, so user or system need to clean up /tmp regularly. Plan to having the output send to frontend via socket.

  • Currently there is no sanitizing done by this program, so any valid blast option will be passed as is to work_queue_worker for execution. If sanitization is required for your system, plz do so before calling the frontend.

blast-workqueue's People

Contributors

zhxu73 avatar

Watchers

 avatar

blast-workqueue's Issues

More unit testing

Need unit test on each function, and integrate those test with CI

Comm between frontend & backend rely on files

Only the filename of cmd-file and outfile are sent across via socket, the actual content are in local file, which means the tcp socket being kind of pointless, as there is no way for frontend and backend to reside on different machine.
Meanwhile cause file build up in /tmp #2

No clean up of /tmp file created

Even though communication is done via socket, the actual cmd and result are exchanged as local file, those files are created in /tmp, and no one (neither frontend nor backend) is responsible for clean up.

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.