-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make immutability of fragments proper part of the specification #64
Comments
I wonder if your proposed |
I can think of at least two scenarios where this approach might fall short:
I like the idea of a smarter client that can infer immutability even when the publisher does not explicitly mark it. However, having an explicit immutability strategy would still offer benefits in some scenarios. |
In general, what I’d like to see is an analysis in spec text of a #31, and then analyze what kind of extra features we need to make it faster. I rest my case that I think that On 1: I think a running example would be where you have an event source that is first geospatially fragmented, and only then chronologically. I think in this case you will never be able to put an immutable flag on this root node that contain geospatial fragments anyway. I’d like to see when in the algorithm we really need a flag like this to do something useful. On 2: I think that’s a feature rather than a bug: this way we might be more efficient in handling rebalancing, as the next time you resume your synchronization, you might see the more efficient rebalanced tree right away? I think both 1 and 2 are good examples of why I’d explicitely like to standardize the replication algorithm first, and then take this issue further if it is still needed. |
So I understand it correctly that you propose to get rid of the HTTP header as well? Consider the already implemented TimeBucketFragmentation of @ajuvercr where you have a fragmentation on e.g. /year/month/day. You can configure it to contain Y members in /year, and when Y is exceeded, it will create child buckets and relations for /year/month where another M members can be placed, after which the same happens for /year/month/day housing D members each. This fragmentation enables a client to find and process members fast while traversing the tree, and is a perfect example of an LDES structure that we can find out there in the wild. You can see this as a feature while working out a rebalancing fragmentation, and in that case you should just not mark fragments as immutable yet, but in many other scenarios this will potentially cause a painful performance degradation. |
I always thought that we 'ignored' rebalancing with relation to immutability of fragments, as you could always make the point that rebalancing is an option thus never make a fragmentation immutable, and instead add support for rebalancing by changing mutable fragments to containing a relation to the new equivalent node. |
No, that should remain the default case. Your problem statement however started with environments like github pages in which we want to make sure clients do not need to refetch the same info over and over again because of the inability to control the headers. I thought this initial problem could be solved using smarter state management for LDES specifically. If we indeed want to put headers in the body of the RDF, we might however want to look at existing vocabularies that already do that, and probably want to discuss this for all of TREE instead of just LDES.
But a |
Ok, I can see the potential benefit here. So you wouldn’t describe it using a HTTP header vocbaulary, but only talk about immutability of the
The idea here was to provide a fallback for caches that do not yet support the more recent |
Then I am still convinced that using a HTTP header should not be the only way to mark fragments as immutable, and adding it as a property in the RDF body should be considered too.
Just a simple example to showcase that only considering headers is not always enough.
I'm not proposing that. That does not sound like a good way to go to me. We are talking about marking fragments as immutable and only that.
If it is passed it won't, but I'm talking about adding members in a day bucket, where that day is part of the year [fragment we are here considering]. In this scenario It will process the year fragment again with your proposal for the smart state management. The year fragment has a timespan of a whole year, so the
Agreed with everything @ajuvercr mentioned and with this quoted conclusion. |
Alright, I can live with the |
In the current specification, an LDES is introduced as a collection of immutable objects. However, the specification does not define how fragments SHOULD be marked as immutable. The only mention of this is in a non-normative note, which suggests using the HTTP
Cache-Control
header.I propose including a normative definition for marking fragments as immutable. Specifically, the specification should state that:
Cache-Control: public, max-age=604800, immutable
ldes:immutable true
While the first approach is already mentioned in a note, I propose formalizing it and adding the second approach for greater flexibility.
Consider a scenario where a publisher has limited resources to host an LDES and relies on a simple HTTP server (e.g.,
python -m http.server
, GitHub Pages, or similar tools). These often do not support configuring HTTP headers for specific pages.Furthermore, since LDES metadata is represented in RDF, it is inconsistent that immutability is only indicated via an HTTP header. Including an
ldes:immutable
property ensures a more complete RDF-based solution without adding system overhead. Clients still need to process immutable fragments once fully before determining that they do not require to fetch it again.That said, some systems may already leverage HTTP headers for this purpose. To accommodate both approaches, I propose that the specification include both methods as normative recommendations.
The text was updated successfully, but these errors were encountered: