Tikv: Is it feasible to enable watch mechanism on top of Tikv

Created on 27 Nov 2018  路  8Comments  路  Source: tikv/tikv

Is it feasible to enable watch (pub/sub) mechanism on top of tiKV? Rather than pulling a key value for changes, I'd the client be notified in case of the change and know the change version.

Thanks

statuproposal

Most helpful comment

After added Watch and TTL feature, tikv can repace etcd. :sweat_smile:

All 8 comments

Hi @CindyXing

It is a cool idea, but now we haven't supported it yet. We can have a deep discussion if you have some ideas on how to implement it :-)

@siddontang, sounds good. Sent email to your gmail account. We can start from there.

Hi @CindyXing, @siddontang maybe this could be an RFC?

Perhaps an http client can be setup for this. You set an http endpoint in the TiKV config and each time a key is updated the http client sends a request to the configured endpoint.

Need this functionality for a project, wouldn鈥檛 mind putting a PR together if this sounds good...

Please implement the watch functionality exactly as in etcd. First of all -- ability to watch since the specified revision. This thing guarantees we don't lose events on watcher reconnects. Also do not forget about compactions of db (i.e. removing of old/obsolete revisions).

Having this in tidb (not only in tikv) would make it killer-feature. Now I know only the two DBs with the feature: etcd and Apple Foundation DB.

After added Watch and TTL feature, tikv can repace etcd. :sweat_smile:

Has been this implemented already? Does TiKV support watch mechanism as etcd does? Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

breeswish picture breeswish  路  6Comments

brson picture brson  路  5Comments

siddontang picture siddontang  路  7Comments

fredchenbj picture fredchenbj  路  8Comments

iosmanthus picture iosmanthus  路  3Comments