Tobi,
Background tasks are the solution 99% of the time. If you can; use them.
Depending on the semantics of your notification requirements, you may
be able to get by with one of two other solutions (that I've
conveniently already written). The first is basically a poll-based
chat server:
https://gist.github.com/1045789 , and requires that all
clients know that a message will come on channel X, and everyone is
broadcasting on the same channel X (think of it like a poll-based
pubsub, where your choices of subscriptions are stated in every
query). Each client says "give me stuff on these channels...", and the
messages are persisted for specific duration. The alternative is a
version that is in section 6.5.2 of my book, which requires explicit
subscription/unsubscription from a given channel, but which otherwise
behaves exactly like pubsub without wildcards, is poll-based, and
messages are persisted until all intended recipients have received the
message.
My guess is that background tasks are what you are looking for, however.
- Josiah