Skip to content
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

Push notifications #4279

Closed
lemoness opened this issue Nov 25, 2014 · 6 comments
Closed

Push notifications #4279

lemoness opened this issue Nov 25, 2014 · 6 comments

Comments

@lemoness
Copy link
Contributor

I thought I'd already opened this ticket, but I couldn't find it, so here it is!

It would be great to have push notifications on the mobile app,as well as possibly on the website.
However, there are still a few points to discuss. When should we send them? How frequently? To what extent should users be able to control them? (Obviously, you'd need to be able to opt-out.)
I'm in favor of a Settings panel that lets you choose what time(s) you'd get push notifications if you still had incomplete Dailies, as well as for other events like a quest invite, etc.

There are lots of things we can do with this feature, so let's hear some ideas and strategies!

@lefnire
Copy link
Contributor

lefnire commented Nov 25, 2014

some implementation notes. socket.io was the popular option last I checked (for web); we'd need to optimize what specifically is being watched for for groups / user modifications subscriptions. We'll want to make sure socket.io server-side won't bring us to a crawl. I'm not sure what to use Phonegap-side

@lemoness
Copy link
Contributor Author

WHOOPS, found the ticket - I knew I'd posted one! It's under "mobile" -
HabitRPG/habitrpg-mobile#283

Should I close this one, or keep it open for discussion of how we might do
it on the site, too? That one has a Bounty.

On Tue, Nov 25, 2014 at 2:22 PM, Tyler Renelle notifications@github.com
wrote:

some implementation notes. socket.io was the popular option last I
checked (for web); we'd need to optimize what specifically is being watched
for for groups / user modifications subscriptions. We'll want to make sure
socket.io server-side won't bring us to a crawl. I'm not sure what to use
Phonegap-side


Reply to this email directly or view it on GitHub
#4279 (comment).

@paglias
Copy link
Contributor

paglias commented Nov 26, 2014

@lefnire @lemoness I've asked the guy there if he's still working on it.

Phonegap seems to have a few plugins that may help us.

I would like to have a better overview of what type of notifications we want to habdle with this:

Reminder for missed dailies/haven't used habit today...

The easiest one, we just need to track access to the website, something like lastOp or lastAccess

Invitations, private messages and new chat messages

This one instead is more complicate.

In theory we wouldn't need socket.io, we could try to notify the user with a mobile notification when an invitation/new private message is sent. And that's the easy way.

But for example it won't work on the website, won't consider when the user is online so it would be better to have a notification inside the app...

To have the situations above working we can follow 2 paths:

  1. Keep using the API with simple AJAX calls and use Server Sent Events

This is easier. We keep using the API as always and use SSE to notify users when necessary. It's like websockets but only server->browser not 2 way communication. The browser connects to the server that keeps a connection open where messages can be sent.

It opens a new connection for every connected user so I'm not sure how heavy is going to be.
Also browser support is not the top even though there are polyfills http://caniuse.com/#feat=eventsource

  1. Switch to Websockets/socket.io

While keeping the api active we would have to migrate the server<->browser communication to use socket.io, it's going to make habitrpg realtime but also a bit complicate to implement.


I think that for both solutions the biggest problem is going to be performances. We would have to keep in memory a representation of all the users connected but mostly of their "dependencies" especially if we want to make realtime chats.

I don't know... I think we should first carefully research the features we want to implement before taking any decision.

@Alys
Copy link
Contributor

Alys commented May 20, 2015

@negue Do you know if this can be closed? Or is it still needed for more work to be done?

@negue
Copy link
Member

negue commented May 20, 2015

@Alys

  • Reminder for missed dailies/haven't used habit today... would take a lot of server changes, at least in my opinion
  • private messages can be added very easily, maybe also a good start for enty level coding since its only 2 lines to add :)
  • new chat messages same as private messages, but if you want to get push notifications for @mentions we'd have to change a bit with the mention markup^^

@Alys
Copy link
Contributor

Alys commented Aug 12, 2015

This issue was posted before the new native apps were in development, and most of the comments are probably irrelevant for the new apps, so I'm closing this.

@Alys Alys closed this as completed Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants