https://github.com/solidlabresearch/decentralized-stream-notifications-aggregator
A stream registry service working on top of one (or multiple) solid servers to create an intermediate caching state of the streaming data stored in the pod.
https://github.com/solidlabresearch/decentralized-stream-notifications-aggregator
Last synced: 11 months ago
JSON representation
A stream registry service working on top of one (or multiple) solid servers to create an intermediate caching state of the streaming data stored in the pod.
- Host: GitHub
- URL: https://github.com/solidlabresearch/decentralized-stream-notifications-aggregator
- Owner: SolidLabResearch
- License: other
- Created: 2024-02-29T13:40:29.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-12T15:22:37.000Z (about 1 year ago)
- Last Synced: 2025-01-17T07:09:34.609Z (about 1 year ago)
- Language: TypeScript
- Size: 852 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
## Solid Stream Notifications Aggregator
The Solid Stream Notifications Aggregator is a service which works on top of one or more Solid Pods to provide an immediate aggregator for the clients to consume the latest streaming data stored in the Solid Pods via the Solid Notifications Protocol's [WebHookChannel2023](https://solid.github.io/notifications/webhook-channel-2023).
## Architecture

## Installation
To install the server, you can run the following command:
```bash
npm install
```
Make sure you have a Solid Server running which supports the WebHookChannel2023 for receiving notifications. We recommend using the [Community Solid Server](https://github.com/CommunitySolidServer/CommunitySolidServer) with the WebHook configuration which can be created using the [CSS Config Generator](https://communitysolidserver.github.io/configuration-generator/v7/).
## Usage
To run the server, you can run the server using the following command:
```bash
npm run start
```
The interface for the service is a Websocket server with which you can interact. The server accepts a subscribe message as shown below:
```json
{
"subscribe": ["http://localhost:3000/aggregation_pod/aggregation/"]
}
```
which can be sent to the server to subscribe to the latest events from the particular LDES stream. The client can pass one or multiple LDES Streams into the subscribe message array to receive the events from the server.
The server will then send the events to the client as and when they are received. A sample script for the client is shown below:
```ts
import { WebSocket } from "ws";
async function main() {
const websocket = new WebSocket('ws://localhost:8085//', 'solid-stream-notifications-aggregator', {
perMessageDeflate: false
});
websocket.once('open', () => {
console.log('Connection to the WebSocket server was successful.');
let message_object = {
subscribe: ['http://localhost:3000/aggregation_pod/aggregation/']
};
websocket.send(JSON.stringify(message_object));
});
websocket.on('message', (data) => {
console.log(data.toString());
});
}
main()
```
The client will receive message such as,
```json
{
"stream": "stream_url",
"published_time": "time_of_notification",
"event": "the_notification_event"
}
```
## License
This code is copyrighted by [Ghent University - imec](https://www.ugent.be/ea/idlab/en) and released under the [MIT License](./LICENSE).
## Contact
For any questions, please contact [Kush](mailto:kushagrasingh.bisen@ugent.be) or create an issue in the repository [here](https://github.com/argahsuknesib/solid-stream-registry/issues).