apache / couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
https://couchdb.apache.org/
Apache License 2.0
6.16k stars 1.02k forks source link

Query Server protocol future/stability. #5139

Open hubodz opened 1 month ago

hubodz commented 1 month ago

Hello! I consider writing custom query server in Python. I'm wondering to what extent I can assume that the query server protocol will be stable (or at least backwards compatible) in the forseeable future.

Are you able to share your thoughts on that?

nickva commented 1 month ago

The query server is protocol is pretty stable. The most recent additions to it over the years are the index_doc for clouseau search integration and nouveau_index_doc (on main only). If you only plan on using a subset of functionality, could try implementing just some of the commands.

Some years ago I had actually used the Python query server from https://github.com/djc/couchdb-python/blob/master/couchdb/view.py in production. It worked decently well with CouchDB 1.x series. Some docs about it: https://couchdb-python.readthedocs.io/en/latest/views.html. The project unfortunately is no longer maintained. But that could provide a starting point, perhaps.

To get an idea of how the query server gets called search for proc_prompt in the source code: https://github.com/search?q=repo%3Aapache%2Fcouchdb%20proc_prompt&type=code