Browse Source

Clarify decision record for ADR-065. (#7062)

While discussing a question about the indexing interface (#7044), we found some
confusion about the intent of the design decisions in ADR 065.

Based on discussion with the original authors of the ADR, this commit adds some
language to the Decisions section to spell out the intentions more clearly, and
to call out future work that this ADR did not explicitly decide about.
pull/7067/head
M. J. Fromberger 3 years ago
committed by GitHub
parent
commit
109814c85a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 27 additions and 7 deletions
  1. +27
    -7
      docs/architecture/adr-065-custom-event-indexing.md

+ 27
- 7
docs/architecture/adr-065-custom-event-indexing.md View File

@ -25,6 +25,7 @@
- April 28, 2021: Specify search capabilities are only supported through the KV indexer (@marbar3778)
- May 19, 2021: Update the SQL schema and the eventsink interface (@jayt106)
- Aug 30, 2021: Update the SQL schema and the psql implementation (@creachadair)
- Oct 5, 2021: Clarify goals and implementation changes (@creachadair)
## Status
@ -73,19 +74,38 @@ the database used.
We will adopt a similar approach to that of the Cosmos SDK's `KVStore` state
listening described in [ADR-038](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-038-state-listening.md).
Namely, we will perform the following:
We will implement the following changes:
- Introduce a new interface, `EventSink`, that all data sinks must implement.
- Augment the existing `tx_index.indexer` configuration to now accept a series
of one or more indexer types, i.e sinks.
of one or more indexer types, i.e., sinks.
- Combine the current `TxIndexer` and `BlockIndexer` into a single `KVEventSink`
that implements the `EventSink` interface.
- Introduce an additional `EventSink` that is backed by [PostgreSQL](https://www.postgresql.org/).
- Implement the necessary schemas to support both block and transaction event
indexing.
- Introduce an additional `EventSink` implementation that is backed by
[PostgreSQL](https://www.postgresql.org/).
- Implement the necessary schemas to support both block and transaction event indexing.
- Update `IndexerService` to use a series of `EventSinks`.
- Proxy queries to the relevant sink's native query layer.
- Update all relevant RPC methods.
In addition:
- The Postgres indexer implementation will _not_ implement the proprietary `kv`
query language. Users wishing to write queries against the Postgres indexer
will connect to the underlying DBMS directly and use SQL queries based on the
indexing schema.
Future custom indexer implementations will not be required to support the
proprietary query language either.
- For now, the existing `kv` indexer will be left in place with its current
query support, but will be marked as deprecated in a subsequent release, and
the documentation will be updated to encourage users who need to query the
event index to migrate to the Postgres indexer.
- In the future we may remove the `kv` indexer entirely, or replace it with a
different implementation; that decision is deferred as future work.
- In the future, we may remove the index query endpoints from the RPC service
entirely; that decision is deferred as future work, but recommended.
## Detailed Design


Loading…
Cancel
Save