You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I talked a bit with miyagawa and mst in #plack, and ConditionalGET will do the if-none-match logic, but it is designed to make it easy to do the if-none-match stuff, if the computation of the message body is expensive, it needs some extra tricks.
If I understood them correctly, if the message body is a IO::Handle, then it will not read from that handle before it is needed, and in the case of a successful etag match, that will not happen, so if we are to save the cost of computing the message body, which is the expensive operation in our case, we need to have IO::Handle serializers.
I know there is a dev branch for this already, so this issue is about releasing it. I would guess that we might want to have the refactoring in the previous issue I submitted first though.
The text was updated successfully, but these errors were encountered:
It sounds like it's more than just needing an IO::Handle serializer, because for a conditional GET that should return 304 (Not Modified), we don't even want to execute the query. So the logic of executing the query would need to be moved inside the IO::Handle, and execution only occur when/if the handle is read from. These are the sorts of reasons why I implemented the Etag handling in RDF::Endpoint to begin with -- the existing middleware doesn't fit our execution model in this case. It's not just about saving IO, but also about saving CPU time and avoiding query execution when possible.
hmmm, yeah, I can understand that... It is certainly something that shouldn't be high on the TODO list. It seems to me something that Plack cannot help us do, though it might be worth asking the #plack channel. Given that it is relatively straightforward to do, I suppose it might not be worth it.
I talked a bit with miyagawa and mst in #plack, and ConditionalGET will do the if-none-match logic, but it is designed to make it easy to do the if-none-match stuff, if the computation of the message body is expensive, it needs some extra tricks.
If I understood them correctly, if the message body is a IO::Handle, then it will not read from that handle before it is needed, and in the case of a successful etag match, that will not happen, so if we are to save the cost of computing the message body, which is the expensive operation in our case, we need to have IO::Handle serializers.
I know there is a dev branch for this already, so this issue is about releasing it. I would guess that we might want to have the refactoring in the previous issue I submitted first though.
The text was updated successfully, but these errors were encountered: