couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nolan Lawson <no...@nolanlawson.com>
Subject Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore
Date Wed, 25 Jan 2017 02:22:37 GMT
This is really cool!! If you have any feedback for the Chakra team, let me
know and I'd be happy to pass it along. :) I know they're very interested
in getting Chakra adopted as an alternative VM in places where
V8/SpiderMonkey are currently used.

Cheers,
Nolan

-----
Nolan Lawson
http://nolanlawson.com
https://github.com/nolanlawson

On Jan 24, 2017 9:26 AM, "Daniel Munch" <dani.munch@gmail.com> wrote:

> Thanks Jan for clearing things up, I couldn't have answered better
> myself! And thanks everybody else for the feedback so far.
>
> >> That clears it up, One more question if I may. In use would this
> >> QueryServer replacement module be an adjacent process to the CouchDB
> >> process, or is there some linking fu to make CouchDB and CouchChakra one
> >> process?
> >
> > I haven’t looked to closely, but how I understand it, this is a separate
> > process. Just like it with CouchDB today (you have a beam[.smp] process
> > and zero or more couchjs processes).
>
> It currently takes exactly the same approach as couchjs - one beam
> process, zero or more couchjs processes, that's why I called it a
> drop-in replacement. In theory you could switch out couchjs by
> couch-chakra and everything should work like before.
>
> > While it is absolutely possible to link everything into one process,
> > that’s usually not done.
>
> Actually that's what I tried in the very beginning, writing a NIF to
> wrap the ChackraCore API to Erlang functions. While in theory this
> would be possible it's however heavily discouraged by the Erlang gods
> to write NIFs with non-deterministic timing. So I quickly stepped back
> from the NIF idea and instead implemented couch-chakra.
>
> Also, like Garren said in a mail before, there has been a couple of
> attempts to redesign the Query Server Protocol and the process model
> for the javascript query server. It looks as if there were different
> opinions on this, and it also looks like it could become a lot of
> work. Personally I'd love to see a binary communication protocol
> between couchdb and the query server and thought that BERT and
> BERT-RPC [1] might be a viable option. I'd also love to exploit the
> rental threading model of ChakraCore like it is explained in the
> article on how Chakra is used in DocumentDB [2]: "In other words, a
> runtime only operates on one thread at a time, but its thread affinity
> is free to change from time to time."
>
> Add libuv to the sauce and we might win the next buzzword-bingo
> contest with distinction, but that's what this project currently
> represents for me: A playground to explore weird ideas and to have
> some fun hacking on in my free-time.
>
> Best,
> Daniel
>
> [1] http://bert-rpc.org/
> [2] https://azure.microsoft.com/en-us/blog/the-road-ahead-for-
> azure-documentdb-with-chakracore/
>
> > Best
> > Jan
> > --
> >
> >
> >>
> >> On Tue, Jan 24, 2017 at 6:28 AM, Jan Lehnardt <jan@apache.org> wrote:
> >>
> >>> Nice work Daniel!
> >>>
> >>> On 24 Jan 2017, at 02:22, Paul Hammant <paul@hammant.org> wrote:
> >>>>
> >>>> I'm going to be a dumbass here and attempt to paraphrase - pls fix
> mine
> >>> up
> >>>> so that I may understand it.
> >>>>
> >>>> You've written a CouchDB clone on top of MS's ChakraCore stack,
> >>>
> >>> He’s re-written the Query Server component of CouchDB in ChakraCore,
> >>> Microsoft’s Open Source JavaScript engine.
> >>>
> >>> The current implementation uses Mozilla’s SpiderMonkey JavaScript
> engine.
> >>>
> >>>> but it
> >>>> isn't perfect because a) JavaScript modernized since CouchDB picked
> and
> >>>> implementation (and maybe CouchDB should modernize too),
> >>>
> >>> This is where the ChakraCore port is ahead of CouchDB, that’s a good
> >>> thing™ ;)
> >>>
> >>>> and b) it is somehow only the 'Query Server' side of CouchDB anyway.
> >>>
> >>> That’s what this is all about anyway, so it’s not a downside either.
> >>>
> >>> Hope this clears it up :)
> >>>
> >>> Best
> >>> Jan
> >>> --
> >>>
> >>>>
> >>>>
> >>>> - Paul
> >>>>
> >>>> On Mon, Jan 23, 2017 at 4:56 PM, Daniel Munch <dani.munch@gmail.com>
> >>> wrote:
> >>>>
> >>>>> Hi all,
> >>>>>
> >>>>> I just wanted to throw this out into the wild. It is merely a long
> >>>>> week-end hack mainly for learning and fun and I was really happy
that
> >>>>> it turned out so nicely so I thought why not sharing it. There isn't
> >>>>> any real intention on using this in production and I rather see
it as
> >>>>> a playground for some funny low-level things. But in case anybody
> >>>>> finds this interesting, I'm open for feedback, questions and
> >>>>> suggestions.
> >>>>>
> >>>>> You can find more information and the code at
> >>>>> https://github.com/dmunch/couch-chakra
> >>>>>
> >>>>> Thanks for reading and happy hacking,
> >>>>> Daniel
> >>>>>
> >>>
> >>> --
> >>> Professional Support for Apache CouchDB:
> >>> https://neighbourhood.ie/couchdb-support/
> >>>
> >>>
> >
> > --
> > Professional Support for Apache CouchDB:
> > https://neighbourhood.ie/couchdb-support/
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message