Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

emitter/flusher: Initial implementation #2022

Merged
merged 13 commits into from
Jun 25, 2020
Merged

emitter/flusher: Initial implementation #2022

merged 13 commits into from
Jun 25, 2020

Conversation

sorawit
Copy link
Member

@sorawit sorawit commented Jun 20, 2020

Initial implementation of emitter/flusher.

Emitter is an add-on to BandApp to publish state changes to remote Kafka. Currently messages are flushed on every Commit.

Flusher is a separate Python process that subscribes to messages the push changes to remote databases. It maintains the offset of Kafka messages to make sure no messages are missed.

This is POC implementation. More performance optimizations and features will be added in the future.

@render
Copy link

render bot commented Jun 20, 2020

@sorawit sorawit force-pushed the emitter-flusher-v0 branch from 8af621f to e7f4e4b Compare June 22, 2020 10:48
flusher/flusher/sync.py Outdated Show resolved Hide resolved
@sorawit sorawit requested a review from tansawit June 22, 2020 16:01
chain/emitter/app.go Outdated Show resolved Hide resolved
}
switch msg := msg.(type) {
case oracle.MsgRequestData:
app.handleMsgRequestData(txHash, msg, evMap, extra)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this function choose to send extra instead of return extra like handleMsg?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we don't need to create a new JsDict instance everywhere.

@sorawit sorawit requested a review from taobun June 23, 2020 17:18
@sorawit sorawit force-pushed the emitter-flusher-v0 branch from c7e4cbf to 71f9c78 Compare June 25, 2020 03:30
@Benzbeeb Benzbeeb merged commit a78ccc7 into master Jun 25, 2020
@Benzbeeb Benzbeeb deleted the emitter-flusher-v0 branch June 25, 2020 03:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants