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

Move everything to the server? #116

Closed
brunolemos opened this issue Feb 15, 2019 — with GitSpeak · 1 comment
Closed

Move everything to the server? #116

brunolemos opened this issue Feb 15, 2019 — with GitSpeak · 1 comment

Comments

Copy link
Member

brunolemos commented Feb 15, 2019

Problem

Doing all the filtering only on client-side has some downsides.
It's harder to implement some features because the app doesn't have all the data available locally or in the server, and GitHub API V3 doesn't support filtering.

Short term workaround

Fetch everything on the client, like, all notifications and all events possible. Not a good solution, it could affect performance, would require some wait time to download everything on each device, would not have access to the whole history of notifications/events since GitHub stops returning old ones.

Solution

Move everything to the server. It would unlock indefinite possibilities of what I can do with the data. Specially:

  • Better filters
  • Integrations like Push Notifications, Slack, etc.
  • Store older data instead of the short 7-day window that GitHub returns.
  • Easier sync of everything between all devices, like saved items, unread state of events, etc.
  • Increased security (token would never be exposed client side)

Cons:

  • Increase of database size and server bandwidth = increase of costs (might fetch millions of notifications+events).
  • May take some time do it. Might need to migrate from redux+axios to something like Apollo/Relay to easily handle caching and subscriptions.
  • Some companies may not like the idea of having their private repos activities saved in DevHub's database (although doesn't make much difference because the token itself would already give access to this)
  • Not sure but this may hurt a possible GitHub Enterprise support in the future. Seems to be easier the way it is today.

Bonus points

  • Realtime sync between all devices. Great combo if using the GitHub webhooks and GraphQL subscriptions.

Considerations

If GitHub API V4 (GraphQL) supported the Notifications and Events API, maybe this wouldn't be necessary. And they may add support for them "soon".

@brunolemos brunolemos self-assigned this Feb 15, 2019
@brunolemos brunolemos changed the title Move everything to the server Move everything to the server? Feb 15, 2019
@brunolemos brunolemos mentioned this issue May 7, 2019
22 tasks
@brunolemos
Copy link
Member Author

Doing things locally is ok, what we need is a proper client Database instead of local storage, and also a proper sync with the backend. No need to move everything to the server.

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

No branches or pull requests

1 participant