mnot’s python http api

Random evening http://del.icio.us/ browsing brought be across http://www.mnot.net/python/http/, which is awesome. I was having similar fun over the weekend utilizing python’s support for overriding the behavior of the dictionary-syntax with __{get,set,del}item__. It’s a similar type of beauty as the constrained interface of HTTP … the power comes in some part because of the interface constraint… … Continue reading “mnot’s python http api”

Random evening http://del.icio.us/ browsing brought be across http://www.mnot.net/python/http/, which is awesome. I was having similar fun over the weekend utilizing python’s support for overriding the behavior of the dictionary-syntax with __{get,set,del}item__.

It’s a similar type of beauty as the constrained interface of HTTP … the power comes in some part because of the interface constraint…

In any case, his example makes it slightly unclear what the mapping is

web = Dict()

GET

getResp = web[‘http://asynchronous.org/blog’]

PUT

web[‘http://asynchronous.org/blog’] = newData

DELETE

del web[‘http://asynchronous.org/blog’]

POST

postResp = web(‘http://asynchronous.org/blog’, newResourceData )

Very cool.

Update: More from the source.

targeted information delivery

The New York Times reaches about 1.5 million people. This posting is possibly of interest to two dozen. But the difference between my blog and the NYT is that my post will reach those two dozen :) — raph

The New York Times reaches about 1.5 million people. This posting is possibly of interest to two dozen. But the difference between my blog and the NYT is that my post will reach those two dozen :)

raph

DTrace

So there’s been a bit of noise about a new sysadmin program from Sun called DTrace. From the home page: DTrace provides a powerful infrastructure to permit administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs. That sounds relatively boring. But check out this … Continue reading “DTrace”

So there’s been a bit of noise about a new sysadmin program from Sun called DTrace. From the home page:

DTrace provides a powerful infrastructure to permit administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.

That sounds relatively boring. But check out this Introducing DTrace post.

Wow.

I don’t do much sysadmin anymore, but when I did I wanted exactly that tool. I’d asked myself that question numerous times, and always came up short on ways to figure it out. Now, someone should wrap it in a application layer that focuses on detecting anomalous programs from a security perspective.

Personal Information Server

Havoc Pennington on Filesystems +1 on the idea of a personal WebDAV server as being the center of a new manner of data interaction in a desktop environment. But I think it’s important that it’s not simply a “document” storage system. While important, people get funny ideas about what a “document” is vs. what data … Continue reading “Personal Information Server”

Havoc Pennington on Filesystems

+1 on the idea of a personal WebDAV server as being the center of a new manner of data interaction in a desktop environment. But I think it’s important that it’s not simply a “document” storage system. While important, people get funny ideas about what a “document” is vs. what data people are more apt to create in the course of an interaction session with a computer … there is a unseen but real call for a Personal Data Server, which allows for the structured creation of interelated micro-content.

I’m speaking here about things like “phone book records”, “recipes”, “movie reviews”, “to do lists”, “wish lists” … they’re not sexy, nor grand, and therein lies the strength of the system. I assert that they can all be represented, and the system can be built, in a purely declarative manner.

More specifically the combination of: * personal HTTP+WebDAV server * RDFS and OWL for schematic description * a presently-undefined high-level user-interface ontology * infrastructure around efficient storage, indexing, searching and data-inspection GnomeStorage

graphing

The following is a response mailed to a friend of mine about Jim Webber’s post. I generally agree with the graph, but… imagine that that graph doesn’t have time as it’s x-axis, but instead has “inverse [user] expressibility” as it’s x-axis. The y-axis then needs to become…”constraint”. I think there’s a negative-slope graph of some … Continue reading “graphing”

The following is a response mailed to a friend of mine about Jim Webber’s post.

I generally agree with the graph, but… imagine that that graph doesn’t have time as it’s x-axis, but instead has “inverse [user] expressibility” as it’s x-axis. The y-axis then needs to become…”constraint”.

I think there’s a negative-slope graph of some other quantity — maybe “understandability” or “optimizability” or “infrastructure utility” or something that crosses the above one just /at/ REST … and maybe even just to the left of it.

The line itself is … something … maybe … “goodness” or “Quality”, and it is actually the lower bound of the two lines posited above. Thus, it peaks [just to the left of] REST…

WebDAV is just to the left of REST.

And there’s something else, with a very small number of additional verbs, just to the left of that.

But, I believe, that’s where it peaks.

To the right is the semantic fog of “do” [or “processMessage” or whatever…].

To the left is a whole layer devoted to the transfer of arbritrary verbs, which is, effectively, also a semantic fog of “do”.

Right at the peak is an area where the infrastructure is actually something the application can leverage, since the operational semantics are well defined. I think. I’m not quite sure, how, yet, but I’m trying to figure that out… :) At least, developers/intermediaries/&c. benefit from the consistency and clarity.But I do think there are definitely things that a real container can provide, there.

[For instance, one desire would be to have a first-order b[atch]GET operation, allowing the server to optimize the multiple safe/idempotent read operation.]


In the mean time, Mark Baker has posted his take , which — as usual — better expresses what I was trying to get across.

less of a test

This is less of a test. On second review, my stylesheet is coming togehter quite nicely, and I think I’m ready for jsled.digital.presence 2.0 to be launched… Specifically, I’ve got ~50% more FOAF than before, and a new personal page, which I haven’t really had for a while. The twiki will be relegated to it’s … Continue reading “less of a test”

This is less of a test. On second review, my stylesheet is coming togehter quite nicely, and I think I’m ready for jsled.digital.presence 2.0 to be launched…

Specifically, I’ve got ~50% more FOAF than before, and a new personal page, which I haven’t really had for a while. The twiki will be relegated to it’s rightful role, and obvousily I’ve got some MT lurvin’ in effect.

So … I’m at the point other people were at ~3 years ago; go me.

Testing

Testing. This is primarily a test in order to get some content, such that I can… rebuild site fetch page hack CSS create stylesheet for basic site. It just needs to NOT be fugly.

Testing.

This is primarily a test in order to get some content, such that I can…

  1. rebuild site
  2. fetch page
  3. hack CSS
  4. create stylesheet for basic site.

It just needs to NOT be fugly.

numerous verbs and uniform apis

Wish I’d been at what sounds like a downright bloody battle down under. :) Responses to some of the points: The really interesting stuff came about when they were challenged about the REST aspects of the application. Again the standard REST attack of uniform interface good/rpc bad came out, amongst others. This is a flawed … Continue reading “numerous verbs and uniform apis”

