[GH-ISSUE #9] Make ntfy a UnifiedPush distributor #9

Closed
opened 2026-05-07 00:18:21 +02:00 by BreizhHardware · 11 comments

Originally created by @binwiederhier on GitHub (Nov 20, 2021).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/9

Originally assigned to: @binwiederhier on GitHub.

https://unifiedpush.org

Originally created by @binwiederhier on GitHub (Nov 20, 2021). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/9 Originally assigned to: @binwiederhier on GitHub. https://unifiedpush.org
Author
Owner

@karmanyaahm commented on GitHub (Nov 30, 2021):

Hello, ntfy is a really cool project. I'm guessing you're planning to use UnifiedPush as an alternative for FCM here. If you have any questions, feel free to reach out to us on our Matrix chat #unifiedpush:matrix.org or IRC chat #unifiedpush

Another interesting idea would be to make ntfy a UnifiedPush distributor (i.e. UnifiedPush over ntfy), however that's just speculation right now 💭

<!-- gh-comment-id:982298344 --> @karmanyaahm commented on GitHub (Nov 30, 2021): Hello, ntfy is a really cool project. I'm guessing you're planning to use UnifiedPush as an alternative for FCM here. If you have any questions, feel free to reach out to us on our Matrix chat [#unifiedpush:matrix.org](https://matrix.to/#/#unifiedpush:matrix.org) or IRC chat [#unifiedpush](https://web.libera.chat/#unifiedpush) Another interesting idea would be to make ntfy a UnifiedPush distributor (i.e. UnifiedPush *over* ntfy), however that's just speculation right now :thought_balloon:
Author
Owner

@karmanyaahm commented on GitHub (Nov 30, 2021):

I'm looking at the code right now, and it seems like you're using broadcast topics in FCM, where the android client specifies the topics they're interested in. Given that UnifiedPush is decentralized, it wouldn't be possible to copy this model 1 to 1 (since there's no central authority that keeps track of which topics which device is interested in).

There are alternate but similar models that would minimize the amount of changes to the code. Please let me know if you're interested in discussing this further 😃 (I could also contribute Go code if you'd like)

<!-- gh-comment-id:982308262 --> @karmanyaahm commented on GitHub (Nov 30, 2021): I'm looking at the code right now, and it seems like you're using broadcast topics in FCM, where the android client specifies the topics they're interested in. Given that UnifiedPush is decentralized, it wouldn't be possible to copy this model 1 to 1 (since there's no central authority that keeps track of which topics which device is interested in). There are alternate but similar models that would minimize the amount of changes to the code. Please let me know if you're interested in discussing this further :smiley: (I could also contribute Go code if you'd like)
Author
Owner

@p1gp1g commented on GitHub (Nov 30, 2021):

I have published an app for unifiedpush that uses SSE with a nextcloud application a week ago : https://github.com/UP-NextPush/android ; It should be very easy to make this app an unifiedpush distributor.

I'd be very happy to do it/help to do it

Not needed but it can help for efficiency, having subtopic would be nice : a device would be effectively able to different topic, by subscribing to a single one : listening on /mytopic/see and being able to receive from /mytopic:sub1 and /mytopic:sub2 without re-subscribing to /mytopic:sub1,mytopic:sub2/sse ; (It can be done by adding a GET param sub for instance : POST /mytopic?sub=sub1)

Also, are all topics broadcast to FCM ?

<!-- gh-comment-id:982425102 --> @p1gp1g commented on GitHub (Nov 30, 2021): I have published an app for unifiedpush that uses SSE with a nextcloud application a week ago : https://github.com/UP-NextPush/android ; It should be very easy to make this app an unifiedpush distributor. I'd be very happy to do it/help to do it Not needed but it can help for efficiency, having subtopic would be nice : a device would be effectively able to different topic, by subscribing to a single one : listening on /mytopic/see and being able to receive from /mytopic:sub1 and /mytopic:sub2 without re-subscribing to /mytopic:sub1,mytopic:sub2/sse ; (It can be done by adding a GET param `sub` for instance : `POST /mytopic?sub=sub1`) Also, are all topics broadcast to FCM ?
Author
Owner

@karmanyaahm commented on GitHub (Nov 30, 2021):

Just as a clarification, I think @p1gp1g is talking about nfty distributor, i.e.

Another interesting idea would be to make ntfy a UnifiedPush distributor (i.e. UnifiedPush over ntfy), however that's just speculation right now

Whereas, in https://github.com/binwiederhier/ntfy/issues/9#issuecomment-982308262 I'm talking about regular UnifiedPush as an FCM replacement.

Both are interesting possibilities, however I just wanted to clarify the difference to avoid confusion :)

<!-- gh-comment-id:982769606 --> @karmanyaahm commented on GitHub (Nov 30, 2021): Just as a clarification, I think @p1gp1g is talking about nfty distributor, i.e. > Another interesting idea would be to make ntfy a UnifiedPush distributor (i.e. UnifiedPush over ntfy), however that's just speculation right now Whereas, in https://github.com/binwiederhier/ntfy/issues/9#issuecomment-982308262 I'm talking about regular UnifiedPush as an FCM replacement. Both are interesting possibilities, however I just wanted to clarify the difference to avoid confusion :)
Author
Owner

@binwiederhier commented on GitHub (Nov 30, 2021):

This all sounds veeery interesting. I'll have to read up on this and I'll definitely get in touch with you when I'm ready. I have a busy work day ahead of me, but I'll likely reach out via IRC tonight maybe. Which timezone are you guys in? I'm Eastern/US

<!-- gh-comment-id:982800947 --> @binwiederhier commented on GitHub (Nov 30, 2021): This all sounds veeery interesting. I'll have to read up on this and I'll definitely get in touch with you when I'm ready. I have a busy work day ahead of me, but I'll likely reach out via IRC tonight maybe. Which timezone are you guys in? I'm Eastern/US
Author
Owner

@p1gp1g commented on GitHub (Nov 30, 2021):

I'm CET, I mostly work on these projects during evening/night but I'm available to answer :)

Just as a clarification, I think @p1gp1g is talking about nfty distributor, i.e.

Indeed, I was talking about : I feel like it would make a perfect distributor! The public server, without registration, would make it a first place one actually :)

