XSF Discussion - 2019-06-08


  1. pep.

    Anybody looked into https://developer.mozilla.org/en-US/docs/Web/API/Push_API and how that would work with 357 (push notifications)? From what I understand we don't need the App Server bits?

  2. Dele Olajide

    >pep.: From what I understand we don't need the App Server bits? I have implemented this with Converse and Openfire. You don't need app server to push the messages. Service worker talks direct to push service. You still need the subscription endpoint data to be stored securely for each client service worker on a server. In my case, I used user properties in Openfire. It would be nice to do a simpler version of XEP 357 for web clients that cuts out the app server and uses PEP or private Storage to store the push subscription endpoint data.

  3. pep.

    Where is the code? :)

  4. pep.

    We actually spent time today implementing it again in converse.. (and prosody)

  5. Ge0rG

    What's a service worker in that context?

  6. pep.

    JS

  7. pep.

    https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker

  8. pep.

    Dele Olajide, why PEP btw

  9. pep.

    The client should probably just enable web push each time it connects. If you put stuff in PEP you can't reliably identity yourself back anyway can you.

  10. pep.

    The server is able to GC dead endpoints by sending something to them, and the push server will reply with "it's dead Jim"

  11. Dele Olajide

    >Ge0rG: What's a service worker in that context? The persistent code that runs on the client that handles the push notification from the browser vendor push service

  12. Dele Olajide

    >pep.: Dele Olajide, why PEP btw no particular reason. I used non-standard user properties in my openfire server plugin implementation

  13. pep.

    Do you have a link to your implementation btw?

  14. Ge0rG

    Dele Olajide: then I don't understand how you don't need an app server

  15. pep.

    Ge0rG, because the client dev doesn't have to register anything

  16. pep.

    The application itself can request a slot using the Web Push API. The Push server sends back an endpoint url that it passes to the XMPP server

  17. Dele Olajide

    I did not add that openfire was sending the push notifications by making direct requests to vendor push service

  18. pep.

    https://hackmd.io/bKFV8ew8TAuIzMTnuhmFPQ?view#Enabling-Flow Please don't look at the rest, it's ready just for testing between us today, nothing might stay the same

  19. Ge0rG

    And since when can an xmpp server talk to web endpoints?

  20. pep.

    prosody has net.http apparently, an http client

  21. pep.

    **it's really just for us testing today

  22. Ge0rG

    So you implemented the app service inside of openfire...

  23. pep.

    yeah you can say that

  24. pep.

    The App Server just being an http client

  25. Dele Olajide

    Sorry, i keep forgetting openfire is both an xmpp server and web server 😉

  26. Holger

    That's a Mozilla-only thing?

  27. pep.

    Holger, no

  28. pep.

    https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications

  29. Dele Olajide

    nope. all browser vendors

  30. Holger

    Ah, thx.

  31. Holger

    So not standardized at W3C or IETF but the major vendors agreed on a spec?

  32. pep.

    https://w3c.github.io/push-api/

  33. Holger

    Merci.

  34. pep.

    I guess major vendors agreed on a spec anyway, it was worked on by google and mozilla people :p

  35. pep.

    Of course iOS doesn't implement it, as usual

  36. pep.

    It would be too easy

  37. Dele Olajide

    Are you sure. I don't have an iphone anymore, but I though it worked with chrome on IOS

  38. pep.

    I meant on their mobile device

  39. pep.

    On safari

  40. oli

    so now we can write clients as a PWA and forget about our own push server?

  41. pep.

    That's the idea I guess. Unless you use Apple products

  42. pep.

    But they're often problematic anyway.. who would want to use that, right?

  43. oli

    i don't know. there are people who use that stuff, like my parents. no idea why

  44. oli

    i mean everybody would switch to iOS if it where open source, but it isn't