Description
As of now, the only way to add a Timer to a doc is in the OnUpdate/OnDelete handler. This requires that the logic to add a Timer to a doc be run through all the changes in the cluster and entails overheads.
An easier way would be to have a programmatic scheme by which timers can be attached to existing doc. The SDK could enforce the creation of timer, though the execution of the timer is still left to the Couchbase Eventing Service.
The added advantage of this approach is that, the SDK could decide which documents to iterate through/select for the creation of the doc.
Note: given that we are going towards a metastore based implementation for timers, am hoping that there will be an API for exposing the metastore to support the above; but will leave the actual design to Engg. The metastore api need not be exposed to the outside world for consumption.