Live data from Hacker News

Gotify – a self-hosted push-notifications service

github.com

21–30 of 100 posts

Re: Gotify – a self-hosted push-notifications service

#21

It is worth noting that this will use a noticeable amount of power more than Google cloud messaging. The basic idea of how is works is about the same, but the devil is in the details. If you look at an idle connection over LTE, you will notice that after a while your carrier will close it. You need keepalives. If you look at the connection for Google cloud messaging, you might notice that it needs much fewer keep ali…

In my experience it's not bad enough to worry about.

I have:

- Signal - Whatsapp - Etesync - Conversations.im - Syncthing

all whitelisted from battery optimisation, and I've not noticed any huge drain (I expected it to be unusable and have to go back to google play services or micro-g).

Re: Gotify – a self-hosted push-notifications service

#22
post #15
post #12

Earlier quoted context omitted.

Is that because carriers have put GCM/FCM on some sort of white-list?

Probably because GCM/FCM has been very well optimized.

TCP connection can be open and idle for hours without keep alives. This can easily be configured with kernel parameters:

https://www.tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepaliv...

I suspect the hard bit for normal apps is keeping the app active on the device while it is in the background. Google has their FCM receiver running as a low level service so can make sure it is always running.

Re: Gotify – a self-hosted push-notifications service

#27
post #23

I'm not up to date with Android, but why does displaying notifications require an entire server or a paid service? Is it not just a matter of installing a client program and sending a curl to an endpoint?

It is not needed for displaying the notification but specifically targeting users. You would usually call an FCM function to get a token, which can be used to specifically target that user and is stored in the database. To send a notification to your customised target audience based on user-generated events, it becomes essential to use web-service that does it for you.

For example- Let's say you wish to send a notification to user A when user B sends him a message. In this scenario, you can call another FCM fn, using the token user A had generated. Of course you can use the web dashboard to send the notifications, but in this case, you would not be able to send event-based notification reliability and in real-time. Other services also work in a similar manner.

Re: Gotify – a self-hosted push-notifications service

#29
post #9
post #3

Interesting project. Is this intended to replace Firebase Cloud Messaging on android or be a wrapper in front of it? I only saw android support, anything for iOS in the works?

From what I can tell it appears to be a replacement FCM/APNS. The client subscribes directly via websocket to a self-hosted server (Go binary). New messages in the queue are then notified (gotified) via the websocket. https://gotify.net/api-docs#/message/streamMessages The payload can be picked up and managed via REST API as well. I'm building a similar solution for a slightly different usecase, so wanted to have a l…

Thanks for clarifying. This could be a good solution for a non Google play type phone, or just someone who doesnt want t rely on Google servers. It would just mean in the latter case there would always be 2 open connections listening for messages...

Re: Gotify – a self-hosted push-notifications service

#30

Funny, I was just looking for an alternative to pushover that doesn't use google services last week. Tested this and it worked quite well. I actually wound up just using an SMS gateway provider with a simple API you can just fire a get request to.

Sending a text message uses the GET verb? Yuck.
Post reply on HN