-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally emit location updates for indexing purposes #2789
Comments
This seems easy enough. I want to make sure I understand the use case though. When you say a custom indexer, is it a fork of ord, or is it a codebase that only uses the |
Our use case specifically is for Magic Eden's indexer, we currently maintain a fork https://github.com/magicoss/ord-kafka/tree/dev, the main change is to send location updates to Kafka for our internal indexing flows. But we would prefer to rely on |
Gotcha. Sending over a socket is maybe the long term solution, but that requires a bunch of choices, like what protocol, how to pass in the socket or address, etc, and how to serialize the data into the socket, so a channel probably makes sense. If you want to open a PR, it should be pretty easy. |
Proposal
Implement an optional feature where the
Index::update
method can emit inscription location updates to downstream consumers. This would make custom indexers depending onord
easier to build and maintain across version upgrades.Concretely, this would be implemented using channels. We can modify
InscriptionUpdater
to have atokio::sync::mpsc::channel::Sender
, then insideupdate_inscription_location
send a message containing the inscription id, old and new location, and other metadata.I would like to get some feedback on this idea before starting on any implementation!
Example
Below is some pseudocode demonstrating how the channel might set up and used:
The text was updated successfully, but these errors were encountered: