Categories
Specs

Google doesn’t REST

Thanks to Sam Ruby for a heads up on a potentially nasty problem with Google’s new Web Accelerator, and badly designed REST applications. He linked to two sites that go into the details. The short version is that users of a specific web service were finding that they were losing data and after investigation, the service discovered that the Web Accelerator was the culprit.

The Web Accelerator is one of Google’s newest releases, and supposedly will help with the server-side backlogs that can occur when you’re accessing a site with a faster DSL or cable connection. How it works is that when you navigate to a site it ‘pre-fetches’ information by clicking on all the various links and, it would seem, caching the results.

All dandy (if confusing — we asked for this?) except for one thing: since this little deskside bot operates on a page under your name and authority at whatever site you’re at, if you’re at a web application that has links that do things such as ‘delete’ a web page or make some other form of update, the bot is just as happy clicking those links as not. Even if there is a Javascript alerts that should say, “Are you really sure you want to do that?”, it manages these behind the scene. Before you even know what’s happened, your data is gone.

Leaving aside that perhaps this won’t rival Google Maps for being handy, this bot does prove out a problem that people like Sam have been pointing out for some time — we’re using REST incorrectly, and because of this, we’re going to get bit in the butt some day.

Well, there’s a rottweiler hanging off some asses now, and it has “Google” on its name tag. (Uh, no metaformat pun intended.)

REST is an extremely simple web application protocol, and is what I’m using for my metadata layer in Wordform. Before I started implementing it, I researched around at what is needed for an application to be RESTful and the primary constraints are knowing when to use GET and when not to use GET. Really, really knowing when not to use GET.

You’re familiar with GET operations. In simplest form, when you search in a search engine, or access a weblog entry and there’s a URL with a bunch of parameters attached, that’s a GET request being made to the server. In this case, the parameters are passed as part of the URL.

Lots of applications have been using GET, not only to fetch information, but also to create or remove resources or make updates. However, what they should be doing is using methods other than GET, because this HTTP request type is only supposed to be used for operations that don’t have side effects. In other words: you can invoke the same service again and again and nothing will happen to the data with each iteration. Because of this, it’s also an operation that usually isn’t overly protected, other than perhaps a login being required to access the page or service. To the non-tech, it’s a link.

For operations that change data, we should be using POST, PUT, and DELETE. These requests are different in that all three have side effects. A POST is used to create a resource; PUT to update it; and DELETE to remove it.

These types of operations are associated with a certain sequence of events–you click some kind of Submit button and usually another page or alert box opens up that perhaps asks if you’re really sure you want to do this; you don’t see the parameters, and you don’t even necessarily see the service the request went to before a response page is shown. They are not links, and they don’t have the same global accessibility that a link has.

More importantly, potentially destructive agents such as Google’s Web Accelerator can’t do damage when you use the four REST commands correctly.

Today I tried to run my metadata flickr update application on my new weblog post and the flickr API is not responding. Since flickr is not using REST correctly –it’s using GET operations for events that have side effects–I am assuming that the web service is offline while the folks work on this. I haven’t been able to find an update anywhere on this, though, so this is my assumption only. Since I’m only using flickr for fetches, hopefully this won’t result in me having to change my code.

As for my metadata layer–it’s not as open as some of the applications that have used all GETs, but it isn’t fully RESTful either, which is why it won’t be released until it is–not when Google releases such a potentially harmful application. To be honest, though, my own pride should demand that if I’m going to use a specific protocol, I use it correctly.

Bottom line: Do not use Google Web Accelerator unless you know all web service applications you use are fully RESTful. If you do, you’ll most likely be unhappy as you watch your data disappear.

Two excellent articles on how REST works: Joe Gregorio’s How to Create a REST Protocol and Dare Obasanjo’s Misunderstanding REST: A look at the Bloglines, del.icio.us and Flickr APIs.

Oh, and don’t miss Phil’s Launch the Nuclear Weapon.

Categories
Weblogging

Missouri honeysuckle

I am working on a programming project for a friend, and also writing another longish “Missouri Tale”, but in honor of Mother’s Day I thought I’d share photos I took yesterday of a very rare plant: the wild azalea. The plant is also known locally as a “honeysuckle” and considering that Japanese honeysuckle is an invasive species that the conservationists are working, hard, to remove here in the Missouri, the local name does sometimes lead to confusion.

The Missouri honeysuckle is native to this area, but only exists in three tiny locations in the entire state; Pickle Creek area, where I hiked yesterday, is one of them. It’ s an amazingly delicate and lovely flower, and I was able to spot it primarily because I took a wrong fork at one point and ended up taking a longer way around. A way which just so happened to have several of the plants along the path.

The trip yesterday was tiring, but very calming, which was to the good. Something else that is calming, or I should say calming down is the ‘blogroll’ debate, which is also to the good. Lauren has a new post on the recent events, which captures the essence of some of the concerns on all sides in typically comprehensive and thoughtful Feministe manner. Hopefully, others will follow suit.

Since pink is supposed to help calm emotions, another photo of the wild azalea to speed this positive discourse on its way. (Notice how nicely it clashes with the strong colors of my site? I am always so glad when I can introduce these moments of exquisite pain, naturally.)

What I found interesting about the whole experience is that when I first published the post that triggered much of the recent anger or dismay, there was a great deal of defense of blogrolls but not much in the way of animosity in the responses. However, most of the people who responded then, over a month ago, were those who have read other of my posts, and were, more or less, familiar with my writing.

In this new discussion, the post was the first time that many of the people directed to my site had ever read me and they took what I was saying as a demand that people drop their blogrolls, that blogrolls are evil, and so on. Chris said that what I wrote was good except for the one statement about “…those with blogrolls, you are hurting us”. He said that was hyperbole and I agreed — of course it’s hyperbole. The very fact that I borrowed the phrase from Jon Stewart’s Crossfire appearance, and said so in the post. should have provided a strong hint of the nature of the statements that followed.

Stewart’s statement was also hyperbole. It was reducing all the sophisticated rhetoric attached to the media’s role with its public into simple, primitive, emotional terms and baldly thrown into the faces of the Crossfire journalists, leaving them absolutely no where to go, but inward. It not only pushed the journalists down the slippery slope — it iced it so they couldn’t climb out.

At the time I despised the phrase, but after watching many more of Stewart’s taped shows, I began to see how brilliant his approach was. Unfortunately, though, I may lack his deft touch with hyperbole, though I think I’m getting a handle on his use of satire.

My biggest mistake was I didn’t take into account when I wrote the statement that someone reading that post without having any history of my writing, thought processes, or even my reasons for using the Stewart phrase, is going to interpret what I was saying differently from a ‘regular’ reader. This was an eye opener. A rather contentious, somewhat fractious eye opener true; but an eye opener nonetheless.

Becoming aware of this as an issue, however, does not necessarily mean I will be viewing all this as an impetus to change. I will continue to use metaphor, hyperbole, and litotes (I am just so clever), indulge in satire and acrimony, revel in passion, gloat with anger, and even, or especially, insert my unique brand of “Tales of the Ozark” whenever it suits me when I write–but I may spare a few more minutes of time to consider the innocent who stumbles on to my page through a link or through some search engine. I may not write any differently but I will spare that time; as momentary penance for my act, if for no other reason.

Reflect. Reflect. Moving on…

But oo la that’s not the way to end a Mother’s Day post, which is supposed to have pink, diamond like stuff and be filled with fussy figurines and rosebud teacups — mothers immediately losing any and all interest in ’sleek’ and ‘edgy’ and ‘minimalistic’, as soon as they behold their offspring for the first time. So I’ll end with another photo of the wild azalea, even though it is neither fussy or a rosebud, but it is a lovely, delicate pink.

I also want to point out a site that I stumbled upon when I was reading some of the posts related to the blogroll thing: Illustration Friday. It is a site that lists a word each week, and people supply illustrations based on this word, using whatever medium they prefer. It is a fascinating mix of art ranging from the too cute to the frankly powerful and disturbing, and a rare good find. My thanks to MizzKitty–who wrote another very thoughtful post on the blogroll issue–for the find.

Categories
outdoors

Outdoors

As I sit here with my laptop on my lap after 16 hours of work and writing, writing and work, I realize that I need an outdoor break. The weather is going to be warm, too warm for me, but this time of year, early morning trips are the best — birds everywhere, and the scent of new green and flowers is so heavy, you feel as if you’ve walked through a cosmetic section of a department store.

I think no matter where I go, and I have no idea where yet, I will leave the camera behind. Lately, my photography just hasn’t been bringing me the joy it once did, so maybe I need a break from it as much as my computer. Or, being the wise old and weak woman that I am, I’ll take it and leave it in the car–just in case.

Regardless, I need to find a place where I can spend the day and come home content. While I’m at it, I might as well get out of the house, too.

Categories
Weblogging

Let’s keep the blogroll and throw away the writing

One last note on this overworn topic: from the comments I’m reading, perhaps what we should do is keep the blogrolls, but throw away the writing.

Joking! Well, kind of.

Melanie McBride wrote in my comments:

To be honest, the blogs I’ve read that don’t have blogrolls appear to be doing something not disimilar to traditional media and I find a blog without a blogroll says ME ME ME far more so than one that points to other voices.

And I have noticed that the more established a blogger gets the less they really have to rely on “community” and so what do they do but ditch the blogroll. Or so it would seem.

Blogs, for me, are still very much about communities.

Communities.

Whether a weblogger has a blogroll or not is nothing more than technology. It’s a bunch of links, and has nothing to do with ‘community’ or even individuality–especially individuality. They can be handy for finding people of ‘like mind’, but this just generates its own danger. Why? Though we may link to stories by people we don’t like, or even despirse, we generally don’t put them on our blogrolls. Rather than encourage diversity, we encourage homogeneity with our blogrolls.

Even then, they can give new folk a step up, and there is good in them and if you want your blogroll, by all means keep it. Please! Keep it! And to be fair, since I don’t have one and haven’t had one for a couple of years now, if you want to remove me from your blogroll, please remove it! I really don’t check to see if I’m on your list or not when I read your writing.

But stop investing an emotional context in what is nothing more than a bunch of hypertext links. This is the kernel that started so many of the problems with A-lists and long tails today — we invested both emotional and economic worth in links; we made them into something more than a way to get from A to B.

True communities don’t need to mark their territory, like we marked the states, blue or red; or be held together by baling wire made of virtual strands across the threaded void. Community happens when we reach out to each other, in times of joy, and in times of need; community is when you realize another has become an important part of your life, and it no longer matters whether you’ve met the person, or not.

Anything else, is just building bridges out of bricks made of air.

Categories
Technology

Productive

Aside from my earlier babble, I have also been productive today: fixing Uncle Joe’s layout so that it works in IE 6.x in Windows; working on a page sidebar modification for Molly; and finishing up the Sessum’s Portal page.

The two images in the background for the portal page are Creative Commons licensed images at Flickr, hopefully reflecting all the interests of the Sessum clan–digital and creative. (And note, I am not a BuzzAgent to be talking about CC — this is a freebie.) It’s home will be gesproductions.com, when it’s in place.

One issue that came up when working on the Sessum page, as well as helping Joe, is being able to test the modifications with different operating systems and browsers. However, thanks to an accidental discovery in comments at another weblog, I found out about BrowserCam–a service that takes snapshots of a page based in a wide assortment of browsers, operating systems, and resolutions: for instance the portal page in IE6 on XPOpera on Mac, and Konqueror on Linux.

Of course, there are other issues to how a page looks, such as installed fonts and user settings, but what the service provides is a way of seeing what a page would look like right out of the box. That’s usually good enough.

During peak times, screenshots can be slow, but you’ll primarily use the site to test efforts at specific stages, and the wait is worth it. I only have a trial account, but if I get more design jobs, I’ll most likely subscribe to the service–unless there are other services and/or software that are more economical.

Now, though, back to the server-side of things with my next task. I still have to get another release of Wordform out, but paying gigs take precedence.