Previously, the nostr event data was being transformed into
serde::Value, which is incompatible with the current notification
extension implementation. This commit fixes that by serializing it all
into a single JSON string
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit should drastically improve performance of the relay.
It reduces contention by removing the mutex on NotificationManager and
replacing it with several smaller mutexes for each shared resource, so
that more operations can happen concurrently.
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
If a relay does not have a user's mutelist, a function in our pipeline
would wait indefinitely, causing all other requests to be locked as
well.
This commit adds a timeout to avoid this issue
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Previously, the APNS client would be reinitialized in every send.
This commit makes it so that the client is initialized with the rest of
Notification manager, to avoid performance and token management issues.
This commit brings a compilable, runnable relay draft, with logging
setup, basic README instructions, Mutex protection around shared
resources, implemented with code safety in mind
Notes:
- This is not fully tested
- The mutex design is not the most efficient, and could cause some contention on high traffic
- The REST API is not yet integrated