esl / MongooseIM

MongooseIM is Erlang Solutions' robust, scalable and efficient XMPP server, aimed at large installations. Specifically designed for enterprise purposes, it is fault-tolerant and can utilise the resources of multiple clustered machines.
Other
1.64k stars 422 forks source link

Push Notification For P2P and MUC #902

Closed Arslan007 closed 6 years ago

Arslan007 commented 7 years ago

Hi MongooseIM Team,

Hope you are well!

You have done great work so far specially the MUC Light. Everything work good and there is only one thing is missing that is fully in demand (Push Notifications). I have gone through all this repository for issues and mentioned that Push support was expected in June 2015. I cannot see this feature in any raodmap. Is there any plan for this feature. If yes then when and if No then any third party module that works with MongooseIM.

@michalwski @fenek

Thanks for all good work!

michalwski commented 7 years ago

Hi @Arslan007,

Thanks for good words about MUC Light and rising your voice for Push Notifications! We wanted to add this feature to MongooseIM long time ago. The priorities changed, so we had to postpone it, but it's still on our roadmap. We are going to release 2.0.0 end of Aug or beginning of Sep. Push Notifications are one of our biggest items just after the 2.0.0 release.

Arslan007 commented 7 years ago

Thanks @michalwski

Thats really great news so we expect that after 2.0.0 release push notification support will be coming to any other subsequent release like 2.1.0 or so.

chinhniem80 commented 7 years ago

HI michalwski, The MUC push notification in the roadmap that you mentioned is based on traditional MUC or new MUC light? Thanks.

michalwski commented 7 years ago

Hi @chinhniem80,

MUC light for sure. With the traditional MUC, it will be harder as a user is in the room as long as it's online. It would be possible to have push notifications for traditional MUC for some short period of time after disconnection, if combined with XEP-0198 Stream Management . I'm not sure if this is the way to go for traditional MUC yet.

marktran commented 7 years ago

@michalslaski Jumping in here since I'm trying to build something similar.

Is there a MUC Light hook that would work with mod_http_notification to send a webhook for messages to offline users? I want to delegate push to another system through this webhook.

michalwski commented 7 years ago

Hi @marktran,

The hook user_send_packet should work just fine. The reason why MUC(_light) messages are not pushed by the module is that by default only messages with attr type="chat" and not empty body subelement are processed.

This behaviour can be altered by developing a custom module and configuring mod_http_notifications to use this module to make a decision whether to push the message or not.

chinhniem80 commented 7 years ago

Hi @michalwski, if we know the group_id of the group, and the group is members-only, so we can get the member list at anytime with group_id. When sending a msg, we can check that member status (for ex. active session), if he has no session so we will push to that member. We can do by that way?

michalwski commented 7 years ago

Right, in members-only group it is possible :)

Arslan007 commented 7 years ago

Hi @michalwski

Since you have delivered the Mongoose 2.0 beta2 as you promised. Should we expect Push notifications support very soon in coming days NOT months :)

Arslan007 commented 7 years ago

Hi Guys!!! Any update on this. Anxiously waiting for this :)

Arslan007 commented 7 years ago

Hi @michalwski

I am following up on my query. Can you please share some timeline.

vickydhas commented 7 years ago

Great job on muc light, Michael this is similar question I've raised. By the way I've implemented mod-zeropush to handle single chat can it be modified to handle mod-muclight as well ?

Arslan007 commented 7 years ago

@michalwski : Again Following up on feature request of Push notification. As mentioned above it was planned in 2.1. Can we expect this now? Thanks

michalwski commented 7 years ago

Hi @Arslan007,

Thanks for pushing us about it. Thanks to that and https://twitter.com/MongooseIM/status/806049671894495232 - Push Notifications are our next point on RoadMap!

Arslan007 commented 7 years ago

Hi @michalwski

When we can expect first bit of push notification enabled builds

brunoguerios commented 7 years ago

+1

rslota commented 7 years ago

Hi @Arslan007 ,

I'm about to start implementing such feature, but it's too soon to give any specific dates. I'm sure that first version of push notification won't take a long time to implement. By the way, what platforms do you need push notifications for? Android and iOS will be both supported, that for sure, but I'm wondering if there's need to support other platforms.

Arslan007 commented 7 years ago

Hi @rslota

Thats really exciting news for us and specifically for me. I am specifically looking for both iOS and Android. But there are certain scenarios which needs to be discussed.

Regards, Arslan Pervaiz

michalwski commented 7 years ago

@Arslan007, this feature is going to be based on XEP-0357. Since the implementation will be open source I personally think, it can be discussed in public. This discussion may be beneficial for other users us well.

Arslan007 commented 7 years ago

Hi @michalwski & @rslota,

Push notification should work in these scenarios.

These are basic scenarios I believe for push notifications.

brunoguerios commented 7 years ago

@rslota Could you please provide at least a rough estimate on how long it will take to implement push notifications for MUCLight?

Arslan007 commented 7 years ago

Hi @brunoguerios

@rslota is already working on this and you can follow the devlopment https://github.com/esl/MongooseIM/tree/feature/xep-357-push_notifications

rslota commented 7 years ago

Hi, @brunoguerios

It really depends what part of push notifications you are asking for. The XEP-0357 implementation will probably be on PR a day after tomorrow, since all I need is mod's documentation. The problem is that this XEP assumes that client application is able to allocate and provide XMPP PubSub Node to which notifications have to be send in order to handle them over to APNS / GCM. Unless you have such service (i.e. service that reports <identity category='pubsub' type='push' />), implementation of XEP-0357 alone will not suite you.

To provide full push notification support, MongooseIM will be able to provide you with such PubSub plugin, and combined with XEP-0357 implementation, this will give fully operational push notifications for Android and iOS. I've started work on this PubSub plugin just today, so it's really hard to estimate how long it will take. I would be very happy if I would get working prototype by the end of this week, then maybe PR would be ready next week. But again - this is assuming there will be not surprises.

brunoguerios commented 7 years ago

That's great guys! I just wanted to have a feeling if this was a 1 week or a 1 month task. Thank you very much ;)

jonathanve commented 7 years ago

Hi, @michalwski and the mongooseim team. Congrats for MUC Light. After reading the thread in order to implement push notifications for offline members in a MUC room, which of these approaches is the right one to choose?

  1. Use the user_send_packet hook / mod_http_notification module to POST to an external service for push notifications by checking if there is no session per groupchat message
  2. In the code, I can also see an offline_groupchat_message_hook, can I use this one to speed up the 1st approach and just POST to an external service?
  3. Wait for MIM 2.1.x and XEP-0357

Thanks!

rslota commented 7 years ago

Hi @jonathanve ,

Of course, if you wait for MIM 2.1.x you are gonna get working solution that you can just use. The whole thing is on PR stage and you can follow the progress on #1178, #1184 and esl/MongoosePush#1.

If you really want your own solution please note that it's not that easy because you need to somehow provide client's device token to MIM, in order to use APNS / FCM API.

Anyhow, yes, you can speed up the process using offline_groupchat_message_hook. Our implementation of XEP-0357 will most likely use user_send_packet in order to make the module more configurable. Some clients may want to get notifications even if they have active session, since both Android and iOS may keep connections alive for a while even after you minimize the app. APNS and FCM services on the other hand are aware whether the app is in foreground and whether notification shall be delivered.

jonathanve commented 7 years ago

Hi @rslota Thank you for your feedback!

fenek commented 6 years ago

MongoosePush is available. Closing. :)