On Wed, Mar 20, 2013 at 6:59 AM, Benoit Chesneau <[email protected]> wrote: > On Wed, Mar 20, 2013 at 6:43 AM, Robert Newson <[email protected]> wrote: >> Hi Robin, >> >> I re-read the comments on your PR. I hope you didn't read it too >> personally as I'm sure that wasn't the intention of those that >> commented. The issue is that a roundtrip through Javascript evaluation >> is a significaters arnt overhead. No matter how you implemented it, it would >> almost certainly be too slow for a useful URL rewriting feature. I >> don't dispute that the URL rewriter in couchdb could be improved, >> though. I think a viable path would be a more powerful microlanguage, >> something modelled on mod_rewrite or the nginx module, perhaps? In >> summary, I'd love to see a rewriter feature in CouchDB that is >> comprehensive while still being fast; you're not the first to reach >> its limits. >> >> B. >> >> > > One less limited I proposed 2 years ago is that one too: > > https://github.com/benoitc/couchapp-ng > > Which is not reusing another dsl but simply the regexp pattern like > all routers around. But what is really wanted here is a full access to > the couchdb api to return a doc from anything in the query or headers. > which is quite different. We could also go for another script language > like lua that can be interpreted natively. > > - benoit
Here is a simple router example: https://github.com/benoitc/couchapp-ng/blob/master/example/legacyapp/routes.json
