Summary of activity from 21/08/2021 to 21/09/2021
- Maintenance and improvements
- banana-rdf port to Scala-3
- update of Scala-JS libraries interfaces onto best RDF JS libs
- Other
As reported in Milestone 3, PR 364, to banana-rdf was a large PR to move banana-rdf as close to Scala3 as possible. That action was not part of Milestone 3, but should have been part of this one.
Other minor PRs to banana-rdf were made in the mean-time too.
After some research on how best to proceed, and some great help from Scala community (e.g. this thread), I started a couple of demo projects. After a few iterations I slowly rebuilt the functionality of banana-rdf from scratch and submitted it as PR 370, which is composed of 55 commits.
We have basic Jena and Sesame Support, but no implementation of SPARQL, DataSets, Diesel, or mappers to Scala. On the other hand I have the beginning of support for relative URLs.
Scala 3 features we are using now are:
- Match Types in the
RDF
object which allows us to move from using deprecated projection types such asRdf#Node
toNode[Rdf]
. This is the most important change. Thanks to @neko-kai for helping out here. - Every implementation of the RDF trait uses opaque type aliases which allow us to use the underlying Jena, Sesame or other types without any efficiency loss and with no leakage of the underlying java structure - which we had with the Scala2 versions of banana.
- We use the efficient extension methods to add functions back to our opaque types, rather Scala2's value classes which had some efficiency problems.
- Algebraic Data Types are used for interacting with unerlying objects if needed using pattern matching, though the
fold
methods are recommended - Instead of using implicit
RDFOps[Rdf]
we now use given implicits and renamed that type toOps[Rdf]
- We use Union types for defining relative URIs for example, and Intersection Types in the TypeTests.
- I have set explicit nulls on as a preference, to make sure we deal with nulls correctly when interacting with Java code.
- Translation methods that directly call an underlying Jena or Sesame method are marked inline to remove unnecessary method calls
- ...
The most important next steps will be adding IO for Graphs and Datasets, and port the DSL. But those are do not require such fundamental research and should be easy to build up now, and be able to re-use a lot of code from the previous banana-rdf.
The next milestone, writing a client Auth library requires us to add a JS library to banana-rdf with Scala-JS. So that will be task until the end of the month.
A discussion on the Authorization Panel around which modes should be supported by the access control rules led me to research if one could gain some clarity by modeling a simple web server as Lenses. See the web-cats issue Lenses and the Web: Modes of interaction. I wrote up 2 one page mock lens based web servers to help me think this through, and discussed this on the CT Zulip channel. This should be a nice way see if some formal modelling can help us clarify issues in the Solid Authorization groups.
- 2021-08-25 initial discussion on Access Modes
- 2021-09-01 continued discussion on Access Modes
- 2021-09-08 discussion on limiting access to applications, which led me to open the discussion Use WAC ontology for authorizing authentication.
- 2021-09-15 continued interest in client side Authorisation of App authentication