Nexus Watcher
Nexus Watcher is a service that monitors events from a Pubky homeserver and updates the Nexus databases accordingly.
It polls for events from the /events endpoint of a homeserver and processes them ensuring that the graph database (Neo4j) and Redis indexes remain synchronized.
Features
-
Event Processing:
Processes various types of events such as posts, bookmarks, follows, mutes, tags, and user profile updates usingpubky-app-specsobject builder. -
Retry Mechanism:
Supports retry logic for events that fail to index due to missing dependencies or other transient errors -
Integration with Nexus Common:
Leverages shared components from thenexus-commoncrate for configuration, database access, logging, and stack management -
Configurable and Extensible:
Provides a builder API to configure service parameters such as the homeserver Pubky ID, database settings, logging level, testnet mode, and more -
Comprehensive Testing:
Comes with an extensive test suite covering all event types and error conditions
Quick Examples
The main entry point is available via the builder in the nexus_watcher::builder module. For example, you can start the watcher using:
use NexusWatcher;
async
Alternatively, if you prefer to load the configuration from a file:
use NexusWatcher;
use PathBuf;
async
License
This project is licensed under the MIT License.