#346 Backend for the Feed widget and the My Stream page
Closed: Fixed 4 years ago Opened 5 years ago by abompard.

Currently, there's no backend for the Feed widget and the My Stream page. All data comes from the static actions.json file in the code.

The contents should come from Fedmsg. The My Stream page contents will be the user's notifications coming from FMN, and the Feed widget content will be the messages that affect the user, including their own.

Both types of messages will be stored in Redis, because it's easy to limit the queue size there, and the SQL DB makes less sense since the data is transient. There will be a queue for notifications per user, and a queue for generic activity per hub.

A notification message will be added to the corresponding user's notification feed. For generic activity messages, the list of affected user will be extracted from the message with fedmsg.meta.msg2usernames(), and the message will be added to the feed of every hub (user or group) that each of those users is a member (or an owner) of. As a result, a Hub feed will contain the activity concerning any of its members.

When a message of any type is added, the SSE server will receive a notification and tell the browser to reload the widget. This notification will be transmitted using a Redis queue to the SSE server (which does not exist yet either). The SSE server will then dispatch this notification to all connected clients, which will reload the related widget. This SSE server need to handle a lot of long-lived HTTP connections and a single connection to Redis, it will thus be implemented with Twisted.


Luckily I saw this in my email and can help provide info.

I started work on this last summer and the original source can be found here https://github.com/fedora-infra/fmn.sse it has been since merged with fmn here https://github.com/fedora-infra/fmn/tree/develop/fmn/sse

This handles the SSE traffic which behind the scenes connects to a rabbitmq queue for stored messages.

The messages will be loaded into the queue by fmn.consumer.sse backend which can be found here

https://github.com/fedora-infra/fmn/blob/develop/fmn/consumer/backends/sse.py

I haven't been keeping up with development recently but @jcline could probably clarify more if I missed any details.

Hopefully this is what you were asking?

Metadata Update from @skrzepto:
- Issue priority set to: High

5 years ago

Metadata Update from @sayanchowdhury:
- Issue assigned to abompard

5 years ago

Metadata Update from @sayanchowdhury:
- Issue set to the milestone: Flock 2017

5 years ago

Metadata Update from @sayanchowdhury:
- Issue set to the milestone: None (was: Flock 2017)
- Issue tagged with: enhancement

4 years ago

Metadata Update from @abompard:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata