Skip to content

Demo of file-based and SPARQL-based storage #281

Closed

Description

@RubenVerborgh

At the Solid World of 5 November, I would like to demo the following:

In this issue, I aim to track progress of:

  • writing a scenario which I can run through with curl
  • writing and publishing the server configuration
  • testing the scenario
  • releasing a server version that supports the scenario

Tagging @joachimvh for implementation and @wouteraj for planning.

Activity

  1. RubenVerborgh commented on Nov 1, 2020

    @RubenVerborgh
    MemberAuthor

    @wouteraj @joachimvh Just wanted to bump the priority of this one.
    A key necessity will be the creation of a server configuration that I can boot up. That can be in another repository or on a branch of this one.

  2. jvherweg commented on Nov 2, 2020

    @jvherweg
    Member

    A Components.js config or something else? We can add some entries in the root config folder such as config-sparql.json, config-routing.json, etc.

  3. RubenVerborgh commented on Nov 2, 2020

    @RubenVerborgh
    MemberAuthor

    A Components.js config or something else?

    Indeed; see also #296 in the meantime.

  4. jvherweg commented on Nov 3, 2020

    @jvherweg
    Member

    @RubenVerborgh I created some simple steps showing the commands to GET/PUT/POST/PATCH when using one of the configs from #296: https://gist.github.com/joachimvh/a181435cd65f5a381481395a9e7984a1

    I have tested all those commands on my own system.

  5. RubenVerborgh commented on Nov 3, 2020

    @RubenVerborgh
    MemberAuthor

    Looking great.

    I still can't curl http://localhost:3000/sparql/person though without content type because of #276, could we have a look at that?

  6. RubenVerborgh commented on Nov 3, 2020

    @RubenVerborgh
    MemberAuthor

    Some random comments below.

    2020-11-03T21:22:26.756Z [MethodPermissionsExtractor] warn: Unrecognized method PATCH
    

    is probably a bit excessive.

    A bit of repetition here:

    2020-11-03T21:22:26.775Z [RepresentationConvertingStore] info: Convert http://localhost:3000/file/person from text/turtle to [object Object]
    2020-11-03T21:22:26.778Z [ExtensionBasedMapper] info: The path for http://localhost:3000/file/person is /tmp/solid/file/person$.ttl
    2020-11-03T21:22:26.778Z [ExtensionBasedMapper] info: The path for http://localhost:3000/file/person.meta is /tmp/solid/file/person.meta
    2020-11-03T21:22:26.778Z [ExtensionBasedMapper] info: The path for http://localhost:3000/file/person is /tmp/solid/file/person$.ttl
    2020-11-03T21:22:26.778Z [ExtensionBasedMapper] info: The path for http://localhost:3000/file/person is /tmp/solid/file/person$.ttl
    2020-11-03T21:22:26.779Z [ExtensionBasedMapper] info: The path for http://localhost:3000/file/person.meta is /tmp/solid/file/person.meta
    

    One statement for http://localhost:3000/file/person should be enough. Or are we simply invoking this method multiple times?

    And then there's this one:

    2020-11-03T21:27:04.402Z [RepresentationConvertingStore] info: Convert http://localhost:3000/file/person from text/turtle to [object Object]
    

    Wonder why the linter didn't catch, but I guess it's a valid string operation.

    And this one is slightly hilarious, how exact can a match be 😁

    2020-11-03T21:27:04.403Z [ChainedConverter] info: internal/quads is an exact match between internal/quads and internal/quads
    

    So yes, nothing but nits. Demo works fine. Great work, @joachimvh!

  7. jvherweg commented on Nov 4, 2020

    @jvherweg
    Member

    I already opened an issue in #301 regarding some of the logger nits I came across, feel free to add more there as well. That [object Object] one is among there. Will have to check why there are so many calls to the ExtensionBasedMapper but it is used both for generating the file paths and the URIs again so could just be that.

  8. jvherweg commented on Nov 4, 2020

    @jvherweg
    Member

    A bit of repetition here:

    Had a look why there were so many ExtensionBasedMapper calls. A single getRepresentation already has 3 calls (getData has 1, getMetadata has 1 for the file (to check if it exists), and then 1 for the metadata). A setRepresentation is going to have even more since it has to do some checks to see what exists already. Since a modifyResource call combines those two it is going to have a bunch of them.

  9. RubenVerborgh commented on Nov 4, 2020

    @RubenVerborgh
    MemberAuthor

    Make sense. Maybe those statements should be debug then, and we should default the logger to info (if it hasn't been already).

  10. RubenVerborgh commented on Nov 5, 2020

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions