Query Server protocol future/stability.
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?
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
The current stdio based protocol has been stable for over a decade, modulo adding commands, and probably will remain so.
There is some work in the aborted FoundationDB fork that introduces a new HTTP based protocol and that’s something that we might adopt in mainline at some point, but there are no concrete plans for this at the moment.