Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Mar 21, 2011
  1. @davisp

    Updates to etap tests.

    davisp authored
Commits on Dec 13, 2010
  1. @davisp

    Remove reference to old design.

    davisp authored
    The broken image link was pointing to an image that no longer
    represent's the actual architecture. Removing this section till
    I make a new image.
Commits on Oct 27, 2010
  1. @davisp
Commits on Sep 2, 2010
  1. @davisp

    Don't abort when enif_send fails.

    davisp authored
    Either ignore the error assuming we're about to be garbage collected
    or raise an error in the JS context. I need to figure out how to make
    this exception uncatchable.
  2. @davisp

    Basic message passing from JavaScript.

    davisp authored
    This is a simplistic message passing feature to allow for JavaScript
    to make requests to Erlang. This requires a tight integration of the
    Erlang and JavaScript code. Messages can only be sent to JavaScript
    one at a time and only while JavaScript expects them. This is purely
    to overcome the blocking API design of _list functions in CouchDB.
Commits on Aug 28, 2010
  1. @davisp

    Refactored to use one thread per context.

    davisp authored
    I was running into lots of bad synchronization bugs in the old code
    so I've refactored everything to use a single thread per worker which
    greatly simplifies all of the threading and synchronization work.
Commits on Aug 8, 2010
  1. @davisp
Commits on Aug 7, 2010
  1. @davisp

    Use the correct string function.

    davisp authored
    JS_NewCopy steals the buffer passed to it. I was using it on a stack
    allocated buffer for converting atoms. The new method just changes
    the call to JS_NewStringCopyZ.
  2. @davisp
  3. @davisp

    Fix function renaming.

    davisp authored
    Spotted by Benoît.
  4. @davisp

    Include the design picture.

    davisp authored
Commits on Aug 5, 2010
  1. @davisp
Commits on Aug 3, 2010
  1. @davisp
  2. @davisp

    Updates to the README

    davisp authored
  3. @davisp

    Minor tweaks on things I forgot.

    davisp authored
    Added the switch so that all strings are treated as UTF-8. I need to
    refactor the translation layers to remove the now unncessary conversions
    to ascii.
    
    Removed some queue debug logging.
  4. @davisp

    A big update that needs your help with testing.

    davisp authored
    This passes all of my various smoke tests. I'd consider this a very
    pre-alpha that could use some more abuse and eye balls. If you find a
    bug be sure and open an issue so I can try and get it fixed.
    
    There was a dead lock when processing jobs. I refactored quite a bit of
    the concurrency code to try and simplify and streamline things. I'm now
    using opaque pointers considerably to try and limit the scope of
    critical sections.
    
    The basic concurrency concept is such:
    
    There are a given number of workers that can process requests for JS
    execution. This number of workers can be interrogated and changed using
    emonk:num_workers/0, emonk:add_worker/0, and emonk:rem_worker/0.
    
    A Context is required to run JavaScript code. It is created via
    emonk:new_context/0 and emonk:new_context/1. The optional parameter is
    for specifying a stack size in bytes.
    
    Once a context is created you can eval code with emonk:eval/2,3 or call
    functions in the global scope with emonk:call/3,4. Generally speaking
    you'll eval some code and then call some named function. The eval call
    takes a context on which to run, the script as a binary, and an optional
    timeout. The call function takes a context, a function name, an array of
    arguments, and an optional timeout.
    
    The general effect of eval and call is to place a job request onto a
    queue associated with the context. A context will then process the jobs
    in the order retrieved and send the results back to Erlang.
    
    Contexts are processed in a round robin order and a context can only
    process a single job at a time. So, if you have a very active context
    with lots of requests, and a request comes into an idle context, the
    idle context will jump in front of the busy one minus the job it might
    currently be processing.
    
    Hopefully that makes sense.
Commits on Jun 30, 2010
  1. @davisp
Commits on Jun 29, 2010
  1. @davisp
  2. @davisp

    Fix make check dependency.

    davisp authored
  3. @davisp

    Major rewrite of emonk for R14A.

    davisp authored
    Now uses a thread pool to execute JavaScript code to avoid blocking
    the Erlang schedulers. Initial tests are in and functioning. I need
    to add more thorough testing of behaviour under load.
Commits on Jun 26, 2010
  1. @davisp

    Now requires Erlang R14A or newer.

    davisp authored
    Updated code to use rebar for building.
Commits on Mar 2, 2010
  1. @davisp

    Fix minor build issues.

    davisp authored
  2. @davisp
Commits on Feb 28, 2010
  1. @davisp

    Minor communication updates.

    davisp authored
Commits on Feb 11, 2010
  1. @davisp

    Added tests for JS->Erlang conversions.

    davisp authored
    Added a bit of code that calls the toJSON function on objects that
    define it. This will convert things like Date objects to strings and so
    on and such forth.
Commits on Jan 29, 2010
  1. @davisp
Commits on Jan 26, 2010
  1. @davisp

    Some copy-paste artifacts.

    davisp authored
  2. @davisp

    Updates suggested by @mattly

    davisp authored
  3. @davisp

    Github formatting suffix.

    davisp authored
  4. @davisp
  5. @davisp
Commits on Jan 25, 2010
  1. @davisp

    Executing basic JS works.

    davisp authored
    Next up I'm going to add proper call semantics to pass arguments to a
    named function.
Commits on Jan 24, 2010
  1. @davisp
Commits on Jan 23, 2010
  1. @davisp

    Working build system. Refactoring C code.

    davisp authored
    Finally fixed a bug in how nspr and Spidermonkey were being linked on
    10.6. There's a bug report for Spidermonkey at [1]. The original bug
    report that helped me figure this out is at [2].
    
    [1] https://bugzilla.mozilla.org/show_bug.cgi?id=541710
    [2] http://openradar.appspot.com/7209349
  2. @davisp

    Ignore etap build products.

    davisp authored
Something went wrong with that request. Please try again.