Search This Blog

HTTP Reliable Messaging

I have been studying Bill de Hora's HTTPLR Specification for Reliable Messaging using HTTP. All in all I think it's a great start to a somewhat complicated situation. It doesn't address issues like Once-and-only-Once delivery (as multiple clients could download the same message) or ordering of the messages. It does talk about reconciling the message deliveries between client and server, in both directions.

The specification makes good use of the HTTP verbs and HTTP status codes, which I love. If they're there, and they apply, use 'em!

I'm going to jump into my questions about the specification, so please bear with me. If you have the time, go ahead and read the specification.

I'm a little concerned about the use of DELETE when reconciling message upload (as specified in section 8.3).

The HTTP spec reads "The DELETE method requests that the origin server delete the resource identified by the Request-URI." To me, that says we're deleting the /resource/ and not the /uri/.

In section 8.3 of the HTTPLR spec, we are deleting the /resource/ of the /upload exchange/. OK, that makes sense because it signals that message upload is complete.

I have trouble here: We've PUT our message to the /upload exchange uri/. And the HTTP spec reads for PUT: " The PUT method requests that the enclosed entity be stored under the supplied Request-URI."I read this as we've just asked for our message to be stored by the upload exchange uri. BUT... We then delete that upload exchange resource as the signal for message completion.

I have trouble with this because, semantically, I think we just deleted our message. I know we've deleted the upload exchange resource, but since we PUT our message to the upload exchange uri, our message gets deleted, too.

Am I missing some piece of HTTP semantics here?

I've attached a picture of a possible scenario below. Basically, the Upload Exchange URI does not receive the PUT of the message contents. The message contents are uploaded in the POST, where POST has the semantics of "append this message to your collection". The Location: header is used to return the Upload Exchange URI, which can be deleted later by the client to signify completion.

Popular posts from this blog

Now, this has to have a built-in somewhere in Scala , because it just seems too common. So, how to convert an Array to a List in Scala? Why do I need this? I needed to drop to Java for some functionality, which in this case returns an Array. I wanted to get that Array into a List to practice my functional programming skillz. **Update**: I figured out how to convert Arrays to Lists the Scala way. Turns out it's a piece of cake. val myList = List.fromArray(Array("one", "two", "three")) or val myList = Array("one","two","three").elements.toList The call to elements returns an Iterator , and from there you can convert to a List via toList . Nice. Because my first version wasn't actually tail recursive, what follows is a true tail recursive solution, if I were to implement this by hand. The above, built in mechanism is much better, though. object ArrayUtil { def toList[a](array: Array[a]): List[a] = { d

In which I port a snazzy little JavaScript audio web app to Dart , discover a bug, and high-five type annotations. Here's what I learned. [As it says in the header of this blog, I'm a seasoned Dart developer. However, I certainly don't write Dart every day (I wish!). Don't interpret this post as "Hi, I'm new to Dart". Instead, interpret this post as "I'm applying what I've been documenting."] This post analyzes two versions of the same app, both the original (JavaScript) version and the Dart version. The original version is a proxy for any small JavaScript app, there's nothing particularly special about the original version, which is why it made for a good example. This post discusses the differences between the two implementations: file organization, dependencies and modules, shims, classes, type annotations, event handling, calling multiple methods, asynchronous programming, animation, and interop with JavaScript libraries. F

In which the virtues of automated mechanical arboreal pruning are extolled over quaint manual labor, as applied to web development build processes. The setup Ever notice how the primary bit of marketing for many traditional web programming libraries is their download size? Why is that? Check this out: Why does size matter so much for these libraries? Your first instinct is probably, "because the more bytes you shuttle across the wire, the slower the app starts up." Yes, this is true. I'd also say you're wrong. The primary reason that size matters for these libraries is because traditional web development has no intelligent or automated way to prune unused code so you can ship only the code that is used over the wire. The web is full of links, yet web dev has no linker The web development workflow is missing a linking step. A linker's job is to combine distinct project files into a single executable. A smart linker will only incl