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

Realtime stats #26

Open
8 of 10 tasks
pospi opened this issue Aug 24, 2014 · 2 comments
Open
8 of 10 tasks

Realtime stats #26

pospi opened this issue Aug 24, 2014 · 2 comments
Assignees

Comments

@pospi
Copy link
Contributor

pospi commented Aug 24, 2014

Socket server has been implemented to send realtime events to viewers of the site.

Finalisation tasks:

  • Update webserver to hold aggregate stats in memory and send absolute numbers back to clients (rather than individual increment events)
  • Hook events up in the frontend:
    • View, Call & Email global counters to update via logging endpoint
    • Tweets & FB / G+ share global counters to update from stats server polling. Need to implement this behaviour on the API server and proxy requests to the stats endpoint so we can update it more frequently, if possible?
    • Views, calls, emails & tweets to legislators to alert viewers in the "how am I represented?" results
    • Same legislator-specific events to update the map as they occur
    • Fire view event with electorate ID when visitor locates themselves. No need to log but should be broadcast to all to show visits by electorate on the map.
  • Throttle client updates to every few seconds or so to avoid saturating the network with unnecessary events
  • Also send events for twitter mentions and stream those into the supporters list in realtime
  • Will probably also need to check and ensure high server socket connection limits etc
@pospi pospi self-assigned this Aug 24, 2014
@pospi
Copy link
Contributor Author

pospi commented Sep 11, 2014

actually pretty easy to setup- https://github.com/techpines/express.io/tree/master/examples/scaling-with-redis

@pospi
Copy link
Contributor Author

pospi commented Sep 26, 2014

Will probably leave tweets until after launch, not a huge priority. @thomasdavis is on infrastructure now (:

@pospi pospi assigned thomasdavis and unassigned pospi Sep 26, 2014
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

2 participants