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