Christopher Miles, one of our Senior Software Developers here at TNR, wrote this post on Bishop. It all started when he was asked the question:
“What happens if I send it something that’s not JSON?”…….“I don’t know, but I bet it logs a really big stack trace!”
The question begged an answer, and Chris give an extremely thorough answer in his own blog. Here’s a small except that gives a taste of his analysis:
After taking a closer look at HTTP and it’s specification, it was clear that it could do a lot more than I had thought. Looking back on past projects, it’s painfully obvious that I’ve been taking what is really an application protocol and ignoring all of the interesting bits, instead using it as little more than a pipe to push documents through. I’ve been using either the requested URL or parameters or maybe even neither and simply examined the body content, thus eliminating any of the real advantages of using HTTP in the first place.
And there are advantages. The protocol is already thinking about caching your data where it makes the most sense. There’s already an algorithm for taking the list of content types that the client wants and the content types the server provides and picking the best match. It can manage safe updating of resources as well as notifying the client of conflicts. And so on, by ignoring what the HTTP protocol has to offer I was making more work for myself.
So he decided to take matters into his own hands by creating a library. More from Chris’ blog:
The idea is to provide a relatively small library that will make your life easier and hopefully more pleasant by making it straightforward to provide a consistent web service API that obeys HTTP semantics. It will make the lives of those around you easier as well, clients can expect your service to respond to the common HTTP request methods with reasonable responses. Placing caches around your service will also be much simpler and you’ll have some level of control over how your service’s data is cached.
Since creating this library, other developers have responded positively and are watching the project. If you would like to take a look at how our approach to solving this problem, take a look for yourself here.
If you’d like to talk to us on how we can solve some of your enterprise search, cloud, or scalability issues, contact us.