You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Garren Smith <ga...@apache.org> on 2020/06/24 14:21:25 UTC

CouchDB and Rust blogs

Hi All,

I've been playing around with the rust language quite a bit recently and
using it to write some rust related side projects. I've recently finished a
CouchDB View Server written in Rust using V8. Here is a blog post about
that details the new View Server protocol for CouchDB 4.x and my Rust
implementation
https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server

A few weeks back I also wrote about a miniCouchDB implementation I wrote in
Rust during a Cloudant Hack week.
https://www.garrensmith.com/blogs/mini-couch-hack-week

Cheers
Garren

Re: CouchDB and Rust blogs

Posted by Alessio 'Blaster' Biancalana <do...@apache.org>.
Wow that's very cool man, I'll read it and share it with my fellow
rustaceans!

On Wed, Jun 24, 2020 at 4:21 PM Garren Smith <ga...@apache.org> wrote:

> Hi All,
>
> I've been playing around with the rust language quite a bit recently and
> using it to write some rust related side projects. I've recently finished a
> CouchDB View Server written in Rust using V8. Here is a blog post about
> that details the new View Server protocol for CouchDB 4.x and my Rust
> implementation
> https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server
>
> A few weeks back I also wrote about a miniCouchDB implementation I wrote in
> Rust during a Cloudant Hack week.
> https://www.garrensmith.com/blogs/mini-couch-hack-week
>
> Cheers
> Garren
>

Re: CouchDB and Rust blogs

Posted by Garren Smith <ga...@apache.org>.
Hi Jan,

Thanks, one of my first attempts https://github.com/garrensmith/fortuna was
embedding v8 as a nif. It was my first nif and the implementation is wrong,
but it did prove it was possible and something we could consider going
forward. The one thing I'm not 100% sure of is moving V8 across threads.
Paul and I have had a discussion around that and we can't find good
evidence on whether moving V8 across threads is a good or bad idea. I
happened to speak to Ryan Dahl about it in the deno discord channel and he
recommended against it. I think a good starting point would be to use
https://github.com/rusterlium/rustler to create a nif and then use some of
the code from fortuna.

Also, I'm not sure embedding Deno would work. The Deno isolate is designed
to run in an async environment, so I think rather using standard v8 would
be better.

Cheers
Garren

On Wed, Jun 24, 2020 at 5:33 PM Jan Lehnardt <ja...@apache.org> wrote:

> Congrats Garren, this is really cool! :)
>
> One related question: have you pondered embedding a JS engine into Erlang
> itself as well?
>
> Best
> Jan
> —
>
> > On 24. Jun 2020, at 16:21, Garren Smith <ga...@apache.org> wrote:
> >
> > Hi All,
> >
> > I've been playing around with the rust language quite a bit recently and
> > using it to write some rust related side projects. I've recently
> finished a
> > CouchDB View Server written in Rust using V8. Here is a blog post about
> > that details the new View Server protocol for CouchDB 4.x and my Rust
> > implementation
> > https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server
> >
> > A few weeks back I also wrote about a miniCouchDB implementation I wrote
> in
> > Rust during a Cloudant Hack week.
> > https://www.garrensmith.com/blogs/mini-couch-hack-week
> >
> > Cheers
> > Garren
>
>

Re: CouchDB and Rust blogs

Posted by Garren Smith <ga...@apache.org>.
Hi Jan,

Thanks, one of my first attempts https://github.com/garrensmith/fortuna was
embedding v8 as a nif. It was my first nif and the implementation is wrong,
but it did prove it was possible and something we could consider going
forward. The one thing I'm not 100% sure of is moving V8 across threads.
Paul and I have had a discussion around that and we can't find good
evidence on whether moving V8 across threads is a good or bad idea. I
happened to speak to Ryan Dahl about it in the deno discord channel and he
recommended against it. I think a good starting point would be to use
https://github.com/rusterlium/rustler to create a nif and then use some of
the code from fortuna.

Also, I'm not sure embedding Deno would work. The Deno isolate is designed
to run in an async environment, so I think rather using standard v8 would
be better.

Cheers
Garren

On Wed, Jun 24, 2020 at 5:33 PM Jan Lehnardt <ja...@apache.org> wrote:

> Congrats Garren, this is really cool! :)
>
> One related question: have you pondered embedding a JS engine into Erlang
> itself as well?
>
> Best
> Jan
> —
>
> > On 24. Jun 2020, at 16:21, Garren Smith <ga...@apache.org> wrote:
> >
> > Hi All,
> >
> > I've been playing around with the rust language quite a bit recently and
> > using it to write some rust related side projects. I've recently
> finished a
> > CouchDB View Server written in Rust using V8. Here is a blog post about
> > that details the new View Server protocol for CouchDB 4.x and my Rust
> > implementation
> > https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server
> >
> > A few weeks back I also wrote about a miniCouchDB implementation I wrote
> in
> > Rust during a Cloudant Hack week.
> > https://www.garrensmith.com/blogs/mini-couch-hack-week
> >
> > Cheers
> > Garren
>
>

Re: CouchDB and Rust blogs

Posted by Jan Lehnardt <ja...@apache.org>.
Congrats Garren, this is really cool! :)

One related question: have you pondered embedding a JS engine into Erlang itself as well?

Best
Jan
—

> On 24. Jun 2020, at 16:21, Garren Smith <ga...@apache.org> wrote:
> 
> Hi All,
> 
> I've been playing around with the rust language quite a bit recently and
> using it to write some rust related side projects. I've recently finished a
> CouchDB View Server written in Rust using V8. Here is a blog post about
> that details the new View Server protocol for CouchDB 4.x and my Rust
> implementation
> https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server
> 
> A few weeks back I also wrote about a miniCouchDB implementation I wrote in
> Rust during a Cloudant Hack week.
> https://www.garrensmith.com/blogs/mini-couch-hack-week
> 
> Cheers
> Garren


Re: CouchDB and Rust blogs

Posted by Alessio 'Blaster' Biancalana <do...@apache.org>.
Wow that's very cool man, I'll read it and share it with my fellow
rustaceans!

On Wed, Jun 24, 2020 at 4:21 PM Garren Smith <ga...@apache.org> wrote:

> Hi All,
>
> I've been playing around with the rust language quite a bit recently and
> using it to write some rust related side projects. I've recently finished a
> CouchDB View Server written in Rust using V8. Here is a blog post about
> that details the new View Server protocol for CouchDB 4.x and my Rust
> implementation
> https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server
>
> A few weeks back I also wrote about a miniCouchDB implementation I wrote in
> Rust during a Cloudant Hack week.
> https://www.garrensmith.com/blogs/mini-couch-hack-week
>
> Cheers
> Garren
>

Re: CouchDB and Rust blogs

Posted by Jan Lehnardt <ja...@apache.org>.
Congrats Garren, this is really cool! :)

One related question: have you pondered embedding a JS engine into Erlang itself as well?

Best
Jan
—

> On 24. Jun 2020, at 16:21, Garren Smith <ga...@apache.org> wrote:
> 
> Hi All,
> 
> I've been playing around with the rust language quite a bit recently and
> using it to write some rust related side projects. I've recently finished a
> CouchDB View Server written in Rust using V8. Here is a blog post about
> that details the new View Server protocol for CouchDB 4.x and my Rust
> implementation
> https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server
> 
> A few weeks back I also wrote about a miniCouchDB implementation I wrote in
> Rust during a Cloudant Hack week.
> https://www.garrensmith.com/blogs/mini-couch-hack-week
> 
> Cheers
> Garren