Giter Site home page Giter Site logo

bobbin's Issues

handle repetitive/long-running work

this will require some thought. how to stop these once started, for example.

repetitive:

pool.run (cb) ->
    i = 0
    setInterval( -> cb(i++) , 1000)

long-running:

pool.run -> doWorkForever()

let end user access pool workers directly

why not let the end user, e.g., grab some worker and feed it work, if that's what they wish to do. or kill it. or whatever! or push workers onto a pool. who cares?

blocked by #18

thoughts on next-level concurrency management

  • limit number of tasks per worker?
    • queue them if full? on worker or master?
    • reject them if full? i.e. force onto other workers? if all workers full, queue on master?
  • ability to stop/kill tasks?
  • task priority?
    • per worker? globally?
  • ???

high level data/control flow constructs

basically I want to plug caolan/async into this (or just mimic functionality as needed) to make data processing magically SMP-enabled:

async_bobbin.each(collection, function(item, callback) {
    // this iterator runs on the workers!
    callback(doSomething(item));
});

i think all or almost all of caolan/async could be adapted onto bobbin. (imagine async.auto applied to workers!) some kind of bridge/adapter/facade shouldn't be hard to make.

more intelligent distribution of work to workers

round robin isn't the only option of course. maybe keep a count of active tasks on each worker and prioritize accordingly? maybe expose explicit options to direct work at certain workers. maybe allow submission of task batches; could be more efficient.

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.