<!-- gh-comment-id:982824184 --> @p1gp1g commented on GitHub (Nov 30, 2021): I'm CET, I mostly work on these projects during evening/night but I'm available to answer :) > Just as a clarification, I think @p1gp1g is talking about nfty distributor, i.e. Indeed, I was talking about : I feel like it would make a perfect distributor! The public server, without registration, would make it a first place one actually :)
Author
Owner

@karmanyaahm commented on GitHub (Nov 30, 2021):

This all sounds veeery interesting. I'll have to read up on this and I'll definitely get in touch with you when I'm ready. I have a busy work day ahead of me, but I'll likely reach out via IRC tonight maybe.

No hurry. Thanks for making ntfy such a cool project.

Which timezone are you guys in? I'm Eastern/US

I'm in US central time, so right next to you.

<!-- gh-comment-id:982864854 --> @karmanyaahm commented on GitHub (Nov 30, 2021): > This all sounds veeery interesting. I'll have to read up on this and I'll definitely get in touch with you when I'm ready. I have a busy work day ahead of me, but I'll likely reach out via IRC tonight maybe. No hurry. Thanks for making ntfy such a cool project. > Which timezone are you guys in? I'm Eastern/US I'm in US central time, so right next to you.
Author
Owner

@binwiederhier commented on GitHub (Dec 25, 2021):

Hey @karmanyaahm & @p1gp1g, Merry Christmas!

I think I'm ready to work on the UnifiedPush integration now, though I'm not quite sure where to begin. I'll re-read the docs, but any guidance would be appreciated.

<!-- gh-comment-id:1001003466 --> @binwiederhier commented on GitHub (Dec 25, 2021): Hey @karmanyaahm & @p1gp1g, Merry Christmas! I think I'm ready to work on the UnifiedPush integration now, though I'm not quite sure where to begin. I'll re-read the docs, but any guidance would be appreciated.
Author
Owner

@karmanyaahm commented on GitHub (Dec 26, 2021):

Just for public record, this was further discussed on #unifiedpush:matrix.org and #unifiedpush-devs:matrix.org. That finalized the server part (#64), and now the client side is being worked on.

Also, I just realized github.com/binwiederhier/ntfy@020c058805/docs/publish.md (L847) will have to be changed since UnifiedPush can have messages up to (and including) 4000 bytes.

<!-- gh-comment-id:1001226745 --> @karmanyaahm commented on GitHub (Dec 26, 2021): Just for public record, this was further discussed on #unifiedpush:matrix.org and #unifiedpush-devs:matrix.org. That finalized the server part (#64), and now the client side is being worked on. Also, I just realized https://github.com/binwiederhier/ntfy/blob/020c058805de9fe77689af91f7de613eddadbfc3/docs/publish.md?plain=1#L847 will have to be changed since UnifiedPush can have messages up to (and including) 4000 bytes.
Author
Owner

@binwiederhier commented on GitHub (Dec 29, 2021):

Very early WIP, but I'll update it as I go along: https://github.com/binwiederhier/ntfy-android/pull/6

<!-- gh-comment-id:1002747750 --> @binwiederhier commented on GitHub (Dec 29, 2021): Very early WIP, but I'll update it as I go along: https://github.com/binwiederhier/ntfy-android/pull/6
Author
Owner

@binwiederhier commented on GitHub (Jan 1, 2022):

Done in https://github.com/binwiederhier/ntfy-android/pull/6/files

<!-- gh-comment-id:1003582947 --> @binwiederhier commented on GitHub (Jan 1, 2022): Done in https://github.com/binwiederhier/ntfy-android/pull/6/files
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#9
No description provided.