Should I REST?

Now that the models are complete, I want to expose access to them as a web service. I'm thinking REST is the way to go. A RESTful approach seems simple. It appears to solve pesky "back button" problems and session timeout issues, but I have one big question: How to fit all the information I need into the URL?

The application I'm working on has A LOT of data. The main objective of the application is to allow filtering of this data down to a useful, manageable set. It wouldn't be uncommon for a user to ask for something like:
   Give me everything connected to Item1, Item2 and Item3,
Hide anything that has to do with Item4 or Item5
In addition, give me anything that mentions Items 6, 7, or 8
and is new to the system in the past month.
To put all this information in the URL is a scary proposition.

In it's previous life as a Java web application, all this search criteria was built incrementally and stored in a user's session. Since the client of this service could be servicing many clients of it's own, this isn't a valid approach.

I don't want to return all the information for each object either. Allowing clients to specify the information they need, as well as pagination, is required.

Writing an "Old School" SOAP/XML web service may be the best answer. I'm already familiar with creating this type of service and all the criteria/request information can easily be captured in a WSDL definition.

I'm thinking, however, that other people must've encountered similar challenges in designing their RESTful web services. I'm picking up a copy of RESTful Web Services to try and find the answers and best practices to these questions.

Comments

Popular posts from this blog

FRail :include

Performance Tuning JCAPS - Part 2

I Believe...