-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add a User service, with database for user, feed info, drop planet feed list #1642
Comments
@humphd, so we need to find a cloud to hold our long term storage? Or a SQL running in our machines would solve the problem facing a power outage? |
Let's just ask Seneca to provide us with a backup diesel generator in case of power-outages. 😄 I'm using Firestore (nosql) in my capstone project, it's great and extremely generous with its free tier (50k reads per day, 20k writes/deletes per day.) Would love to discuss this further sometime. |
I used Firebase in a React project; I agree with you @chrispinkney it's a good one. |
So here's my initial ideas based on the conversation we all had in both Teams and Slack: DB
User "Schema":
Potential Issues / Blockers
|
Some further details. When a user signs-up to Telescope, they will first authenticate with Seneca's SSO provider, which returns data that looks like this:
We don't care about a lot of this, but we need the following (see what we currently use):
We also want to augment this with new data:
I suspect that what we'll want to do is create a microservice for this (cc @raygervais), which lets us get info about a user, a list of feeds, etc. This needs some thought, but we can probably build all of this at once vs. trying to do it for the current backend. |
After some discussion during Tuesday's meeting we have come to an agreement and also solved some concerns/questions:
If the person reading this has any comments/concerns/feedback please let us know! |
Thanks for summarizing, @chrispinkney! I thought we are going to pull the |
I think Should we have a
And we can add more as we go if necessary. |
@birtony Yeah I believe he said he'll be the admin for the DB. Also @humphd Awesome feedback, agreed. I'll change it up. I'm not too sure about how we'd get the GitHub Avatar URL + other info (maybe wait until Mo's GH PR is up and toy around with it then?), so maybe something like:
What do you think? |
The GitHub API will let us get the following info for a user, based on their {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false,
"name": "monalisa octocat",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"hireable": false,
"bio": "There once was...",
"twitter_username": "monatheoctocat",
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2008-01-14T04:33:35Z"
} This info could be collected in the browser before submitting the data to the User web service and/or the User web service could get it based on the username. cc @Metropass |
Hm I'm not too sure what the better approach for this is. If it's just a simple |
I think you can do stuff like this in this User service (i.e., we don't need a separate service to get the info). If the browser sends us this data, we use it; if we just get a username, we use that to get it ourselves. |
That's very useful, we also need to figure out a way where we could hook someone's github onto their blog posts on Telescope. This would be great for an automated |
Another cool thing we can do without having to invent new code is to use GitHub's automatic Atom Feeds for users we create in the system Try it with your account username:
We can ingest this into our current feed parser, and figure out how to do the UI for it. |
https://github.com/benwinding/example-jest-firestore-triggers is a useful source of info on how to do testing. |
What would you like to be added:
Add a new database to our system to hold user, feed, and other related data that needs to exist long term. Our new data design would be:
Why would you like this to be added:
We currently use the CDOT Planet Feed List as our primary data source. We've augmented that with Redis, but we don't have a great backup strategy or dedicated DevOps team, so it's possible to lose our data (#1365).
It should be possible to use this new database and replace the planet feed list dependency completely.
Considerations:
I'm not sure which database we should use. Here are some thoughts:
The text was updated successfully, but these errors were encountered: