[Grok-dev] Fetching data from a remote site

Luciano Ramalho luciano at ramalho.org
Wed Jul 4 17:19:47 EDT 2007


Given an ISBN or title/author info, Kirbi will look for book metadada
in remote sites such as Amazon.com. I'd like your comments on an
architecture for doing that in Grok.

I prefer not to have the precious few threads of my web apps waiting
on network results, so last year I implemented this as follows using
Horde:

- user submits form with ISBN
- web app checks whether it already know that ISBN; if not, it saves
it as "pending" and immediately returns a response
- an external python script periodically asks the web app for pending
ISBNs, fetches the metadata from the remote site, parses it and
submits the data to the web app via XML-RPC

On the other hand, the "pending" ISBNs could be a very nice example of
using events in Zope 3: an event handler could go and fetch the
metadata from the remote site. I'd like to hear from the Zope 3
experts on this.

Cheers,

Luciano


More information about the Grok-dev mailing list