woutslabbinck / SolidEventSourcing

A pipeline to transform location data (gpx file format) to RDF data and publish them as an Event Source on Solid
MIT License
2 stars 2 forks source link

When having multiple members/samples in one resource, rebalancing might lead to wrong placement in buckets #8

Open woutslabbinck opened 2 years ago

woutslabbinck commented 2 years ago

In NaiveRebalancing, the timestamp of a resource will be taken from the sample that was placed first in that resource: https://github.com/woutslabbinck/SolidEventSourcing/blob/b849465950f61b546a319e26533952ac9fbb6d8d/EventSource/src/algorithms/NaiveRebalancing.ts#L92 https://github.com/woutslabbinck/SolidEventSourcing/blob/b849465950f61b546a319e26533952ac9fbb6d8d/EventSource/src/EventSourceUtil.ts#L55

When querying based on the LDES metadata (i.e. following the relations) some sample might be missed due to this.

A fix requires some additional effort in gathering all timestamps from the sample in a resource and possibly splitting up a resource into multiple samples depending on the existing buckets/fragments.