Skip to content

Instantly share code, notes, and snippets.

@mildred
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mildred/338a8c250050b3bd8079 to your computer and use it in GitHub Desktop.
Save mildred/338a8c250050b3bd8079 to your computer and use it in GitHub Desktop.
SmartWeb, the new Web

SmartWeb, the new Web

SmartWeb is a concept that tries to unify all the work done in the RDF community with HTML and websites. The goal is to create a web server that is smart enough that server side applications will no longer be necessary, and with completely decentralized content. More specifically:

  • Allow updating pages using HTTP PUT. The page editor can be entirely client-side

  • Automatic gathering of backlinks using the Referer header. The server will fetch the remote resource and try to determine the kind of link that was done (by parsing the HTML resource or querying the remote RDF datastore directly if available)

  • RDF datastore that can be queried easily.

    • Client-side can then lookup backlinks and their kind, generating a list of talkbacks on the page, replacing the comments section. Note: her server could be configured (using RDF configuration) to either automatically generate those or only generate a pending list that will only be accepted by the author later on.

    • Client-side can also lookup backlings generating a front page with most recent stories

    • Client-side can also generate tag pages with the list of stories containing a specific tag

    • Using Full Text Search feature in SPARQL queries, a search engine could be provided to the user

The SmartWeb server, would authenticate the authors by their SSL client certificates. By default, new users would be granted a small space to publish stories. Anyone could then get some space on most SmartWeb servers.

SmartWeb servers shall have a way to easily export data and import data in a common format. This would allow users to backup and migrate their content to any server. Format could be an archive with the raw data indexed by the hash URI and a RDF file for each graph of the datastore.

HTTP Etags generated would be the hash of the resource. For example SHA1-2c08292b4ba48895433be34b33e10d32ae4d7994. This may help mitigate tracking of clients using the Etags (or more probably not)

Mode of Operation

When a server receives a request, it generates a URL from that request by concatenating http:// (even if in https), the Host header and the request URI. It then queries its datastore for that resource looking for:

  • smartweb:contentType should be the content type of the resource
  • smartweb:redirect should contain the 3xx redirect location and status code [ a smartweb:Redirection; smartweb:status 303; smartweb:redirectLocation <http://url> . ]
  • smartweb:data should contain the link to the content using a hash uri (<sha1:2c08292b4ba48895433be34b33e10d32ae4d7994> for instance)
  • smartweb:alternate should contain the alternate resource and quality factor that represents the same object and that could be used for content negotiation

The server would then use those properties to generate the response. The document is not directly stored in the RDF datastore but instead the HTTP server has all the data indexed by their hash.

The HTTP server can also accept SPARQL queries/updates to forward to the RDF datastore and can mandate valid authentication for some.

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