Indigo and REST
December 12, 2005
Clemens Vasters teaches Indigo to do REST — part 1, part 2. Very, very cool stuff. One minor gripe I have is with this paragraph(s):
Now we assume, for a moment, that every customer in the system had its own HTTP service endpoint. If you have a million customers, you have a million endpoints, probably looking like this: http://www.example.com/myapp/customers/00212332. Each of these endpoints has an implementation of the shown interface, representing the resource. […] I think that you probably even could create a million endpoints, but of course such an application would be a complete pig. I haven’t tried and I don’t think you should.
That seems to somehow confuse problem and cause — http://www.example.com/myapp/customers/00212332 seems like a perfectly fine URI to me, and at least one company definitely has a few million of those … the fact that URIs map to a scarce resource (an endpoint) in existing stacks is the problem, not the URI.
About
This page contains a single entry from Stefan Tilkov's Random Stuff posted on December 12, 2005 11:59 PM. The previous post in this blog was The Difference between PUT and POST. The next post in this blog is UDDI Public Cloud Discontinued. Many more can be found on the main index page or by looking through the archives.
Comments
The first assumption is that you’d have an endpoint listener for each URL. That’s what I am saying there, not more.
Posted by: Clemens Vasters at December 13, 2005 12:04 AM | link
Millions of URIs doesn’t mean millions of software objects.
http://www.example.com/myapp/customers/00212332
and
http://www.example.com/myapp/customers/23042343
can share the same instance of a software module/object, as well as an HTTP connection, when being interacted with via HTTP. Just not at the same time, of course, as that would require a new instance. All the software need do is bind to “/myapp/customers/”, extract the remainder of the path themselves to get the customer id, and then do a db lookup with that id.
Posted by: Mark Baker at December 13, 2005 8:23 PM | link
