Anyeone with some experience with REST architectures?

I’m in the process of planning an application where it could be very beneficial to split it into a series of sub systems (for scalability). These systems can be placed on their own virtual/dedicated servers, so there needs to be a line of communication between the systems. Communication through APIs seems to be the best method here.

Does anyone have any experience with building this kind of a system? I’ve been reading about using http/REST to communicate and wondering if this would be a viable solution?

Any books outside the .net world about RESTful APIs?

Though not in .Net, I have developed and worked with RESTful web services.

From what I understand the idea behind a RESTful web service is to divide the system into stateless resources and leave it to the client to make sense of it all. Each resource will have a URL that the client accesses, and dependent on the Request Method (i.e. GET, POST, PUT, DELETE) and on the parameters passed by the client the resource (web service end point) would perform some business logic and return a result.

Wikipedia is a good place to start. Implementation in .Net cannot be too hard either, you just need some sort of a URL mapper that binds request params to a class that implements methods for each of the four HTTP request methods.

An example could be:

class News {
public get() {…}
public post() {…}
public put() {…}
public delete() {…}

accessible by http://…your…domain…/webservice/news

RestWiki is a good source of information.

Here are a couple of more good reads online:

As for books, I’m looking forward to RESTful Web Services Cookbook which is due to come out in March. You can purchase it as pdf already though.

That structure doesn’t work well in practice, because there are multiple view states that need to respond to a GET request in each controller:

  • List all entries (typically ‘index’)
  • View single entry (typically ‘view’)
  • Display new item entry form (typically ‘new’ or ‘create’)
  • Display existing item edit form (typically ‘edit’)

POST, PUT, and DELETE can map directly to methods easily, but GET does not, and that’s what makes it a bit more complicated to understand and code.