Code Monkey home page Code Monkey logo

trifid-ld's Introduction

With the release of version 1.0 Trifid-LD was renamed to Trifid. Please switch your Trifid-LD installations to Trifid, you can find the latest release in its new repository at https://github.com/zazuko/trifid

trifid-ld's People

Contributors

alemela avatar bergos avatar gitter-badger avatar giuseppefutia avatar ktk avatar l00mi avatar retog avatar

Stargazers

 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  avatar  avatar

trifid-ld's Issues

Support PROXY protocol

SSL/TLS terminators like Hitch in combination with proxies like Varnish make it difficult to figure out for which destination port the request was made. This can be solved by using the PROXY protocol which is also supported by Hitch.

Proxywrap is a node-module which extends the Server interface of node to handle these situations properly.

Logo for Trifid-ld

Request I got:

Does Trifid have an icon i can insert in my slide to make some advertisement?

Backward and Forward links in Trifid-LD

Based on discussions with @retog it makes sense to think about how we want to handle Backward and Forward links. Reto linked to a post from TBL in 2006.

We are not sure yet if we really always want to handle it that way so we need to discuss this a bit before implementation.

If we decide to implement this it will no longer work with DESCRIBE statements as we miss most of it. Reto implemented this functionality in Clerezza

LD Fragments integration

It's not top priority but I do think it would make sense to think about how we could integrate LD Fragments support as well. I probably could do it with Varnish and a LD Fragments server on another node instance but maybe there are smarter ways to do this.

starting instructions

