Java Reference
In-Depth Information
• Load-balancing hardware is used for scalability.
• Firewalls can be used for security.
In this diagram, the physical components have been shaded for clarification.
There are some interesting points on data caching that need to be made. First,
data must be marked, either implicitly or explicitly, as cacheable or non-cacheable.
Second, although specialized caches may be used (custom, in-memory data
structures), general-purpose caches, such as Web browser caches, or third-party
Web caches (such as Akamai) may also be used.
Building a RESTful System
If you eliminate typical Web service protocols (XML-RPC SOAP, WSDL, and
so on), how do you build an SOA-based RESTful system? With REST, you use
the same mechanism used to request a Web page: the HTTP query URL. For
instance, take a look at the sample SOAP call in Listing 10.1. Here, a request is
made for an employee's benefits information from a human resources Web service.
Listing 10.1
Sample SOAP Call
<SOAP-ENV:Envelope xmlns:SOAP
ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
some data here…
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<GetBenefits>
<user>123-45-6789</user>
<type>full_time_employee</type>
</GetBenefits>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
With REST, you can replace a SOAP call, such as that shown in Listing 10.1,
with the following URL:
http://humanresources.com/benefits?
user=<USER_SSID>&type=full_time_employee
The HTTP query URL definition is all you need to know and use to make calls to
a RESTful service. The response can be HTML, comma-delimited data, XML,
JavaScript Object Notation (JSON)—which we'll explore in the next section—or
a more sophisticated document type such as a spreadsheet.
 
 
Search WWH ::




Custom Search