I want my app that could be easily changeable and really simple, so I don’t want any webpack or build.
for the simplicity of hosting on github-pages or on a Pod, I don’t want any techno server as node/express, and use prepackages libs for accessing and managing data on a Pod.
( I put node but only to download modules, but I don’t want to use it in prod)
I don’t like Angular or React, perhaps because I’ve discovered Polymer first, and I like the concept of web-components Polymer provides.
So for every libs in the list and why not other, it would be nice if someone that know how to read data, create data, update data, to do the same actions as Notepod.
It could be a good example of how to do this type of action, and could help us to compare.
That could also be a complement to @Vincent cheatsheet.
I’ve tried with solid-file-client but I don’t know how to update, or add a line in a turtle file, and it seams that it loads more than one version of solid-auth !? @jeffz?
I’ve tried with tripledoc, but I was not able to load a browser version of tripledoc & rdf-namespaces
So I would like to build some examples of each lib as simple as possible to add some notes on a Pod. Could everyone expert on those libs help me ?
Thxs
@dprat0821
I’ve used evejs (Multi-agents js lib for communication between each component) but this must not interfere with rdf libs, because it’s another part of the project
Thanks for sharing. Just checked that evejs does a good job in providing the multi-agent communication layer.
Just FYI, Rxjs can simplify your logic in handling some practical complexities (such as throttle to filter duplicated messages, etc.)
For the agent communication, the actor model (eg. Akka ) were once very popular, now ReactiveX (eg. Rxjs mentioned above) is trending as well. You can find implementations for different languages (Java, Js, C#, …) in case you need to support different platforms with same framework.
Thanks for spotting that, that should indeed be notesList.asRef(). That was actually fixed in a draft version, but for some reason didn’t make it onto the live site - we’ll have that fixd soon.
As for your other question, you’re talking about this page right?
Users get that the first time they connect their Pod to an app on your origin (i.e. scenaristeur.github.io) when that origin has not yet been added to their trusted apps, so if you follow the authentication guide, you should be set.
I use a copy of solid-auth-client.bundle.js found in “node_modules/solid-auth-client/dist-lib”
Do you have a idea why I don’t have the “trusted app” window ?
That’s because your popupUri refers to solid.community, so users are actually logging in to there. Presumably, solid.community is already in your trusted apps list, which is why you’re not seeing the login. This is what I get:
Note that it asks me to authorise solid.community rather than scenaristeur.github.io.
To fix it, you can either:
Host the popup.html yourself - it can be downloaded from here.
Provide our own UI that allows people to enter their identity provider (e.g. https://inrupt.net or https://solid.community), instead of using popupLogin. Here’s an example.
I’m asking that because I must impove performance of Shighl for Solidarity’s Chat.
For now Shighl is based on query-ldflex, but i think there is a lot of await to parse all chat messages and @jucole confirm some degradation So does anyone have an idea of which is the most performant for this task before i start to rewrite ?
Or do I have to low deal with Sparql query ?
Thxs
As far as I know, all of those libraries use solid-auth-client.fetch() to do actual Input/Output. It would be interesting to see if they have much of a difference in speed, I wouldn’t expect it. Solid-File-Client is good at managing files and folders. If you need to copy a bunch of things or you need to create a certain file/folder structure on the user’s pod - it’s a good choice. It does not do any of the parsing, So if you need to do triple-level patching or reasoning or anything other than managing the files, you should use one of the other libraries for that. [Edit : well it does some parsing - it returns the structure and contents of folders and the types and other metadata of files and folders and parses link headers so that it knows how to handle .acl and other linked resources]
In the case of Soukai, something to keep in mind is that it implements the Active Record pattern. This is important because one of the main critiques to this pattern is performance issues. The problem is not the pattern itself, but the fact that because it’s so “easy” to interact with a database (in this case, the network) it hides away how queries (in this case requests) are being performed. Perhaps the most relevant example is the N+1 problem.
In my opinion this is not an issue and I use the pattern in most of my applications (not only Solid). But of course, you need to be careful with that. The important thing for performance issues is to inspect what queries are being performed under the hood (in this case network requests, which is easy to debug given browser dev tools ). If there is something too problematic, you can always fall back to other low-level solutions like using solid-auth-client yourself.
That is, assuming your bottleneck is the network (which it usually is). If your performance issues lie in the JS layer and not the network, you need to be careful with how many instances you are creating and what you are doing with them. But I really doubt that’s the problem.
Other than that, there is an open issue in node-solid-server and as far as I know, SPARQL queries are not supported. That’s why Soukai uses globbing under the hood and that can create problems depending how you have structured your data. I am having some performance issues in one application, but I don’t think it can be solved with any library since the problem lies in the server & data structure. In the end, I think my solution will be more related with having data cached in the browser rather than improving network requests, but I have to look into it.
There are no benchmarks I’m aware of, unfortunately, so I could only give you some high-level theorising about how different approaches might result in different performance characteristics, but since that would most likely be wrong (with limited knowledge of the different approaches and no benchmarks), I won’t try that.
In any case, LDflex uses Comunica behind the scenes, so that’s a switch that would not make sense. As Noel said, SPARQL is not supported, so you can scratch that approach as well. And Solid File Client is indeed focused more on complete files rather than parsing and manipulating RDF data, so that doesn’t really seem to make sense for this use case either.
Thus, the list could be shortened to Soukai, rdflib and Tripledoc - and potentially, manually sending requests with solid-auth-client. However, before trying it with a different library, take a look at the Network tab in your browser to rule out some potential other causes. Are you seeing many HTTP requests to your Pod that could theoretically be a single one, indicating that you could rewrite your code? Are you seeing requests that take a long time to return a response, indicating that the problem is in the server response time?