jueves, 19 de abril de 2012

Reporte

En está semana se investigó sobre MapReduce que este es un framework introducido por Google para dar soporte a la computación paralela sobre grandes colecciones de datos en un gran número de computadoras.El nombre del framework está inspirado en los nombres de dos importantes métodos, macros o funciones en programación funcional:
Map y Reduce

Las funciones Map y Reduce están definidas ambas con respecto a datos estructurados en pares (clave, valor). Map toma uno de estos pares de datos con un tipo en un dominio de datos, y devuelve una lista de pares en un dominio diferente:
Map(k1,v1) -> list(k2,v2)  

La función de mapeo es aplicada en paralelo para cada ítem en la entrada de datos.

Esto produce una lista de pares (k2,v2) por cada llamada. Después de eso, el framework de MapReduce junta todos los pares con la misma clave de todas las listas y los agrupa, creando un grupo por cada una de las diferentes claves generadas.

La función reduce es aplicada en paralelo para cada grupo, produciendo una colección de valores para cada dominio:
Reduce(k2, list (v2)) -> list(v2)  
Cada llamada a Reduce típicamente produce un valor v2 o una llamada vacía, aunque una llamada puede retornar más de un valor.

El retorno de todas esas llamadas se recoge como la lista de resultado deseado.  Por lo tanto, el framework MapReduce transforma una lista de pares (clave, valor) en una lista de valores. Este comportamiento es diferente de la combinación "map and reduce" de programación funcional, que acepta una lista arbitraria de valores y devuelve un valor único que combina todos los valores devueltos por mapa.

Busqué algún libro que me pueda ayudar a entender estos conceptos y lo más factible que encontré fue este:
 Writing and Querying MapReduce Views in CouchDB
http://www.amazon.com/exec/obidos/tg/detail/-/1449303129

Mi nominación de la semana es Abraham, ya que habló sobre Web Crawler y algunos conceptos no los sabía.

Fuente:
 MapReduce : Wikipedia

Conceptos Básicos

Unidad

Denominación que reciben los disco duros, las disqueteras, los lectores de cd-rom y DVD, y en general, todos los puntos de almacenamiento de datos. La posibilidad de incorporar varios discos duros en un mismo ordenador ocasiona que los programas, al instalarlos, ofrezcan la opción de elegir la unidad de disco.

Priority

La prioridad es un dato definido por el usuario que determina la importancia de cada recurso que un usuario está usando para acceder al servidor.

Access

Es el resultado positivo de una autentificación, para que el acceso dure un tiempo predeterminado, el servidor guarda en el cliente una cookie, esta permitirá que el usuario pueda entrar a su cuenta en el servidor hasta que esta caduque.

Stream

Es la distribución de multimedia a través de una red de computadoras de manera que el usuario consume el producto al mismo tiempo que se descarga. La palabra se refiere a que se trata de una corriente continua (sin interrupción).

Virtual

Es un sistema tecnológico, basado en el empleo de ordenadores y otros dispositivos, cuyo fin es producir una apariencia de realidad que permita al usuario tener la sensación de estar presente en ella.

Display

Dispositivo de ciertos aparatos electrónicos que permite mostrar información al usuario, creado a partir de la aparición de calculadoras, cajas registradoras e instrumentos de medida electrónicos en los que era necesario hacerlo.

Fuente:
http://www.ondata.es/recuperar/glosario.htm
Wikipedia

jueves, 29 de marzo de 2012

Report #8

I make a research about How to replicate data from a server to another server, and I found some things interesting like Couchdb.

Couchdb is plugged into the web, all you could use HTTP for creating and making queries (GET/PUT/POST/DELETE...), and it's RESTful, plus the fact that it's portable and great for peer to peer sharing and provides a different model for data storage than a traditional relational database in that it does not represent data as rows within tables, instead it stores data as "documents" in JSON format.

We can handling using python like in this tutorial that explain How to make a replication I found here:


The objective that I have to this week and the next is try to make a Demo or something.

To start I'll type in the wiki how to install the enviroment.

My nomination for this week is:

  Mr. X

jueves, 1 de marzo de 2012

Basic Concepts

Signal
Signal or Signals are an operating system feature that provide a means of notifying your program of an event, and having it handled asynchronously.  

