◄ ► | Edit | Home | Admin | en de fr et | Sign in

#4174 (Improve serviceWorker)

by Sharif Mehedi · in Developers · assigned to Sharif Mehedi

Summary

Children

Comments

  • 5 years, 5 months ago by Sharif Mehedi about #4174 (Improve serviceWorker) : Added serviceworker in extjs and got working push notifications.
  • 5 years, 5 months ago by Sharif Mehedi in reply to Luc Saffre about #4174 (Improve serviceWorker) : I think it is unnecessary to wait for all the notification to be sent out when a user submit some change. I did experiment with asyncio, asgiref and multiprocessing. multiprocessing module works best in our case.
  • 5 years, 5 months ago by Luc Saffre in reply to Sharif Mehedi about #4174 (Improve serviceWorker) (1 reply) : Then I suggest that we let this topic sleep at the moment, until somebody complains that submitting a ChangeNotifier is too slow. At the moment this is only a theoretic issue after all.
  • 5 years, 5 months ago by Luc Saffre about #4174 (Improve serviceWorker) : I uploaded a screenshot of a facebook desktop notification.
  • 5 years, 5 months ago by Sharif Mehedi about #4174 (Improve serviceWorker) (1 reply) : did some research: async/await (asgiref or asyncio) is not a good candidate for asynchronous notifications, for reasons like, async funtions should be awaited in sync context but we do not want to await for notifications to be done, we want to spawn a process that will send notification independently...
  • 5 years, 5 months ago by Luc Saffre in reply to Sharif Mehedi about #4174 (Improve serviceWorker) : Sounds true and interesting. I guess that the application code could even provide the recipients as an iterator. The "created" timestamp should be the moment where the notification is emitted, and it should remain the same for all Message records.
  • 5 years, 5 months ago by Luc Saffre in reply to Sharif Mehedi about #4174 (Improve serviceWorker) : For example Facebook doesn't use images. Just simple plain text notifications. The important thing is to have an "Activate" button, which should lead to the relevant page on theLino site. And this we do have now. So yes, let the image idea mature.
  • 5 years, 5 months ago by Sharif Mehedi about #4174 (Improve serviceWorker) (1 reply) : About determining the recipients list, Message.emit_notification() can have asynchronous functionality.
  • 5 years, 5 months ago by Sharif Mehedi about #4174 (Improve serviceWorker) (1 reply) : I am thinking, maybe converting the notification text into an image is a bad idea. Maybe I should wait until this idea mature, before deciding whether to discard this idea or to go on with it.
  • 5 years, 5 months ago by Luc Saffre about #4174 (Improve serviceWorker) : Ideas: use pillow to convert the notification text into an image. Determining the recipients list should be done "asynchronously".
  • 5 years, 5 months ago by Luc Saffre about #4174 (Improve serviceWorker) : For later: broadcast notifications. Review the internal methods. I guess that we will remove the seen field (and also the "don't notify when an unseen message exists).
  • 5 years, 5 months ago by Luc Saffre about #4174 (Improve serviceWorker) : TODO: add the client's language to the notify.Subscription model.
  • 5 years, 5 months ago by Luc Saffre about #4174 (Improve serviceWorker) : If it's possible, it would be nice to get push notifications to work in ExtJS as well.
  • 5 years, 5 months ago by Sharif Mehedi about #4174 (Improve serviceWorker) : I implemented ServiceWorkerRegistration.onupdatefound, which will serve the following purpose: on serviceWorker's script update an already running serviceWorker (on some browser client) will automatically update itself.