You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Daniel Munch <da...@gmail.com> on 2017/01/23 21:56:24 UTC

[ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

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

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Paul Hammant <pa...@hammant.org>.
Cool - didn't know that, thanks.

On Tue, Jan 24, 2017 at 6:38 AM, Jan Lehnardt <ja...@apache.org> wrote:

>
> > On 24 Jan 2017, at 12:36, Paul Hammant <pa...@hammant.org> wrote:
> >
> > 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).
>
> While it is absolutely possible to link everything into one process,
> that’s usually not done.
>
> Best
> Jan
> --
>
>
> >
> > On Tue, Jan 24, 2017 at 6:28 AM, Jan Lehnardt <ja...@apache.org> wrote:
> >
> >> Nice work Daniel!
> >>
> >> On 24 Jan 2017, at 02:22, Paul Hammant <pa...@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 <da...@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/
>
>

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Daniel Munch <da...@gmail.com>.
> You might not have read about dirty schedulers[1] which seem to be a
> stable
> API now, & here's a few links from Steve Vinoski related to NIF handling
> [2][3]
> and some sample code [4] from Steve and from JLouis [5] using them.

Thanks for these links! I think I read something about dirty
schedulers, but didn't realize there where already marked as stable.
However, taken apart the scheduling issue you always have to be
worried about your C code crashing and bringing the Erlang VM down. My
feeling is that it's ok to use a NIF with a battle-proven and
specialized library here and there to speed things up. On the other
side, bringing in a whole JavaScript runtime might be slight overkill.

> We already have some couchdb NIF code, and if there's a performance gain
> it
> would be great to ship some more.

In case somebody feels adventurous and wants to play with it, I just
pushed the Erlang bindings to ChakraCore I worked on before I started
with couch-chakra. It's not as polished as couch-chakra, however the
existing code should be fully functional.

https://github.com/dmunch/erlchakra

Have fun and a+,
Daniel

> A+
> Dave
>
> [1]:
> https://medium.com/@jlouis666/erlang-dirty-scheduler-overhead-6e1219dcc7#.jgdyewal6
> [2]: https://www.youtube.com/watch?v=nw2eIB6bTxY
> [3]:
> https://github.com/vinoski/bitwise/blob/master/vinoski-schedulers.pdf
> [4]: https://github.com/vinoski/bitwise
> [5]: https://github.com/jlouis/enacl

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Dave Cottlehuber <dc...@skunkwerks.at>.
> > 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.

You might not have read about dirty schedulers[1] which seem to be a
stable
API now, & here's a few links from Steve Vinoski related to NIF handling
[2][3]
and some sample code [4] from Steve and from JLouis [5] using them.

We already have some couchdb NIF code, and if there's a performance gain
it
would be great to ship some more.

A+
Dave

[1]:
https://medium.com/@jlouis666/erlang-dirty-scheduler-overhead-6e1219dcc7#.jgdyewal6
[2]: https://www.youtube.com/watch?v=nw2eIB6bTxY
[3]:
https://github.com/vinoski/bitwise/blob/master/vinoski-schedulers.pdf
[4]: https://github.com/vinoski/bitwise
[5]: https://github.com/jlouis/enacl

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Nolan Lawson <no...@nolanlawson.com>.
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" <da...@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 <ja...@apache.org> wrote:
> >>
> >>> Nice work Daniel!
> >>>
> >>> On 24 Jan 2017, at 02:22, Paul Hammant <pa...@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 <da...@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/
> >
>

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Dave Cottlehuber <dc...@skunkwerks.at>.
On Tue, 24 Jan 2017, at 18:24, Daniel Munch 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

I love this!

In particular Daniel's offered some solutions for finally handling
anonymous functions, which is super awesome and long overdue.
 
Being able to run our test suite with different JS engines would be
really cool, as well as shipping some alternatives.

Serialisation uses a lot of CPU in CouchDB and any experiments or
adventures into finding ways to improve this would be welcome. Currently
we do all of the following:

browser/API (javascript native <->json)
couchdb (json <-> erlang terms)
couchjs ( json <-> javascript native)

I'd love to see some incremental/experimental changes or tests in this
space, as previous attempts got side tracked with discussion rather than
shipped contributions. Providing alternate couchjs builds is relatively
low-impact compared to alternative communication protocols, maybe thats
a good place to start.

A+ 
Dave

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Daniel Munch <da...@gmail.com>.
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 <ja...@apache.org> wrote:
>>
>>> Nice work Daniel!
>>>
>>> On 24 Jan 2017, at 02:22, Paul Hammant <pa...@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 <da...@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/
>

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Jan Lehnardt <ja...@apache.org>.
> On 24 Jan 2017, at 12:36, Paul Hammant <pa...@hammant.org> wrote:
> 
> 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).

While it is absolutely possible to link everything into one process,
that’s usually not done.

Best
Jan
--


> 
> On Tue, Jan 24, 2017 at 6:28 AM, Jan Lehnardt <ja...@apache.org> wrote:
> 
>> Nice work Daniel!
>> 
>> On 24 Jan 2017, at 02:22, Paul Hammant <pa...@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 <da...@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/


Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Paul Hammant <pa...@hammant.org>.
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?

On Tue, Jan 24, 2017 at 6:28 AM, Jan Lehnardt <ja...@apache.org> wrote:

> Nice work Daniel!
>
> On 24 Jan 2017, at 02:22, Paul Hammant <pa...@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 <da...@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/
>
>

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Jan Lehnardt <ja...@apache.org>.
Nice work Daniel!

On 24 Jan 2017, at 02:22, Paul Hammant <pa...@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 <da...@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/


Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Garren Smith <ga...@apache.org>.
Nice work Daniel. If that side of CouchDB interests you, we have an open
ticket on improving the view server protocol.
See this mail[1] and ticket[2]


[1]
http://markmail.org/search/list:org.apache.couchdb-*?q=GSoc+2015+%7C+COUCHDB-1743+Make+the+view+server+%26+protocol+faster#query:list%3Aorg.apache.couchdb-*%20GSoc%202015%20%7C%20COUCHDB-1743%20Make%20the%20view%20server%20%26%20protocol%20faster%20order%3Adate-forward+page:1+mid:k4zr42bafmpwkdjx+state:results

[2] https://issues.apache.org/jira/browse/COUCHDB-1743

On Tue, Jan 24, 2017 at 3:22 AM, Paul Hammant <pa...@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, but it
> isn't perfect because a) JavaScript modernized since CouchDB picked and
> implementation (and maybe CouchDB should modernize too), and b) it is
> somehow only the 'Query Server' side of CouchDB anyway.
>
>
> - Paul
>
> On Mon, Jan 23, 2017 at 4:56 PM, Daniel Munch <da...@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
> >
>

Re: [ANNOUNCEMENT] couch-chakra, a CouchDB Query Server Runtime build with ChakraCore

Posted by Paul Hammant <pa...@hammant.org>.
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, but it
isn't perfect because a) JavaScript modernized since CouchDB picked and
implementation (and maybe CouchDB should modernize too), and b) it is
somehow only the 'Query Server' side of CouchDB anyway.


- Paul

On Mon, Jan 23, 2017 at 4:56 PM, Daniel Munch <da...@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
>