<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mapreduce on Bruno Pedro</title><link>https://brunopedro.com/tags/mapreduce/</link><description>Recent content in Mapreduce on Bruno Pedro</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 08 May 2018 10:00:15 -0700</lastBuildDate><atom:link href="https://brunopedro.com/tags/mapreduce/index.xml" rel="self" type="application/rss+xml"/><item><title>MapReduce related patterns</title><link>https://brunopedro.com/2011/09/26/mapreduce-related-patterns/</link><pubDate>Mon, 26 Sep 2011 21:16:15 +0000</pubDate><guid>https://brunopedro.com/2011/09/26/mapreduce-related-patterns/</guid><description>&lt;p>Here&amp;rsquo;s a list of possible MapReduce related patterns I&amp;rsquo;ve been thinking about:&lt;/p>
&lt;ul>
&lt;li>&lt;em>map-update&lt;/em>: update each mapped document and emit its updated or original version;&lt;/li>
&lt;li>&lt;em>map-delete&lt;/em>: delete each mapped document;&lt;/li>
&lt;li>&lt;em>map-reduce-map&lt;/em>: map results of a &lt;em>map-reduce&lt;/em>;&lt;/li>
&lt;li>&lt;em>map-map&lt;/em>: map results of a &lt;em>map&lt;/em>;&lt;/li>
&lt;li>&lt;em>map-recurse&lt;/em>: apply recursion to the mapping function until a stop condition occurs;&lt;/li>
&lt;li>any combination of patterns, e.g., &lt;em>map-reduce-map-update&lt;/em>.&lt;/li>
&lt;/ul>
&lt;p>Example usage:&lt;/p>
&lt;ul>
&lt;li>get the e-mail address of every customer with a negative balance: &lt;em>map-reduce-map&lt;/em>. First, &lt;em>map-reduce&lt;/em> to get the aggregate balance for each customer, then &lt;em>map&lt;/em> again to get only customers with negative value and emit their e-mail address;&lt;/li>
&lt;li>delete all documents older than one month: &lt;em>map-delete&lt;/em>. First, &lt;em>map&lt;/em> to get all documents older than one month and then &lt;em>delete&lt;/em> each one;&lt;/li>
&lt;li>get a list of documents and mark them as read: &lt;em>map-update&lt;/em>. First, &lt;em>map&lt;/em> to get the list of documents according to a given criteria, then &lt;em>update&lt;/em> each document marking it as read;&lt;/li>
&lt;li>and so on&amp;hellip;&lt;/li>
&lt;/ul></description></item><item><title>MapReduce literature</title><link>https://brunopedro.com/2010/12/22/mapreduce-literature/</link><pubDate>Wed, 22 Dec 2010 13:13:45 +0000</pubDate><guid>https://brunopedro.com/2010/12/22/mapreduce-literature/</guid><description>&lt;p>Just a quick note to point to two valuable MapReduce related resources:&lt;/p>
&lt;ul>
&lt;li>&amp;ldquo;&lt;a href="http://labs.google.com/papers/mapreduce.html">MapReduce: Simplified Data Processing on Large Clusters&lt;/a>&amp;rdquo;, by Jeffrey Dean and Sanjay Ghemawat: the original paper describing Google&amp;rsquo;s MapReduce strategy;&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>MapReduce is a programming model and an associated implementation for processing and generating large data sets. Users specify a map function that processes a key/value pair to generate a set of intermediate key/value pairs, and a reduce function that merges all intermediate values associated with the same intermediate key. Many real world tasks are expressible in this model, as shown in the paper.&lt;/p></description></item><item><title>JavaScript filesystem database</title><link>https://brunopedro.com/2010/12/21/javascript-fs-db/</link><pubDate>Tue, 21 Dec 2010 18:33:00 +0000</pubDate><guid>https://brunopedro.com/2010/12/21/javascript-fs-db/</guid><description>&lt;p>I couldn&amp;rsquo;t resist and, after many conversations with &lt;a href="http://mvalente.eu/" title="Mário Valente">Mário Valente&lt;/a>, I challenged myself to build a complete JavaScript filesystem based database from scratch. In short, something like &lt;a href="http://couchdb.org" title="CouchDB">CouchDB&lt;/a> but written in JavaScript and using a filesystem approach for document storage.&lt;/p>
&lt;p>Some characteristics of this new database system:&lt;/p>
&lt;ul>
&lt;li>fully written in JavaScript: &lt;a href="http://nodejs.org/" title="nodeJS">nodeJS&lt;/a> is my choice for its architecture and portability;&lt;/li>
&lt;li>every document must contain only &lt;a href="http://www.json.org/" title="JSON">JSON&lt;/a> data;&lt;/li>
&lt;li>every document can be manipulated on the filesystem: the idea is to allow someone to edit a document using &lt;a href="http://www.vim.org/" title="vim">vim&lt;/a>, for instance, without breaking anything. It also lets you easily backup, move or replicate your data without creating a heavy load on the database;&lt;/li>
&lt;li>the underlying filesystem can be changed: changing the underlying filesystem offers numerous possibilities, like easy distribution (using &lt;a href="http://www.openafs.org/" title="OpenAFS">OpenAFS&lt;/a>, &lt;a href="http://www.xtreemfs.org/" title="XTREEMFS">XTREEMFS&lt;/a> or others), replication (using &lt;a href="http://code.google.com/p/finefs/" title="finefs">finefs&lt;/a> or others), and even attaching different backends (using &lt;a href="http://fuse.sourceforge.net/" title="FUSE">FUSE&lt;/a>, for example);&lt;/li>
&lt;li>the system must be available through an HTTP &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" title="REST">REST&lt;/a> interface: this makes it very easy to immediately integrate the system into any existing applications. Bonus points if the API is compatible with CouchDB;&lt;/li>
&lt;li>queries must be performed using a &lt;a href="http://en.wikipedia.org/wiki/MapReduce" title="MapReduce">MapReduce&lt;/a> approach: this should make it very easy to perform queries on a large dataset.&lt;/li>
&lt;/ul>
&lt;p>So, right now I&amp;rsquo;m half way through it. I managed to write the backend and I&amp;rsquo;m on my way to the HTTP REST interface. I&amp;rsquo;ll create a github repo after I have something functional that can be easily built and tested.&lt;/p></description></item></channel></rss>