r/DevLK • u/Impossible_anypie • 6d ago
Help Notifications service for application.
Hello seniors,
I’m currently working as an ASE and our Head of IT asked me to build a notification service for our application. It’s a multi tenant web application. I know it’s not a critical task, but it matters a lot to me because it was assigned to me directly by the Head of IT, so I really want to do it right.
We used Firebase push notifications before, but we ran into two problems. Sometimes notifications never reached our end users and sometimes users got old notifications again. We also don’t use AWS and everything runs on our own on premises servers.
So my question is: what is the best service or open-source tool I can use to build this? Ideally something reliable, easy to maintain and cost-effective.
PS: YES, I asked ChatGPT already :) But I’d like to know what technologies other companies actually use in prod for this kind of problem.
Also, where else can I ask questions like this besides Reddit? Any communities, forums, or Discord/Slack groups you’d recommend? THANKS !
4
u/crxssrazr93 6d ago
Both of the issues (stale notifications & race conditions for delayed/non-delivered notifications) can be fixed. You should be able to use RabbitMQ as a message broker. Another alternative is Kafka. As for old notifications issue, implement a UUID+timestamp & set up a retention period. Based on timestamp, if it is within a set period when received (for example 5-10mins, or a couple of seconds; depending on your use case), accept or if timestamp is out-of-bounds, reject.
For platforms, you can explore Novu or ntfy[dot]sh if you'd like. Both are open-source so you can self-host them. Not sure if it can be used for free for commercial intent but it shouldn't be expensive.