-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: include configuration from URL #1403
Comments
This is very similar to PR #1252 (loading configuration from a URL), which unfortunately was never finished. I think if we had support for just loading the configuration from a simple URL, it would be possible to use that facility to point to a graph in a Fuseki database (e.g. via the HTTP Graph Store protocol), right? Caching and cache invalidation are tricky questions here, as they are in Computer Science generally. |
I assume that both loading from and URL loading from a Triple store are too costly to do it without caching: even when the response is cached it must be parsed. By now the configuration is only reloaded when modification time of I'd keep |
The APC cache contains many things unrelated to configuration, in particular cached responses from external Linked Data sources. I don't think flushing the whole cache makes sense here, just the configuration part. Forcing reloads with a URL parameter doesn't seem like a particularly RESTful way of doing things, and it could also be problematic if there is a reverse proxy such as nginx or Varnish in front of the Apache server running PHP and Skosmos. In addition, it could create conditions for a DoS attack, unless protected by some kind of access control. If the main configuration is still in config.ttl as you suggest, would it be enough to use the same mechanism as currently, i.e. |
You're right, I like the idea to trigger config reloading via My current workaround is to collect configuration from multiple sources (core, categories and vocabularies) into |
Yes, I tried out with Fuseki: a plain URL such as By the way this would also help to use same main configuration for multiple instances (dev, prod, test...) and include differing settings such as |
This adds repeatable configuration property `skosmos:includeConfig` to include configuration from file or URL. The configuration is cached as usual, based on modification time of `config.ttl` only. See NatLibFi#1403 for discussion.
Implementation here. No test coverage so far but "works on my machine". I'll do a polished PR if the functionality is agreed upon. |
This adds repeatable configuration property `skosmos:includeConfig` to include configuration from file or URL. The configuration is cached as usual, based on modification time of `config.ttl` only. See NatLibFi#1403 for discussion.
This adds repeatable configuration property `skosmos:includeConfig` to include configuration from file or URL. The configuration is cached as usual, based on modification time of `config.ttl` only. See NatLibFi#1403 for discussion.
This adds repeatable configuration property `skosmos:includeConfig` to include configuration from file or URL. The configuration is cached as usual, based on modification time of `config.ttl` only. See NatLibFi#1403 for discussion.
This adds repeatable configuration property `skosmos:includeConfig` to include configuration from file or URL. The configuration is cached as usual, based on modification time of `config.ttl` only. See NatLibFi#1403 for discussion.
This adds repeatable configuration property `skosmos:includeConfig` to include configuration from file or URL. The configuration is cached as usual, based on modification time of `config.ttl` only. See NatLibFi#1403 for discussion.
This adds repeatable configuration property `skosmos:includeConfig` to include configuration from file or URL. The configuration is cached as usual, based on modification time of `config.ttl` only. See NatLibFi#1403 for discussion.
Description of the enhancement
Support reading content of
config.ttl
from a SPARQL endpoint. This would require to add two new properties inconfig.ttl
, such asskosmos:configEndpoint
andskosmos:configGraph
toconfig.ttl
so additional triples are taken from referenced SPARQL endpointConfiguration is loaded in
model/GlobalConfig.php
and cached for performance reasons. I think the end ofinitializeConfig
may be a good place to add loading of additional configuration via SPARQL. To avoid doing a SPARQL request each time, the result should be cached as well. I'm not sure on cache invalidation. Maybe only reload on request with a special query parameter e.g.?config=reload
.Who are the users that would benefit from the enhancement and how?
User who prefer to manage their configuration in Fuseki database.
What new functionalities would the enhancement make possible?
In particular this would allow to manage vocabularies in one place (Fuseki).
Why is the enhancement important?
Adition of vocabularies requires to modify both
config.ttl
and import into Fuseki. This feature woul allow to manage it in one place and make sure the configuration is valid RDF (no invalid Turtle syntax).The text was updated successfully, but these errors were encountered: