Skip to content
This repository has been archived by the owner on May 29, 2021. It is now read-only.

Implement dependency injection into workers, resolves #203 #211

Merged
merged 2 commits into from
Nov 5, 2017

Commits on Nov 4, 2017

  1. Implement dependency injection into workers, resolves skale-me#203

    A new skale context method `sc.require` is added. It specifies a
    set of modules on user side (master) which have to be deployed in
    workers for use by callbacks, such as mappers, reducers, etc.
    
    Under the hood, [browserify] is used on master side to build a
    bundle which is serialized and sent to workers (as part of task).
    It is then evaluated in worker global context, and dependencies
    remain persistent as long as workers live.
    
    This method allows to use in workers any javascript module which
    can be browserified, so a large number (almost any pure JS package).
    
    The current commit is for local version, not distributed (code will
    be exactly the same). It is experimental for the moment.
    
    An additional statement `sc.bundle` could be added as well to inject
    pre-compiled modules, avoiding the penalty of `browserify` at each
    run.
    
    [browserify]: https://github.com/browserify/browserify
    mvertes committed Nov 4, 2017
    Configuration menu
    Copy the full SHA
    863d160 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2017

  1. Configuration menu
    Copy the full SHA
    0b2d540 View commit details
    Browse the repository at this point in the history