Wish I’d been at what sounds like a downright bloody battle down under. :) Responses to some of the points:

The really interesting stuff came about when they were challenged about the REST aspects of the application. Again the standard REST attack of uniform interface good/rpc bad came out, amongst others. This is a flawed argument in my opinion for a number reasons:

1. Malicious payloads can be propagated irrespective of your transfer semantics, and insecure code can be executed whether your service is RESTful or not. The “safe” nature of the Web doesn’t get round buggy back-end implementations.

This must be in response to something said at the event … ?

2. We’re past the RPC stage of Web Services, and we’ve been past it for a while now. Message to the REST community – stop telling us that we’re playing catch up and see what’s really been happening on our side of the fence.

Fair enough.

3. The uniform API isn’t uniform. For each HTTP verb (GET, POST, PUT, DELETE) the accompanying message can be arbitrary. That is, you can’t POST a purchase order message to a REST service that expects to receive a circuit diagram. At some point you have to understand the messages.

There are two parts, here: 1. Application Programming Interface 2. Messages carried over API.

In RPC, both are arbritary, which has a known set of problems in a networked environment crossing trust boundries. REST seeks to limit one — the API — and let the complexity be managed in the messages. Moreover, REST encourages a well-known set of widely-agreed-to message types.

More importantly, however, by fixing the verbs — the API — you have a much better chance of being able to intermediate in those operations. Because the semantics of the API operations are fixed, you actually have a chance to get in the middle of the communication.

4. The HTTP verbs are too numerous. Sure only GET and POST are usually used, but these are too numerous and too protocol specific too. You really only need a processThis(SOAPMessage) method on every service if you’re in a true asynchronous Web Services environment. Granted if you want synchronous communication, that might need to return a SOAPMessage too.

The fact is that regular Web Services have a far more uniform interface than the REST style. I’ve laid down the challenge before, but you can’t get much more uniform than one (imaginary) verb, can you?

Mark says it better, but here’s my response:

That’s a red herring. The fact is that if you only have a unconstrained ‘do stuff’ method, you’re in a far weaker position than HTTP’s 4(-6) well-defined verbs. At thet same time, if you have an arbritary set of undefined verbs, then you’re not very well off, either.

The real issue is the definition of meaning of the API operations. GET, POST — and even PUT and DELETE — have very specific defintions and requirements on their behavior. And beyond that, there are a set of headers which further affect how those verbs behave in well-specified, well-thought-out and well-tested ways. This is important because it enables a class of tools to operate over the traffic, as well as providing a necessary semantic base on which other specifications to be based.

quitting smoking

(or: Fuck! Ass!) Don’t let anyone tell you that quitting smoking is easy. I spent Sunday, Monday and Tuesday either unable to focus on anything for more than 2 minutes, or drunk to escape that fact. Which is really fun when you’re trying to get work done — and get frustrated when you can’t get … Continue reading “quitting smoking”

(or: Fuck! Ass!)

Don’t let anyone tell you that quitting smoking is easy.

I spent Sunday, Monday and Tuesday either unable to focus on anything for more than 2 minutes, or drunk to escape that fact. Which is really fun when you’re trying to get work done — and get frustrated when you can’t get work done.

Wednesday was the first day that I could actually plod along and do stuff, and even then it’s still not a cakewalk.

Yesterday still wasn’t so hot.

Today is better, but still not great.

Anyways. I can start to smell things again — thank god I don’t live in SF anymore. ;) I think I’m going to start cooking things a bit more.

small things

So I just went through my Small Things box to find a old pair of red/blue glasses so I could view http://antwrp.gsfc.nasa.gov/apod/ap040108.html; I didn’t find them, but I did find the Certificate of Title to my car, which I thought I lost. So I guess I win.

So I just went through my Small Things box to find a old pair of red/blue glasses so I could view http://antwrp.gsfc.nasa.gov/apod/ap040108.html; I didn’t find them, but I did find the Certificate of Title to my car, which I thought I lost. So I guess I win.