GithubHelp home page GithubHelp logo

Comments (3)

mhsieh avatar mhsieh commented on August 15, 2024

(updated: talked to Chris in slack)

from pypeflow.

pb-cdunn avatar pb-cdunn commented on August 15, 2024

Progress is on the blocking branch:

from pypeflow.

pb-cdunn avatar pb-cdunn commented on August 15, 2024

MJ, the multiprocessing module is usually unwise, for a variety of reasons. I used to like it, but I've learned. There are very few cases when it is actually a good solution, except for something quick-and-dirty. I don't have time to give you the full lecture right now.

In my Python implementation last night, I used a thread per call. That's not ideal, but I think it's ok since we already limit concurrency from the workflow side. (Different FALCON stages have different max_concurrency.)

(In my opinion, GoLang is a much better choice than Python for this, since each blocking call could be in its own goroutine, which is cheap. The caveats are suddenly far fewer. But this is a tiny amount of code, only a few hundred lines, so we can re-write in a couple hours down the road.)

The main problem I have with my current version is that termination is a bit tricky. We could share a repo with my little test-case, and you could experiment with different cases if you want. Ctrl-C at least seems to do the right thing, though I haven't tried it yet with a real qsub job.

The other difficulty is that this blocking "pwatcher" is ipso facto not actually restartable. So it's not really "watching" anything. That's fine, but we have to change slightly how this thing is called. Two choices:

  1. Currently, the fs_based.py pwatcher is in-process with FALCON. If we want blocking.py also in-process, then we need to stop using the process_watcher context-manager repeatedly (or we would need global state).
  2. Alternatively, blocking.py could be run as a separate process, either using IPC or using repeated socket reconnections. But then we have to consider how to kill it.

(Talked with MJ in Slack.)

from pypeflow.

Related Issues (20)

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.