Skip to content

Remove JS extractor support #80

Merged
merged 1 commit into from Aug 19, 2011

2 participants

@rzezeski

bz1144

It's been decided that JavaScript extractor support will be removed.
The main reasons for doing so are:

  1. This feature has never worked so no existing users are being broken.

  2. The documentation around this feature isn't entirely clear and the
    code to support it is ugly, IMO.

  3. Like any other JS support in Riak it has to pay the penalty of
    shipping bytes between the Erlang and JS VMs. There is also potential
    contention for JS VMs depending on the size of the pool and load on
    the system.

  4. Finally, the main reason I can think of for anyone to use the JS
    extractor support is to pull apart incoming JSON objects. This is
    already handled via an Erlang extractor that is invoked any time it
    sees an application/json content-type header. This will be much
    more efficient than using a JS extractor.

@rzezeski

While doing this I checked to make sure our documented ways of setting the extractor worked and it turns out that {qfun, Fun} causes the ring manager to crash. For now I simply removed that method from the documentation but I'd certainly be willing to talk about fixing it/removing it and adding another PR.

@kellymclaughlin

I get an error from make test:

src/riak_search_kv_hook.erl:326: Warning: function maybe_start_app/1 is unused
make: *** [test] Error 1

@kellymclaughlin

In regards to the {qfun, Fun} problem, since it's been previously documented and released, I'd say make a card to fix it unless you really feel strongly that it should just be removed. Nice catch btw.

@kellymclaughlin

+1 to merge.

@rzezeski rzezeski Remove JS extractor support
bz1144

It's been decided that JavaScript extractor support will be removed.
The main reasons for doing so are:

1. This feature has never worked so no existing users are being broken.

2. The documentation around this feature isn't entirely clear and the
code to support it is ugly, IMO.

3. Like any other JS support in Riak it has to pay the penalty of
shipping bytes between the Erlang and JS VMs.  There is also potential
contention for JS VMs depending on the size of the pool and load on
the system.

4. Finally, the main reason I can think of for anyone to use the JS
extractor support is to pull apart incoming JSON objects.  This is
already handled via an Erlang extractor that is invoked any time it
sees an `application/json` content-type header.  This will be much
more efficient than using a JS extractor.
6ce074c
@rzezeski rzezeski merged commit 9912613 into master Aug 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.