-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notification concatenation support #5
Comments
@v1k45 if we change the update view to receive a timestamp instead of notification id? With a timestamp the server can send back all the updates since then, and the javascript part can do the local updates based on the IDs that are new, and the ones that are already on the DOM, but need to be updated. On the regards of doing websockets, there's a plan to bring channels to Django 1.10, backported to 1.8 and 1.9. But it may take a while. This project was chosen to be founded by Mozzila to receive US$ 150k. So I think that will be the best way to do websockets on Django. |
Yeah, updating things with respect to the last modified timestamp is indeed a good idea. I think we should follow the ajax polling approach until channels is added into django. Also, this approach will drop support for anonymous text field for actors and target. I just wanted to know if the anonymous fields are important for a anyone other than me. If not, we can simply remove them before anyone uses the app in production. |
Notification concatenation features are added in nf_concat_support branch. Currently, it only supports I'll try to extend support as soon as possible :) |
Any progress? |
I am trying to implement notification concatenation support for the app.
Notification concatenation will give ability to add multiple actors to the notification instead of creating separate notification.
It will render the notification like John, Joe and 24 others followed you instead of rendering all 26 notifications with the same
target
andrecipient
separately.This implementation will simply update the time stamp of the notification and add actors to it. This creates a problem because the notification update view uses notification id as the flag to fetch new notification which are greater than that of the notification id sent by the flag parameter (read more @ docs). It will not update the primary key of the notification, so fetching new notification will be quite a mess here.
So, I thought of changing the update mechanism from ajax polling to websockets. The problem is, there are many ways to do it but the popular way is either to use Node.JS or to follow a python approach where a change in WSGI settings is required.
My question is What will be the best way to do add websocket support to the app?
The text was updated successfully, but these errors were encountered: