{"id":20631232,"url":"https://github.com/solidlabresearch/aggregator-description-demo","last_synced_at":"2026-04-17T21:31:27.063Z","repository":{"id":176599488,"uuid":"648346645","full_name":"SolidLabResearch/aggregator-description-demo","owner":"SolidLabResearch","description":"Demonstration of the Solid Stream Aggregator with Service Description.","archived":false,"fork":false,"pushed_at":"2023-08-08T13:32:13.000Z","size":1303,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T00:08:25.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SolidLabResearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-01T19:00:36.000Z","updated_at":"2023-08-08T12:26:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f467b87-7d89-43f0-9031-176b1a014d15","html_url":"https://github.com/SolidLabResearch/aggregator-description-demo","commit_stats":null,"previous_names":["argahsuknesib/aggregator-description-demo","solidlabresearch/aggregator-description-demo"],"tags_count":0,"template":false,"template_full_name":"argahsuknesib/TS-Template","purl":"pkg:github/SolidLabResearch/aggregator-description-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Faggregator-description-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Faggregator-description-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Faggregator-description-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Faggregator-description-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolidLabResearch","download_url":"https://codeload.github.com/SolidLabResearch/aggregator-description-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Faggregator-description-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31947474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T14:11:37.456Z","updated_at":"2026-04-17T21:31:27.026Z","avatar_url":"https://github.com/SolidLabResearch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Service Description of the Aggregator.\n\nThe repository is used to demonstrate the description of the aggregator service. The service is described using the [Function Ontology](https://fno.io/spec/). The description is then used to trace back the original events employed to generate the aggregation event.\n\n### Prerequisites\n\n-  Clone the repository and install the dependencies using the following commands:\n\n    ```\n    git clone https://github.com/SolidLabResearch/aggregator-description-demo.git\n    cd aggregator-description-demo\n    npm install\n    npm run build\n    ```\n\n## Setup\n\n### Setting up the Solid Pods with Data.\n\nFor the demonstration, we use the [DAHCC dataset](https://dahcc.idlab.ugent.be/dataset.html)\nwhich is an anonymized dataset of patients who lived in UGent's HomeLab.\nEach patient owns a Solid pod to themselves.\nWe use one pod with data from one patient for the demonstration.\nThe `/pod/data/` folder contains the data to spin up the Solid pod for each patient with\nthe [DAHCC dataset](https://dahcc.idlab.ugent.be/dataset.html)\n\nTo spin up the Solid pods, run the following command from the root of the repository.\n\n```bash\nnpm run start-solid-server\n```\n\nThis will generate the Solid pod for the patients at http://localhost:3000/.\nFor example, the Solid pod for patient 1 will be at http://localhost:3000/dataset_participant1/.\nThe aggregated data is written to the aggregation pod at http://localhost:3000/aggregation_pod/\nFor the simplicity of the demonstration, we have already aggregated and written the data to the aggregation pod.\n\n### Service Description of the Solid Stream Aggregator\n\nThe aggregated events are written as LDP resources into the aggregation pod.\n\nThe aggregation events can be then queried by the client. We also wish to know how the aggregation event was generated.\n\nSince an aggregation event is in an LDP resource inside an LDP container. We describe the aggregation function by using the Function Ontology in the LDP container's metadata file.\n\n1. Use the following command to get the metadata of the aggregation function which generated the aggregation event. For the demo, we use the LDP resource at `http://localhost:3000/aggregation_pod/aggregation/1690380109955/08efbb85-c262-40a1-bfd9-2f4991049863`\n\n```bash\nnode dist/scripts/metadata_container.js get-metadata -r http://localhost:3000/aggregation_pod/aggregation/1690380109955/08efbb85-c262-40a1-bfd9-2f4991049863\n```\n\nYou will see the triples describing the aggregation function in your console, as shown below.\n\n```\n[...]\n\u003chttp://example.org/aggregation_function_execution\u003e \u003chttp://w3id.org/rsp/vocals-sd#registeredStreams\u003e \u003chttp://localhost:3000/dataset_participant1/data/\u003e .\n\u003chttp://example.org/aggregation_function_execution\u003e \u003chttp://example.org/aggregation_start_time\u003e \"2022-11-07T09:27:17.5890\" .\n\u003chttp://example.org/aggregation_function_execution\u003e \u003chttp://example.org/aggregation_end_time\u003e \"2024-11-07T09:27:17.5890\" .\n\u003chttp://example.org/aggregation_function_execution\u003e \u003chttp://example.org/last_execution_time\u003e 1687439752719 .\n[...]\n```\n\nWe are also interested to see the original events which were used to generate the aggregation event. By being able to retrieve the original events, we can verify the aggregation function, as well as the aggregation event. This creates a provenance chain of the aggregation event.\n\n3. Use the following command to get the metadata of the original events from the participant's pod which were used to generate the aggregation event.\n\n```bash\nnode dist/scripts/original_events.js trace -r http://localhost:3000/aggregation_pod/aggregation/1690380109955/08efbb85-c262-40a1-bfd9-2f4991049863\n```\n\nNow you will see the original events which were used to generate the aggregation event in the console, as shown below\n\n```\nhttps://dahcc.idlab.ugent.be/Protego/_participant1/obs988\nhttps://dahcc.idlab.ugent.be/Protego/_participant1/obs1487\nhttps://dahcc.idlab.ugent.be/Protego/_participant1/obs987\nhttps://dahcc.idlab.ugent.be/Protego/_participant1/obs1988\nhttps://dahcc.idlab.ugent.be/Protego/_participant1/obs1488\nhttps://dahcc.idlab.ugent.be/Protego/_participant1/obs1987\n```\n\n### Conclusion\n\nThe description of the aggregator events enables the query agent to retrieve the relevant aggregated relevant data from the Solid pod. In the future, work will be done towards a network of query agents where the metadata can be used across different Solid pods to check if there is already an aggregation that can be re-used to answer a query. Thus, it will reduce the load on the aggregator and enable the aggregator's scalability.\n\n### Lessons Learned\n\nThe aggregator involves writing the aggregation events to the pod in a fast-moving fashion. This has led to an issue with the LDES in LDP specification as the library does a patch delete and patch insert to update the most recent LDP container in the `ldp:inbox` predicate.\nHowever, since the speed of aggregation event generation and writing to the pod is very fast, the patch delete and patch insert operations are not able to keep up with the speed of the aggregation event generation. This leads to the LDP container in the `ldp:inbox` predicate being not deleted but appended. Thus, you end up with multiple LDP containers as an inbox which violates the LDES in LDP specification. The issue is documented in the repository of VersionAwareLDESinLDP [here](https://github.com/woutslabbinck/VersionAwareLDESinLDP/issues/31).\n\n## License\n\nThis code is copyrighted by [Ghent University - imec](https://www.ugent.be/ea/idlab/en) and released under the [MIT Licence](./LICENCE)\n\n## Contact\n\nFor any questions, please contact [Kush](mailto:kushagrasingh.bisen@ugent.be).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidlabresearch%2Faggregator-description-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidlabresearch%2Faggregator-description-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidlabresearch%2Faggregator-description-demo/lists"}