Giter VIP home page Giter VIP logo

Comments (8)

algomaster99 avatar algomaster99 commented on May 12, 2024 1

We went for using GitHub gist as the database. 😅

from editor-backend.

algomaster99 avatar algomaster99 commented on May 12, 2024

@domoritz @siddhant1 I tried to research as much as possible but I would really like your suggestions on this.

from editor-backend.

domoritz avatar domoritz commented on May 12, 2024

Thank you for writing this up!

https://github.com/elastic/elasticsearch-js is an up-to-date library for Elasticsearch. I also found that you can search over specific fields.

One other issue we need to look into is ranking search results. As far as I can see it, Mongo or Postgres don't have a good way to rank search results. Github and Wikipedia are using Elasticsearch for searching. I see that Mongo or PG are a better fit for data storage but I'm not convinced that they make a better search index.

from editor-backend.

algomaster99 avatar algomaster99 commented on May 12, 2024

@domoritz Yeah, their usage seems pretty similar to MongoDB only. But storing user information can only be supported in PG or MongoDB. bl.ocks.org were also using MongoDB for authentication and elasticsearch for searching.
So I am still unsure how searching will happen when things are stored across two collections in elasticsearch DB(here users and gist).
Blocks was able to do it since it had the user id as the GitHub handle itself so it simply requested GitHub api for its gist. But in our case, I am planning to have a custom user_id which will be unique. This will ensure extending this platform in a way that the code of visualizations can also be stored somewhere else than just GitHub gist.
Having a user model will help us extend the platform. Otherwise, I guess we can just have one document for gist which will store the gist information and the user it is uploaded by. The latter case will require the user to be registered from one single platform only.

from editor-backend.

domoritz avatar domoritz commented on May 12, 2024

I see. How about we go the simple route for now and only support github? Then we don't need to store the user and we don't need to do our own authentication. We hopefully can spin up a service in a month or so and then take it from there?

from editor-backend.

algomaster99 avatar algomaster99 commented on May 12, 2024

@domoritz okay ✌🏽 I will research a little about the ouath process as well. I think we would only need to create session variables on front-end when authenticated. Need not store anything more.

from editor-backend.

siddhant1 avatar siddhant1 commented on May 12, 2024

Instead of writing the whole authentication process ourselves , have a look at passport.js

from editor-backend.

algomaster99 avatar algomaster99 commented on May 12, 2024

@siddhant1 yeah, obviously. I was talking about the response given back by GitHub API after authentication. Will we need to store any relevant information from it?

from editor-backend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.