Wednesday, March 5, 2008

YUM vs. RPM

From an article I found while Googling "how to create YUM packages":

"yum sits on top of rpm, and handles dependencies. For example, say you want xpdf. You get the package for xpdf and try to install it. rpm whines that it has an unsatisfied dependency, say some library you've never heard of (part of openmotif, but you don't know that), and gives up. You go get the appropriate package(s) and try again. This can get to be a pretty deep recursive process.

The program yum handles all that for you. You type at the command line:

# yum install xpdf

The program then pulls what it needs from the repository, figures out the dependencies, tells you what it needs to do to install xpdf, and asks permission to go ahead, like so."

Sunday, February 24, 2008

REST API vs Query API

I think I have finally grasped the concept of the term "REST API"! Here is the article from AWS that helped me finally understand.

Unfortunately, for a long time I considered an API available via HTTP requests to be a RESTful API. I always new that the basics of REST were centered around placing the intention of your request in the HTTP headers via PUT, GET, POST, DELETE, etc. But when I would see APIs like GoogleBase, AmazonSQS, Facebook API, etc. I just reused the term "REST API" to describe them because I'd never heard it explained in another way.

Today it became clear to me the difference as I came across the term "Query API". A query API doesn't try to convey intention using HTTP headers like a RESTful API does. A query API simply says "hey put all the information you need for this request in the request itself". Personally, I prefer query APIs. Lets look at a simple example:

I want to perform the action User.delete() and my only parameter is the user_id. Here is how each type of API would handle such a request:

REST API:

http://api.myservice.com/user/123978
...along with this uri request the HTTP header would be set to DELETE

Query API:

http://api.myservice.com/user/delete/123978
or
http://api.myservice.com?action=user.delete&user_id=123978
etc.

Monday, December 3, 2007

My good deed for the

My good deed for the day...picked up some starbucks trash on my way to lunch

Friday, December 29, 2006

Sunset