To start it with iojs (using https://github.com/iojs/docker-iojs) I had to enter the following commands

npm install
iojs index.html

without the first it would complain about missing modules.

What to do after starting it is not clear, I would like to see what it can do using the default data. I figured that I had to replace localhost:8080 with the actual host and port in node_modules/tbbt-ld/dist/tbbt.nt. Now I can get some turtle at http://172.17.0.40:8080/data/person/stuart-bloom. But I can't access the simple HTML interface the readme mentions. Tried replacing localhost with 127.17.0.40 in config.js, but this didn't made any difference.

Update Docker image

@retog could you please rebuild the docker image and push it to dockerhub? There is a change I need for SPARQL proxies.

Make content discoverable

Provide a generic way to list the contents of a namespace. Each path which is followed by a / shall trigger the following query:

CONSTRUCT {
  ?sub a ?obj.
}
WHERE {
  ?sub a ?obj.
  FILTER REGEX(STR(?sub), "^{?path}")
}

where the path might be something like

CONSTRUCT {
  ?sub a ?obj.
}
WHERE {
  ?sub a ?obj.
  FILTER REGEX(STR(?sub), "^http://classifications.data.admin.ch/municipality/")
}

We might add a LIMIT which should be fairly high, 10000?

Align prefixes with RDFa initial context

I suppose the initial prefix list is handled in here for default HTML rendering. I noticed that schema.org is prefixed with s: in the default view. This is not aligned with RDFa initial context, see https://www.w3.org/2011/rdfa-context/rdfa-1.1

Please use all prefixes from there. I did some related work here already and I still think it would be a good idea if we would just use that for Zazuko stuff. Makes reading Turtle easier and less confusing with ambiguous prefixes.

Content-negotiation & rapper

Currently one does not get any triples back from Trifid-LD when using rapper from Redland RDF Libraries. I filed an issue for rapper: http://bugs.librdf.org/mantis/view.php?id=590 (text taken from there):

Rapper currently (2.0.14) seems to send the following Accept header:

accept: 'application/rdf+xml, text/rdf;q=0.6, application/n-triples, text/plain;q=0.1, text/turtle, application/x-turtle, application/turtle, text/n3;q=0.3, text/rdf+n3;q=0.3, application/rdf+n3;q=0.3, application/x-trig, application/rss;q=0.8, application/rss+xml;q=0.8, text/rss;q=0.8, application/xml;q=0.3, text/xml;q=0.3, application/atom+xml;q=0.3, text/html;q=0.2, application/xhtml+xml;q=0.4, text/html;q=0.6, application/xhtml+xml;q=0.8, text/x-nquads, */*;q=0.1'

This works fine as long as RDF/XML is supported by the server. However, if the server only serves Turtle or NTriples, the server will answer to that with HTML before a RDF serialization.

RDF/XML is no longer supported by all servers out there so I would propose to give Turtle and NTriples a higher priority than HTML to make sure we get RDF back if it is supported by the server.

Dave answered with a question:

Can you be more specific.

Turtle / N3 family 0.1 to 1.0

application/n-triples, text/plain;q=0.1, text/turtle, application/x-turtle, application/turtle, text/n3;q=0.3, text/rdf+n3;q=0.3, application/rdf+n3;q=0.3, application/x-trig

HTML range 0.2-0.8

text/html;q=0.2, application/xhtml+xml;q=0.4, text/html;q=0.6, application/xhtml+xml;q=0.8

What would I raise and what lower?

Redland is still quite popular so I would like to know if we do something wrong or if Redland needs to adjust its request. I'm a bit lost here, maybe @retog could have a look at that and compare it with content-negotiation specs?

[templates] Don't squat namespaces

The contexts introduced in trifid templates should be withing its own namespace, and not squat existing namespaces as with "r2h:SameAsBlock

Rollback UI rendering in last commit

Can we please rollback the UI stuff introduced in the last commit 74eb554? I do not want to introduce namespaces & names that will change and it does not yet provide the same functionality of the existing UI by @bergos.

This should either be removed or moved to a separate branch for the moment.

Provide CURIEs for URIs

For well known prefixes I would like to be able to show CURIEs instead of the full URI.

This requires a list of well known prefixes which I maintain here: https://github.com/uduvudu/uv-context.

Note that services like prefix.cc are ambiguous, that's why I started maintaining this list.

Inconsistent version in tag and package.json

There is revision tagged as 0.7.0 which doesn't match the version in package.json. Versions should be changed with npm version to ensure things stay in sync.

I suggest now to update to 0.7.1 to ensure npm and docker are in sync again.

Render into div block

The default template doesn't contain any div block in the body which could be used to extend the template. A div block with a specific should be added an the JS code should be changed to use that div block.

Proxy does not handle https URIs properly

Given this config for Trifid developer branch:

{
  "baseConfig": "trifid:config-sparql.json",
  "sparqlEndpointUrl": "https://web-sparql-virtuoso.dev.bgdi.ch/sparql",
  "datasetBaseUrl": "https://ld.geo.admin.ch/",
  "staticFiles": {
    "alodFiles": {
      "path": "/",
      "folder": "cwd:data/public"
    }
  }  
}

And this URI for testing: http://geotrifid:8080/boundaries/cantons/12 (localhost should probably work as well)

Trifid does the ASK for http, not https as it should according to the datasetBaseUrl.

Document/support embedding and directory overlay

It should be possible to embed trifid-ld in any node.js application, the embedding application should be able to provide a configuration as well as an overlay dir to override any file in data/public or to provide additional files to be served. This feature should be documented.

Allow HTTPS request URIs

Currently trifid assumes that the schema is HTTP when reconstructing the request URI so it cannot be used if it exposed to the outside via HTTPS-URIs. As afaik there is no way to detect the schema of URI from the request headers wether to assume HTTP or HTTPS should be a setting in config.js.

Use config.default.js only as fallback

By default config.js should be used, which should not be part of the default Trifid-LD repository. If that file doesn’t exist config.default.js should be used.

LDApp implements this already.

Support HTTP Upgrade (low priority)

See https://en.wikipedia.org/wiki/HTTP/1.1_Upgrade_header

It's quite an obscure and probably rarely implemented header, essentially for changing protocol (request initiated by client). But I think it could potentially be very useful e.g. for shifting to a streaming protocol for media or some kind of fast-but-unreliable data transfer via UDP - triple per packet..?

I'm quite interesting in playing with it from a RESTful agents kind of perspective, but please consider this low priority.

(I haven't checked if OPTIONS and PATCH are supported yet - they'd both be much higher priority)

Support HTTP HEAD

Useful for checking e.g. if a suitable RDF representation is available at a given URL.

Minimal version would be something along the lines of :

var http = require('http');

var options = {method: 'HEAD', ...

var req = http.request(options, function(res) {
echoToClient(JSON.stringify(res.headers));
}

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.