Your Questions About CouchDB 3.4.2, QuickJS, and Nouveau Answered posted Wednesday, November 13, 2024 by The Neighbourhoodie CouchDB Team
Several weeks ago we hosted our CouchDB Meetup and so many great questions about the new CouchDB release were posed that we’ve collected them here. If you are curious about CouchDB 3.4.0 - 3.4.2, QuickJS or Nouveau, these answers should give you some idea of what to look forward to in the update.
We’ve included links to the talks themselves, as well as to more detailed introductory posts and guides for upgrading or installing.
3.4.0 - 3.4.2
At the time of writing, 3.4.2 is the latest version of CouchDB. You can download CouchDB directly from our website and find out more about this version in the CouchDB documentation.
If you’re running a previous version of CouchDB, we’ve written an article with concrete recommendations and tips to help you upgrade.
Question: Any chance we see JDBC or JPA driver support at some point?
Answer: These look like SQL adapters. CouchDB directly probably won’t ever support those, BUT, we have built a SQL query engine for CouchDB that you should be able to use directly (it uses SQLite under the hood): Neighbourhoodie’s Structured Query Server.
Introducing QuickJS: CouchDB’s New Javascript Engine
📺 Ninette Adhikari: QuickJS — CouchDB’s New JavaScript Engine
Here is the benchmark script that Ninette used.
QuickJS ships with new versions of CouchDB and can be used in parallel to SpiderMonkey, CouchDB’s previous JavaScript Engine, so you can compare before you commit. We’ve written an introduction to QuickJS that covers what it is, how to use the scanner plugin that makes switching easier, and tips for getting started.
Q: Does this also improve custom reduce function performance? Refer to #3517: Performance regression on CouchDB v3 while using custom reduce function
A: QuickJS does understand SM185-style functions and it does not have to do the transpile! Refer to SpiderMonkey 185 Patch.
Switching to quick_js would need reindexing since the view signature contains the language field which is different for quickjs language: javascript_quickjs. The only way to switch without reindexing is switching the js_engine config over. But you can only do that when you know the results are the same with the background checker.
First Steps with Nouveau
📺 Alex Feyerke: First Steps with Nouveau, CouchDB’s New Full-text Search
If you’ve been using Clouseau for full-text search on CouchDB then Nouveau is a welcome — and much faster — upgrade. We have an in-depth Nouveau starter guide that covers installation and shows off what’s possible with Nouveau, from fuzzy search to facets.
Q: Roughly how much extra disk usage should be expected from nouveau indices?
A: That strongly depends on how much data you pass into your index()
function and how many docs you have. But Lucene is the Gold Standard for full-text search, it’s usually as good as it gets
Q: Do you have any hints on how to use an index with documents “owned” by different people? Is there a way to build a different index for every owner (and maybe a “public owner”) as what we would do with a CouchDB view?
A: If user means “has a different auth”, then that’s not a thing the CouchDB supports (yet), but I’m (slowly) working on per-doc-access that might get us there eventually.
Q: Does everything work with partitions or is this all global? What is the relationship with the cloudant search/query products? Is this the same code as used by cloudant search or cloudant query or is this something new/separate?
A: This is a complete new implementation, it has no implementation overlap with Cloudant search. Cloudant Search is already available as the existing CouchDB Search plugin aka Clouseau/Dreyfus. but it is stuck on an old JVM and Lucene version and uses Scalang which is EOL (see early in the talk).
According to the docs, you can query partitions, only counts and ranges don’t work there.
Q: Is Nouveau also shipped in the Docker release or in a different Docker image? I tried to configure the two images but they didn't want to talk to one another…
A: Either works :)
Ooh. Does it listen on the port as soon as we change the setting? (in the docker version)
Ah, that might not work, best use the standalone image. You just need to overwrite the url in the couchdb config to point to your docker image.
Ah maybe that’s the reason why it didn't work. Thank you. I will try with different docker virtual hostnames. Such as host.docker.internal
.
The debs and rpms have normal service files and there is a standalone docker image as well.
Join Us Next Time
If you’d like to learn about our next meetup, join our mailing list. You can also catch up with recordings from earlier meetups in our vi.to hub.
In the meantime, keep up with new CouchDB releases on the CouchDB blog and check out the CouchDB Release Notes for all the details.