Wait
 Just wait for synchronization operation something like lock acquisition to complete a task.  

Address
It's the direction where a file or something is allocated.  

Processor
A processor is the logic circuitry that responds to and processes the basic instructions that drive a computer.  

Thread
A Thread is a concurrent unit of execution. It has its own call stack for methods being invoked, their arguments and local variables.

Distributed
Distributed computing is a field of computer science that studies distributed systems.A distributed system consists of multiple autonomous computers that communicate through a computer network. The computers interact with each other in order to achieve a common goal. A computer program that runs in a distributed system is called a distributed program, and distributed programming is the process of writing such programs.  

Quality
Quality software is reasonably bug-free, delivered on time and within budget, meets requirements and/or expectations, and is maintainable.
  
Synchronization
Synchronization refers to one of two distinct but related concepts: synchronization of processes, and synchronization of data. Process synchronization refers to the idea that multiple processes are to join up or handshake at a certain point, so as to reach an agreement or commit to a certain sequence of action. Data synchronization refers to the idea of keeping multiple copies of a dataset in coherence with one another, or to maintain data integrity.  

Port
 A port is an application-specific or process-specific software construct serving as a communications endpoint in a computer's host operating system.It's associated with an IP address of the host, as well as the type of protocol used for communication.  

User
A user is an agent, either a human agent (end-user) or software agent, who uses a computer or network service.  

Event
A software message indicating that something has happened, such as a keystroke or mouse click.

Transfer
Transfers per second and its more common derivatives gigatransfers per second (abbreviated GT/s) and megatransfers per second (MT/s) are informal language that refer to the number of operations transferring data that occur in each second in some given data-transfer channel.

Source:

My report #5

I explained what was happening in the code that was made in C, using the library MPI.Because we just had the code and nobody knew what was happening.

This is the link:

http://elisa.dyndns-web.com/progra/MPI

Now I don't have a clear idea what to do next week, any suggestions will be welcome.

jueves, 23 de febrero de 2012

Examples with CUDA

The first example that we will see is a vectors sum using CUDA, where we have two lists of numbers where we sum the elements from each list and store the result in a third list.


Now we have the source code where we are using CPU.


As you saw in the comments that program is just simple we add always the library "book.h" which we need to use all the features of CUDA, and I took a screenshot of the results.

[Image of results]

Now we have the source code where we are using GPU.




Editing...

miércoles, 22 de febrero de 2012

Running programs in parallel using Parallel Python

Parallel Python is a python module which provides mechanism for parallel execution of python code on SMP(systems with multiple processors or cores) and clusters(computers connected via network).

Parallel Python has good features as you can see below:
  • Parallel execution of python code on SMP and clusters.
  • Easy to understand and implement job-based parallelization technique (easy to convert serial application in parallel).
  • Automatic detection of the optimal configuration (by default the number of worker processes is set to the number of effective processors).
  • Dynamic processors allocation (number of worker processes can be changed at runtime).
  • Low overhead for subsequent jobs with the same function (transparent caching is implemented to decrease the overhead).
  • Dynamic load balancing (jobs are distributed between processors at runtime).
  • Fault-tolerance (if one of the nodes fails tasks are rescheduled on others).
  • Auto-discovery of computational resources.
  • Dynamic allocation of computational resources (consequence of auto-discovery and fault-tolerance).
  • SHA based authentication for network connections.
  • Cross-platform portability and interoperability (Windows, Linux, Unix, Mac OS X).
  • Cross-architecture portability and interoperability (x86, x86-64, etc.).
  • Open source.


The first thing what we need to do is just download a module of Parallel Python, as you see below I leave one link where you can find it, download whichever you want.


Decompress it, and open the directory created, then type the following:

sudo setup.py install

We tested an example called sum_primes.py using two netbooks with Atom processor and a MacBookPro with i5 processor, before to see results I take some screenshots using just the MacBookPro.

 And now the results adding the two netbooks.


As you saw in the second one we have less time considerable than the first one, another thing that we saw is the warning that said statistics provided adove is not accuarte due to job rescheduling, it may occurs because they work with a little porcentage of time.

I took screenshots from my activity monitor to prove that the processor is using the top.


Source:

http://www.parallelpython.com/