What Exactly is the R in Resource-Oriented-Architectures?

As all of you know, one of the core concept of the Web of Things is design of RESTful things, that is having embedded devices proposing their services in a Resource-Oriented manner.

Today, once again, somebody was asking me but what is exactly a resource? Well good question! We all know (hem) what an Object is in Object Oriented Programming, we all know (hem HEM, yeah right!) what a service is in Service Oriented Architectures but what is a resource in a ROA?

I had this discussion with a good friend of mine (and a very good OO architect!) let’s name him, Patrik Fuhrer. His answer was that a resource is “information”.

I would extend this definition by mixing it with the definition of Leonard Richardson and Sam Ruby (guys I never go anywhere without your book anymore). Inspired from their definition I would say a resource is:

Something, that can and that’s worth, getting a URI and links.

(For the records: updated according to Erik’s comment, used to be: Information, that can and that’s worth, getting a URI and links)

Now what do you think? I’m interested in your definitions. This might seem like a quite un-useful question but actually understanding that can greatly help us know where to stop creating resources.

Let’s say I have RFID tag read by some reader, i.e. an RFID event. Is the time at which the event was taken a resource itself or a part of the “event” resource. Should the information returned be entirely atomic, namely: the RFID event is a resource and every component of it is, in turn a resource. Or should we simply represent the time as part of the event.

Waiting for your input…

You may also like...

  • i don’t think this is a good definition. the W3C TAG has a long history of making a difference between “information resources”, and other resources. i guess the main reason for them is to be more semantic-web friendly, and to come up with a way how to handle HTTP access to non-information resources. but whatever your definition is, it should not be limited to information. i think any attempt to narrow the term down is not necessarily a good idea, generally speaking. a resource is a resource is a resource.

    in particular, for the web of things it would be a pretty bad idea to say that a resource is “information”, because then almost by definition, a “thing” cannot be a resource. to me, that sounds like negating the one fundamental thing you want to have in a web of things: URIs for things. if you’re really interested in things, you have to *give them URIs*, and the various “information resources” associated with them are just secondary resources.

  • Fully understand your point. However simply saying that a resource is a resource is rather hard to communicate. Especially to people from the Object Oriented world who keep wanting parallels.

    Indeed, if we want to convey the WOT idea we need to adapt the definition of a resource to extend to the physical world. Then let’s say a resource is:
    “Something, that can and that’s worth, getting a URI and links.” (I updated the post accordingly).

    Which is already better but still my problem remains, where do we stop creating resources?