hauleth

hauleth

Duckex - a client library for DuckDB

It is library created by me and @abc3. It is simple client for DuckDB, but with small twist when compared with other libraries out there - instead of using NIFs it uses port instead. That provides greater stability (as issues in DuckDB or loaded libraries will not cause issues for BEAM) and provides better OS-level management (as for example OOM killer will kill only port instead of whole BEAM VM).

Right now implementation is quite suboptimal (it do not support response streaming, as it is quite problematic on DuckDB side) and it uses JSON as a transport encoding between Elixir and Rust (yeah, port is implemented in Rust). Hopefully it will be resolved in near future.

It also is built on top of db_connection, so it should be possible to write Ecto integration, but right now it is not implemented (and if it will be implemented, it will be external library).

https://github.com/promeduck/duckex

Most Liked

garrison

garrison

Oh nice! Given the sorts of analytical queries DuckDB is intended for I had long thought a NIF seemed like a bad idea. Especially since it has a bit of a reputation for OOM in some cases!

The port approach makes a lot more sense to me.

dimitarvp

dimitarvp

Awesome. Have you considered writing a blog post about lessons learned on how to integrate with db_connection?

hauleth

hauleth

I can consider it, though there weren’t any major bumps in the process. But I can try to write some small article about that. db_connection is pretty straightforward, so it isn’t that hard to come up with something.

Where Next?

Popular in Announcing Top

jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement