So when the call came in it seemed Id be a natural fit for what the client was

So when the call came in it seemed id be a natural

This preview shows page 475 - 477 out of 619 pages.

So, when the call came in, it seemed I’d be a natural fit for what the client was looking to accomplish. Once I understood what they really needed, though, I decided that they would be much better off with a set of services exposed through simple GET and POST requests over HTTP, exchanging XML data describing the requests and responses. Although I didn’t know it at the time, this architectural style is now commonly referred to as REST , or Representational State Transfer. How did I decide to use REST over SOAP? Here are a few of the decision points to consider when choosing a Web Services architecture: How many different systems will require access to these services, and are all of them known at this time? This manufacturer knew of a single distributor that needed to access its systems, but also acknowledged that others might decide to do the same in the future.
Image of page 475
I N T E G R A T I N G B U S I N E S S P A R T N E R S T H E R E S T F U L W A Y 453 Do you have a tight set of end users that will have advance knowledge of these services, or do these services need to be self-describing for anonymous users to automatically connect to? Because there has to be a defined relationship between the manufacturer and all its dis- tributors, it is guaranteed that each of the potential users will have advance knowledge of how to access the manufacturer’s systems. What kind of state needs to be maintained throughout a single transaction? Will one request depend on the results of a previous one? In our case, each transaction will consist of a single request and a corresponding result that doesn’t depend on anything else. Answering the above questions for this project yielded the obvious choice of simply expos- ing a set of known services over the HTTP protocol and exchanging data using a standard e-business protocol that both systems could understand. If the manufacturer would have liked to allow anonymous users to query product availability, then I might have opted for a full SOAP solution because that would allow systems to discover the services and pro- grammatically interface with them without prior knowledge of the systems. I currently work in the field of bioinformatics, where there is a definite need for SOAP- style Web Service architectures. We make use of a project called BioMoby ( . biomoby.org ) to define Web Services and publish them to a central repository that allows other groups to literally drag and drop our services into a workflow that builds data pipe- lines to help biologists integrate diverse sets of data and perform varied analysis on the results. This is a perfect example of why someone would choose SOAP over REST. Anony- mous users can access our data and tools without any prior knowledge that they even existed.
Image of page 476
Image of page 477

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture