Recipe 16.1. Searching for Books on Amazon
Problem
You want to incorporate information about books or other cultural artifacts into your application.
Solution
Amazon.com exposes a web service that gives you access to all kinds of ...
Recipe 16.2. Finding Photos on Flickr
Problem
You want to use Ruby code to find freely reusable photos: perhaps to automatically illustrate a piece of text.
Solution
The
Flickr photo-sharing web site has a huge number of photos an...
Recipe 16.3. Writing an XML-RPC Client
Credit: John-Mason Shackelford
Problem
You want to call a remote method through the XML-RPC web service protocol.
Solution
Use Michael Neumann's
xmlrpc4r library, found in Ruby's standa...
Recipe 16.4. Writing a SOAP Client
Credit: Kevin Marshall
Problem
You need to call a remote method through a SOAP-based web service.
Solution
Use the SOAP RPC Driver in the Ruby standard library.
This simple program print...
Recipe 16.5. Writing a SOAP Server
Credit: Kevin Marshall
Problem
You want to host a SOAP-based web service using a standalone server (that is, not as part of a Rails application).
Solution
Building your own SOAP server really ...
Recipe 16.6. Searching the Web with Google's SOAP Service
Problem
You want to use
Google's web services to perform searches and grab their results within your Ruby application.
Solution
Google exposes a SOAP API to its search f...
Recipe 16.7. Using a WSDL File to Make SOAP Calls Easier
Credit: Kevin Marshall
Problem
You need to create a client for a SOAP-based web service, but you don't want to type out the definitions for all the SOAP methods you'll be calli...
Recipe 16.8. Charging a Credit Card
Problem
You want to charge a credit card from within your Ruby application.
Solution
To charge credit cards online, you need an account with a credit card merchant. Although there are many to choos...
Recipe 16.9. Finding the Cost to Ship Packages via UPS or FedEx
Problem
You want to calculate the cost to ship any item with FedEx or UPS. This is useful if you're running an online store.
Solution
FedEx and
UPS provide we...
Recipe 16.10. Sharing a Hash Between Any Number of Computers
Credit: James Edward Gray II
Problem
You want to easily share some application data with remote programs. Your needs are as trivial as, "What if all the computers could share th...
Recipe 16.11. Implementing a Distributed Queue
Credit: James Edward Gray II
Problem
You want to use a central server as a workhorse,
queueing up requests from remote clients and handling them one at a time.
Solution
Here's a meth...
Recipe 16.12. Creating a Shared "Whiteboard"
Credit: James Edward Gray II
Problem
You want to create the network equivalent of a
whiteboard. Remote programs can place Ruby objects up on the board, examine objects on the board, or remov...
Recipe 16.13. Securing DRb Services with Access Control Lists
Credit: James Edward Gray II
Problem
You want to keep everybody in the world (literally!) from having access to your DRb service. Instead you want to control which hosts can, a...
Recipe 16.14. Automatically Discovering DRb Services with Rinda
Credit: James Edward Gray II
Problem
You want to distribute Ruby code across your local network without hardcoding the clients with the addresses of the servers.
Solutio...
Recipe 16.15. Proxying Objects That Can't Be Distributed
Credit: James Edward Gray II
Problem
You want to allow classes to connect to your DRb server, without giving the server access to the class definition. Perhaps you've given cli...
Recipe 16.16. Storing Data on Distributed RAM with MemCached
Credit: Ben Bleything with Michael Granger
Problem
You need a lightweight, persistent storage space, and you have systems on your network that have unused
RAM.
Solution
...
Recipe 16.17. Caching Expensive Results with MemCached
Credit: Michael Granger with Ben Bleything
Problem
You want to transparently cache the results of expensive operations, so that code that triggers the operations doesn't need to ...
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.