I need to develop a realtime recent activity feed in django (with AJAX long-polling), and I'm wondering what's the best strategy for the server-side.

Pseudocode:

```
def recent_activity_post_save():
    notify_view()

[in the view]
while not new_activity():
    sleep(1)
return HttpResponse(new_activity())

```

The first thing that comes in mind is querying the DB every second. Not feasible. Other options:

1. using the cache as a notification service
2. using a specialized tool, like Celery (I'd rather not do it, because it seems like overkill)

What's the best way to go here?