Skip to content

Commit

Permalink
Add internal pubsub to README
Browse files Browse the repository at this point in the history
  • Loading branch information
boreq committed Dec 22, 2023
1 parent 4f0b916 commit 682f751
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Expand Up @@ -36,6 +36,21 @@ The reasoning is that suddenly seeing tweets for notes that are quite old would
be confusing and probably not desired. Additionally there is almost no chance
that we will ever manage to post those tweets based on the metrics I am seeing.

### Internal sqlite pub sub

In order to handle Twitter API errors tweets are scheduled to be sent by publishing them to an internal queue. Think of this in terms of a command bus.

```mermaid
flowchart TB
process-received-event-handler["ProcessReceivedEventHandler"]
send-tweet-handler["SendTweetHandler"]
tweet-created-event-subscriber["TweetCreatedEventSubscriber"]
process-received-event-handler --> |pubsub event| tweet-created-event-subscriber
tweet-created-event-subscriber --> |command| send-tweet-handler
```


## Building and running

Build the program like so:
Expand Down Expand Up @@ -222,4 +237,4 @@ used in the following cases:
[uber-style-guide]: https://github.com/uber-go/guide/blob/master/style.md


[purplepages]: https://purplepag.es/what
[purplepages]: https://purplepag.es/what

0 comments on commit 682f751

Please sign in to comment.