To Develop a stateless web services there is a Software architecture pattern called as REPRESENTATIONAL STATE TRANSFER(REST).This pattern can used in any Distributed Framework, as this is a simple protocol for data transmission and doesn’t require any other additional data transfer rule.REST can be used with the only HTTP protocol.Each service is viewed as resouce identified by URL and the only opreations allowd are the HTTP’s GET, PUT, POST and DELETE.You all will notice on thing that this pattern resembles to SQL by considering service(Resource) equivalent to Table.
A RESTful web service is based on the following principles:
Resources and representations. Instead of providing just one endpoint for a particular web service and having that endpoint perform various operations, you provide access to resources. A resource is a single piece of your web application that you make accessible to clients. Because the resources you have are not transportable over the network, “providing them” means providing representations of their state.
Addressability and connectedness. Resources have their representations, but providing representations of resources would be useless if you could not address them. In REST, every resource must have at least one address, that is, one URI. To address the resource, you simply specify the URI. This concept is called “addressability”. By publishing your web application, you introduce many different URIs that are connected to each other. Because of that connectedness, the only URI you need to give to your clients is one URI called the “bootstrap URI”.
Uniform interface. Even if you make resources available through URIs and representations to exchange between the client and server, it still does not allow you to establish communication. You need a communication protocol/interface to use. In a REST architecture, such an interface must be uniform. It means that whatever URI you access, the interface should be the same. For instance, on the World Wide Web no matter what URI (resource address) you enter, your web browser simply uses an HTTP GET method to retrieve a corresponding web page (resource representation) and displays it.
Statelessness. Statelessness means that a web application is not responsible for keeping any information about the state of its clients. REST does not encompass the concept of HTTP sessions. The client is responsible for tracking its own actions (if it needs to). The service maintains its resources and provides a uniform interface to the clients.