<D <M <Y
Y> M> D>

[Comments] (1) : If you're up on your Anathem gossip you'll know that the book (or, at least, the Advance Reader's Copy) comes with a CD of nice acapella chant music. What has been somewhat obscured by descriptions of this music is that each piece doesn't just have a fancy math-related title, it actually is a piece of math. Usually a description of a cellular automaton, or a proof represented in some bizarre musical Gödel-encoding. And what I didn't know until Mirabai emailed me is that the scores for these songs are being published by their author, David Stutz.

[Comments] (2) Content-Encoding versus Transfer-Encoding: Today I discovered a "problem" where Apache's mod_deflate changes a resource's ETag value from "foo" to "foo"-gzip when compressing the representation. This problem has been a while in coming, and after some research I'm convinced that Apache's behavior is almost completely correct.[0] But very annoying. Your representations are transparently compressed on the way out, but then the client sends you values for If-Match and If-None-Match that you've never seen before. True transparency is a two-way street.

There are a number of ways to solve the problem. One way would be for Apache to magically strip the "-gzip" off the entity-tags when they come back in, but how is Apache supposed to know that that particular -gzip was one it added? So, as usual, the magic solution fails.

An alternative that appeals to me is to stop treating compression as an aspect of the representation such that having it or not having it means you need to change the ETag. Move it out of Accept-Encoding and Content-Encoding, and into TE and Transfer-Encoding. This is related to what I was saying last year, but I didn't make the connection between "this is part of the transmission, not part of the representation" and "this should be in Transfer-Encoding, not Content-Encoding." Or to quote the RFC, "the transfer-coding is a property of the message, not of the entity."

The problem with this is that Transfer-Encoding describes the transmission from one intermediary in a chain to the next, not the transmission from server to client. Similarly for TE and the transmission from client to server. Intermediaries are my RESTful weak point so I don't fully grasp the implications of this. If the client sends TE: gzip, the proxy can decide to get an uncompressed representation, look at it, and then compress it before sending it back to me. That hurts performance but everything still works, right?

Update: "That is why transfer encoding was invented in the first place."

[0] To be 100% correct it would change the ETag to "foo-gzip", since entity-tags are supposed to be enclosed in quotes.

[Comments] (1) : Apropos today's Dinosaur Comics cartoon about abrupt sex changes I emailed Ryan to tell him about a movie I'd seen in India. There were no subtitles but I got the gist of it:

[A] guy was a jerk to women, and ended up getting hit on the head with a statue of Shiva [on second thought, maybe it was just a random statue -LR]. He had a dream where Shiva and Parvati lectured him, and when he woke up he'd been turned into a woman. It was wacky! But then he slept with his best friend or something, and got pregnant! And then the girl he was a jerk to framed him for the murder of his male self! He went to jail! He was about to give birth when we got to the airport and I stopped watching the movie.

Unfortunately it's difficult for me to search for this movie because some subset of these things happens in almost every Bollywood movie. This was just the one that had it all.

Ryan's friend Priya knew the movie! It's called Mr Ya Miss, and Priya comments: "It is the worst movie ever." Also, apparently the blow to the head actually killed the protagonist, and the scene with Shiva and Parvati was a reincarnation interview. I don't think reincarnation is supposed to give you a fully mature new body, but Parvati works in mysterious ways her wonders to perform. And how can you say a movie is the worst ever when the main character gets killed fifteen minutes into the movie? I've been waiting for that for years!


Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.