Hubmakerlabs / replicatr

Nostr relay with Internet Computer integration for inter-relay synchronization
https://mleku.dev/git/replicatr
GNU General Public License v2.0
13 stars 1 forks source link

track subscriptions on the IC #35

Closed mleku closed 4 months ago

mleku commented 5 months ago

in order to facilitate immediate propagation of new events related to existing subscriptions, the IC canister needs to have a short term storage table containing all active filters currently in open subscriptions, and when new events are stored, the filters are applied to them and if they match, logged in relays should be sent notifications of a match

this will also require some kind of filter identification scheme, probably a truncated hash of the receiver will suffice, and this key needs to be linked in to the relay side so that when the notifications are received the relevant subscriber is sent the matching event

mleku commented 4 months ago

this is being done simply by polling the IC and relevant events will be caught by the add events code