CouchApp function deprecation

August 16, 2022 | Glynn Bird | Deprecation CouchApp

IBM Cloudant, the Database-as-a-Service based on the Apache CouchDB project, is giving notice that the following features are deprecated:

These four features are already deprecated in Apache CouchDB and scheduled to be removed from the code in CouchDB 4.0. None of these features are exposed in our Cloudant SDKs.


Photo by Hal Gatewood on Unsplash

Although these features are deprecated, they will not be removed from the service yet. We may completely remove this features in due course, but will leave them operable for the time being to give customers time to modify their applications. As deprecated features, they will not appear in our documentation, their use is not recommended and they will not be supported by our Support team.

Alternatives 🔗

Show and List function simply transform single documents and view rows, respectively, within Cloudant before returning data to the client. This functionality can be easily reproduced by transforming Cloudant’s usual JSON reponses on the client side.

Rewrite functions are used in CouchApps, where a web application is hosted by Cloudant - CouchApps were deprecated in October 2021 so application hosting must be undertaken by a separate web server or hosting provider which can perform the routing logic.

Update functions have two main use-cases:

  1. Modifying a document prior to writing - this logic can be transferred into client-side application logic instead i.e. if you need a timestamp recording inside every document written, add this field in your client-side logic.
  2. Deciding whether a document is written or not - this logic can be implemented on the client side, or as Javascript logic in a Validate Document Update function (VDU) - VDU functions have not been deprecated.