inkandswitch / ksp Goto Github PK
View Code? Open in Web Editor NEWReference implementation of Knowledge Server Protocol (KSP)
Reference implementation of Knowledge Server Protocol (KSP)
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).
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.
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:
n+1
SQL queries
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.
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:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.