Coordination message about Push Notifications modules

There seems to be 5 different projects that are doing the same thing, each one focusing on a different part, but overall they are overlapping:

  1. Web Push API : https://www.drupal.org/project/web_push_api
  2. WebPush : https://www.drupal.org/project/webpush
  3. Web Push Notification : https://www.drupal.org/project/web_push_notification
  4. Browser push notification : https://www.drupal.org/project/browser_push_notification
  5. Advanced Progressive Web App : https://www.drupal.org/project/advanced_pwa

All these 5 modules are offering native support for push notifications, implementing Drupal integration of the same PHP library, without using any external service.

Don't you think that it would be better to merge all the work in one single module, and join efforts there to create a better experience for the drupalists?
I believe this would be more close to drupal's philosophy.

I'm starting this discussion to see what are the intentions.

PS: I will cross-publish this message to all the relevant projects, so please do not mark it as spam.
PS2: I am the maintainer of the WebPush module (2nd in the list) which only exists for D7.

Comments

efpapado created an issue. See original summary.

skoro’s picture

Hello!
Well. Web Push API is only a library, WebPush is only for Drupal 7, Browser push notification is abandoned, Advanced Progressive Web App I haven't used it yet but description is similar like this one.

I started developing this module when I tried to use Browser push notification but it seems to be abandoned - no replies to issues, it has some bugs, notification submission doesn't use cron or queue, no automatic notifications after the content is edited and so on. Thus, I made this module.

Following your question, I seem that my module is closer to Advanced Progressive Web App

br0ken’s picture

Hi @skoro. What do you think of using Web Push API's storage in your project?

br0ken’s picture

By the way, I think this project (https://www.drupal.org/project/web_push_notification) is the best among others. The only reason I initiated the Web Push API is that I really needed a flexible API without extras.

skoro’s picture

Hi @BR0kEN. You mean flexible API only as a library without configuration ui ? There was a proposal to split the module on two parts: one as the Drupal library and another as configurator. So may be it sounds reasonable ?

What do you think of using Web Push API's storage in your project?

Could you point me out what is WebPushApi storage ? Is it some specification ?

br0ken’s picture

You mean flexible API only as a library without configuration ui

Sort of. Right now Web Push API (I'm the owner of) doesn't even provide a service for sending notifications, so it's up to others to implement any logic around the tools Web Push API provides (see https://www.drupal.org/project/web_push_api/issues/3107645#comment-13429425).

My proposition is to, roughly, remove src/Entity and src/Controller from https://www.drupal.org/project/web_push_notification (your module) and reuse them from Web Push API. For sure, it should be a new major release that introduces breaking changes.

Could you point me out what is WebPushApi storage ? Is it some specification ?

I meant Drupal entity storage, similar to what you have implemented.

nod_’s picture

I'll comment here since it seems this is the most active issue.

I'll be implementing push notifications in the PWA module, and to avoid having a 5th or 6th module that implements the same PHP library we should figure this thing out. I'm partial to the approach BR0kEN has taken, since the service worker part is the whole point of the PWA module.

I'll be implementing Apple push notifications for safari so ideally the push module would support some of that.

Recently the danse and push framework module were published, https://www.drupal.org/project/danse https://www.drupal.org/project/push_framework haven't checked them out but it seems to be relevant for what we're doing, maybe have an intergration with the push framework?

Happy to discuss!

br0ken’s picture

@nod_ the https://www.drupal.org/project/web_push_api seem the good choice for you. Using the module it is your responsibility to implement both frontend and backend as it only provides the toolset for dispatching Push notifications and storage for subscriptions.

I am ready to chat about this if you'd like. Btw, there is also the client-side implementation done by me that I use with the `web_push_api` - https://github.com/BR0kEN-/web-push-api.

nod_’s picture

Thanks, I'll need D7 support so I'll probably need to use a couple of different things.

@skoro what's your opinion on the situation? splitting the module like a proposal suggested might be a good thing.

I think we can decide quickly if we want the solution to cover both D7 and D8+ or have different solutions for D7 and D8+.

skoro’s picture

I'm quite sure that we must have only one module implementing backend push notifications. If you could develop such module I could depend on it for the purposes of my module.

br0ken’s picture

@skoro, that is what I have been proposing in #7. The https://www.drupal.org/project/web_push_api is storage for subscriptions and API for sending notifications to them. All the rest cannot be implemented in that module because the use cases are specific and it is impossible to cover them all.

mahesh bandhiya’s picture

great work @skoro!

I was developing similar push notification functionality as well, my implementation looks very similar to this module,

i would like to actively participate in creating new feature requests, development and issue fixes for next few months

i will also suggest to create a slack group where people can connect for standardising this module as the base module for native push notifications functionalities

2dareis2do’s picture

@BR0kEN

What do you think of using Web Push API's storage in your project?

Is there a ticket for that?

Sounds interesting. You can highlight the benefits of your proposal there.

It does sound like a way to make this module more scalable, i.e. use redis or other back end for storing notifications

Interesting handle BTW.

One thing I am missing is how old (deleted or no longer registered) notifications are managed.

mahesh bandhiya’s picture