Skip to content
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

Relay Management / Outbox Model #41

Merged
merged 6 commits into from
Nov 12, 2024
Merged

Relay Management / Outbox Model #41

merged 6 commits into from
Nov 12, 2024

Conversation

prolic
Copy link
Collaborator

@prolic prolic commented Oct 25, 2024

Relay Management / Outbox Model

Core Changes

  1. Complete rewrite of relay connection handling

    • Separated DM relays from general relays
    • Added proper connection state management
    • Improved error handling and retry logic
    • Added connection status tracking and UI feedback
  2. New Relay Management UI

    • Added dedicated relay management dialog
    • Visual connection status indicators
    • Separate handling for DM vs general relays
    • Add/remove relay functionality
    • Connection state monitoring
  3. Architecture Changes

    • Split relay handling into separate modules
    • Added RelayConnection module for connection management
    • Added Publisher module for event broadcasting
    • Improved state management with separate RelayPoolState
  4. Protocol Implementation

    • Added support for NIP-65 (Outbox Model)
      • Smart event publishing to appropriate relays
      • Publisher module handles write-only relays
      • Efficient event distribution
    • Added support for NIP-17 (Preferred DM Relays)
      • Dedicated DM relay management
      • Automatic DM relay list publishing
      • DM relay discovery and synchronization

Key Features

  • Real-time relay connection status display
  • Connection retry handling with visual feedback
  • Separate inbox/outbox relay configuration
  • Improved DM relay management
  • Better error handling and user feedback
  • Persistent relay configurations
  • Smart event publishing via outbox model
  • Efficient DM relay handling

Technical Improvements

  • More robust websocket connection handling
  • Better state management for connections
  • Improved error recovery
  • Better type safety around relay configurations
  • Protocol-compliant event publishing

@prolic prolic marked this pull request as draft October 25, 2024 01:11
@prolic prolic changed the title [WIP] Relay mgmt [WIP] Relay Management Oct 26, 2024
@prolic prolic changed the title [WIP] Relay Management [WIP] Relay Management / Outbox Model Oct 29, 2024
cabal.project Outdated Show resolved Hide resolved
cabal.project Outdated Show resolved Hide resolved
- Add support for preferred DM relays (NIP-17)
- Add Relay Management UI
- Add Publish Manager tracking publish status
- Add granular UI updates to reduce unnecessary refreshes
- Use async/waitAnyCancel pattern for read/write loops
- Clean up connection termination logic
- Remove unnecessary reconnection logic from nostrClient
- Add proper error handling in send/receive loops
@prolic prolic changed the title [WIP] Relay Management / Outbox Model Relay Management / Outbox Model Nov 12, 2024
@prolic prolic linked an issue Nov 12, 2024 that may be closed by this pull request
@prolic prolic marked this pull request as ready for review November 12, 2024 22:09
@prolic prolic merged commit 810d2ae into master Nov 12, 2024
2 checks passed
@prolic prolic deleted the relay_mgmt branch November 12, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NIP-17: Kind 10050 indicates the user's preferred relays to receive DMs.
1 participant