I have a mobile application that syncs documents with couchbase server using sync gateway. When the mobile client pushes a document to the server that requires a task to be run, the sync function adds this document to the “daemon” channel. On the server, I have a script that listens to the changes feed of this “daemon” channel and executes the tasks. In order to keep track of which tasks were already performed, the program saves the last sequence number to the database. When the server process is restarted, it fetches this sequence number from database and passes this to _changes?since=last_sequence, continuing where it stopped before.
Now my question: Is it a problem, that with this architecture the number of documents inside the “daemon” channel grows indefinitely as I never remove the documents from the channel? Will this cause performance issues in the long run, and would it therefore be better to remove the docs from the channel after a task has finished?