In the spirit of functional programming and URLs as Callbacks, I think that map/reduce can be implemented as microapps.

map

a GET request is made to the service with two arguments: a list of JSON dicts, and a URL. The microapp makes a request to the URL with each dict as the params on the request. results are collected in an array and returned.

That's the interface. The implementation could vary in that, eg, it could make all the requests simultaneously and asyncronously. If the request URL is actually load-balanced across multiple machines, it would make for nice scalability.

reduce

the same as map, but two dicts at a time are sent to the URL, the results of each request are expected to be a JSON dict suitable to be passed in on the next request. There must also be an initial JSON dict passed in to start it off.

Map/Reduce (last edited 2006-08-02 20:41:02 by AndersPearson)