Our project does need to provide a RESTful interface because we need to construct the HTTP protocol that will eventually make the ambient device perform an action. Since all we are doing is changing the state of the ambient device by way of a trigger from the hackystat senser database through the use of a hyperlink, all the REST principles and execution can be used to construct that link.
For instance we can give each action and trigger an ID and use the XML to link them together, but there only needs to be one representation of the resource. This representation of the resource is the "action" via a HTTP hyperlink to the ambient device. At this point, the standard methods we would uses is the HTTP protocols like GET and PUT and the communication would be stateless since all data is kept on the hackystat sensor database, and since we are just generating the hyperlink itself and then sending it to the ambient device via the Violet server or Ambient server we can still use the REST architecture to create that link. We also use the web UI to link each trigger to a specific action and can use REST here as well.
Yes it does obey the REST design principles because there is a an ID for every given "thing" that thing being the Sensor Data resource instance. There is also a project/user URI specification which is the what is used to give each "thing" there ID. Everything is done with XML and uses default implementation constraints to link all the data together. It uses the HTTP methods to support access control. This is where the standard methods come into place. All data is return in XML form so this also follows the REST principles of return a resource, although it not multiple representation it does return a resource through a XML representation.
Yes the projectViewer does not seem to obey the REST principles. Upon further research it seems like the projectViewer relies on RPC, which is the Remote Procedure Call. This procedure sends a request to a remote server, or even the local server, and passes along the information that it gets. Then it moves on with the rest of the code. So unlike REST not all of the code is linked together but sections could be located on other servers and remotely activated.
Sunday, February 24, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment