Skip to content

Commit

Permalink
Update README.md with diagrams
Browse files Browse the repository at this point in the history
  • Loading branch information
dcadenas authored Mar 12, 2024
1 parent 872eb14 commit 16d31bc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Nos Event Service


A service which crawls relays to replicate events relevant to Nos users which
then get passed to other services e.g. the notification service or the
moderation service.
Expand All @@ -19,6 +20,12 @@ a set of bootstrap relays returned by
The contacts are discovered by using the code located in
[`ContactsExtractor`][contacts-extractor-search] to scan nostr events.

![Image](https://github.com/planetary-social/nos-event-service/assets/18184/5af04679-d5a6-4897-b08c-3cea9ecc1795)

### Interaction with the notifications service

![Image](https://github.com/planetary-social/nos-event-service/assets/18184/c725b066-0f35-4e61-9a4b-94f820dfbc05)

### Internal sqlite pub sub

In order to process events asynchroniously (which can take a while as we push them to our relay) there is an internal pubsub in place between `SaveReceivedEventHandler` and `ProcessSavedEventHandler`. We use a custom publisher and subscriber instead of the ones provided by Watermill so that we can process messages out of order. This helps if one of them gets stuck. The metrics for this pubsub are reported and can be seen in Grafana.
Expand Down

0 comments on commit 16d31bc

Please sign in to comment.