GithubHelp home page GithubHelp logo

ksp's People

Contributors

gozala avatar pvh avatar tangert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ksp's Issues

I would like to store my notes in ksp

Problem

I keep using hypothesis for sharing my notes with the working group. If I want to isolate my notes from public notes (notes from everyone on the web) I need to create a group, invite every member of the working group to create a hypothesis account and to join this group. And after all that all these notes are somewhere on hypothesis server (to give them credit you can run your own).

Want

What I want instead is to store my notes locally. For sharing with others I just want to publish those notes into git repo. To pull notes from others I can pull from canonical repo and KSP can then pick those up.

Create fastlane query for siblinks

Moved from (inkandswitch/ksp-browser#9 (comment))

Querying ksp for siblinks currently looks as follows:

query Siblinks {
  resource(url: "https://www.inkandswitch.com/local-first.html") {
    url
    sibLinks: links {
      ...sibLink
    }
  }
}

fragment sibLink on Link {
  target {
    url
    backLinks {
      ...backLink
    }
    tags {
      ...tag
    }
  }
}

fragment tag on Tag {
  name
}

fragment backLink on Link {
  kind
  identifier
  name
  title
  fragment
  location
  referrer {
    url
    info {
      title
      description
      cid
    }
    tags {
      ...tag
    }
  }
}

There are multiple problems with this:

  1. n+1 SQL queries
    1. First query will get links from the resource (with passed url) to materialize corresponding resources.
    2. Then it will query each materialized resource for backlinks.
  2. Resulted backlinks for each URL will contain resource for the passed URL itself. Which then on client we will have to filter out.

I don't want to spend time on optimizing this right now, but think we should expose another query endpoint to have something like:

query {
  siblinks(url: "https://www.inkandswitch.com/local-first.html") {
      ...sibLink
  }
}

Which in the KSP can accomplish this with single SQL query and exclude links for the passed url itself.

We need someway to recgnize that same resource may have differnt URLs

I have not had a chance to thing through this much but here are some observations that are tied to the fact that currently we have 1:1 mapping for resource โ†’ url while in practice it's more of 1:n mapping because:

  1. HTTP redirects.
  2. Hash in URL still points to same resource.
  3. Moving / renaming files on disk leads to multiple results for the same resource.
  4. Some links on the web point to HTTP addresses, but navigating to them upgrades to HTTPS. Result is we don't recognize siblinks (same problem as HTTP Redirect).
  5. My markdown note appears as local file, published on github it has different URL, if I also publish to static site it has yet another URL. Would be great to recognize those connections.
  6. Any content on IPFS can be accessed through arbitrary gateway URLs will be different but resource would be the same.

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.