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

History support #28

Open
arrowcircle opened this issue Apr 29, 2015 · 7 comments
Open

History support #28

arrowcircle opened this issue Apr 29, 2015 · 7 comments
Labels

Comments

@arrowcircle
Copy link

People asked pusher to make history. Its bad for user experience when you change page and loose message. Its cool to have "custom made" history for pusher. Any ideas?

@darrencauthon
Copy link
Contributor

My first thought would be that this could be an optional plugin?

I like how simple Poxa is. Just pull and fire it up, and it works great.

But this would add some form of data persistence... the slippery slope, haha!

@arrowcircle
Copy link
Author

@darrencauthon I think history should be short, like 5 last messages for 5 minutes. Also, mnesia is standart erlang/elixir library so its not a problem.
I agree with you, it should be optional.

@edgurgel
Copy link
Owner

I will think on a sane way of having this, but I'm not sure if it's the case for Poxa. As @darrencauthon said if this could is done, it will be built on a way that is optional.

It's important to notice that It's not that it's not simply "use mnesia" because when we go distributed (and we are close to get there) this will be a problem as mnesia will not handle nicely a netsplit for example. Also other nuances that I don't even know as I never used mnesia for something that it wasn't an example code...

I would be glad to discuss some way of achieving this.

@arrowcircle
Copy link
Author

@edgurgel I think for netsplit, history can be lost, because its not sensitive data. Netsplits are rare so its not a problem. I have no experience with distributed mnesia, but it seems like a good candidate for me.

@arrowcircle
Copy link
Author

@edgurgel Also, there is an erlang project with history functionality and decent code https://github.com/doubleyou/dps

@edgurgel
Copy link
Owner

edgurgel commented May 2, 2015

There are also concerns on how to give this history. This would need to be an extension to Pusher Protocol or some convention of event(s) that will happen when you subscribe.

@arrowcircle
Copy link
Author

As I know, pusher support user events, so it can be done with custom user event "history".
Another option, is to use history option in config for each app id and send history after each user connection.

Second option is very arguable, but viable if first one is not easily available.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants