Dragomir Ivanov

Results 74 comments of Dragomir Ivanov

Okay, I think now I am understanding why middle-ware path is not considered here. In Go `http.ResponseWriter` is single shot, and once you `Write()` there is no turning back. That...

@rs Thanks, then custom` ResponseSender` is the way to go. > Computing a checksum of all the Etags shouldn’t be too expensive. What do you mean by this? I thought...

Well, now that it is clear we can't make post `rest-layer` middle-ware function to modify the response, we have no choice. I wanted because I have seen some Node frameworks...

What summing algorithm do you propose for Etags? Append all Etags and then do final md5 on the whole byte array, or XORing them all?

I think it is best if each resource brings its own `_etag` field just like in the `itemList` case. Then we will have ETags to update freely the `root resource`...

Okay, but we are polluting the payload in `itemList` case, aren't we? Adding `_etag` in the `referenced resources` as well would service the same purpose. Pollution of every kind is...

There is one particular use-case, where you get `root resource`, and a `referenced resource` item/items. Then you want to PUT/PATCH a `referenced resource` item. In your proposal, we can't do...

@rs Any thoughts on "polluting" the sub-resource payload with `_etag`?

I was tinkering with the `Etag` for the composite resource, and it turned out that during the `resource` and `sub-resource` projection evaluation different parts of `sub-resource` projections can come from...

Maybe I am not understanding the code enough, but for composite resource's ETag we will need to hash with MD5: root resource ETag, sub-resource A ETag, sub-resource B ETag, etc....