Red
es
2006
Red
es
Índice
1. Redes P2P
2. Redes ad-hoc
3. Grid computing
4. Redes cooperativas
5. Redes sociales
6. Problemas y soluciones
Red
es P
2P
Definición
• Un sistema peer-to-peer (p2p) es un sistema distribuido sin ningún control centralizado y donde la funcionalidad de cada nodo es idéntico.
“Single servants are less powerful than a single server but the collective of many servants is more powerful than any single server” – by Daniel Stephen Rule
Red
es P
2P
Definiciones P2P
Preocupación sobre la red
Preocupación sobre la aplicación
Definiciones
Red
es P
2P
Definiciones P2P
Redes completamente descentralizadas con estructuras no-jerárquicas y comunicación simétrica - Stoica et al.
Preocupación sobre la red
Preocupación sobre la aplicación
Definiciones
Red
es P
2P
Definiciones P2P
Los sistemas P2P acentúan la cooperación entre entidades (conocidas como Peers) que son esencialmente iguales y que se
proporcionan servicios entre ellas. P2P acentúa la descentralización, la resistencia y la explotación de recursos de la red - Coulson.
Preocupación sobre la red
Preocupación sobre la aplicación
Definiciones
Red
es P
2P
Definiciones P2P
Elementos relacionados que se aprovechan de los recursos disponibles de la red - Shirky
Preocupación sobre la red
Preocupación sobre la aplicación
Definiciones
Red
es P
2P
Topología de la red
Red
es P
2P
Topologías P2P
Red
es P
2P
Propiedades
No existe un control central=> Sistema distribuido No existe jerarquía
Todos los nodos son a clientes y servidores La comunicación entre nodos es simétrica
No existe una visión global Escalabilidad Disponibilidad para cualquier peer Los peers son autónomos Sistema globalmente poco fiable
Aspectos de robustez y seguridad
Red
es P
2PAvances
Gran extensión de conexión a Internet
Intercambio usuario-usuario, minimiza los
vínculos con intermediarios
Comunicaciones y colaboración
Historia / Evolución (Computación)
Cultura / Sociedad (Servicios / Intercambio
de ficheros)
Comunicación / Colaboración
Arquitectura
Algoritmos
Que ha permitido llegar hasta este punto?
Que posibilidades ofrece?
Incremento en la descentralización de Internet
Estados descentralizados
Comunicaciones de banda ancha, Wireless, nuevos tipos de Redes.
Aprovechar la potencia del ordenador en casa y la
oficina
Gran escalabilidad, mejor accesibilidad
Mejoras en la escalabilidad, disponibilidad y anonimato
Computación y Comunicación Ubicua
Red
es P
2P
Taxonomia
P2P Applications
ComputeIntensive
Compo-nentized
Contentexchange
Filesystem
Filtering,mining
Instantmessage
Sharedapps
Games
ParallelContent and
file managementCollaboration
Red
es P
2P
Ejemplos
Aplicaciones de intercambio de ficheros (Naptser,…) Bases de datos distribuidas Computación distribuida (SETI,…) Comunicación distribuida (AOL Instant Messaging,…) Colaboración (Groove) Juegos distribuidos Redes Ad-hoc Etc.
Red
es P
2P
Groove
Aplicación Windows de colaboración. Funciona contra un servidor central.
Empresa Groove Networks. Servicios de colaboración:
Intercambio de ficheros Intercambio de mensajes o notas Chat en modo texto y voz Navegación Web sincronizada Agenda y calendario
Es un sistema extensible
Red
es P
2P
Groove
Integra varias aplicaciones en una. Facilidad de uso. Piloto de sala virtual de discusión en tiempo real. Navegación individual o sincronizada. Para colaborar hay que estar conectado.
Se pueden distribuir mensajes a usuarios que no están conectados
Los mensajes pasan por el servidor Se pueden definir servicios de colaboración directa entre usuarios.
VIDEO: grv-sf
Red
es P
2P
SETI Es un proyecto de la Universidad de Berkeley para buscar
vida extraterrestre inteligente. El método:
Análisis de ondas electromagnéticas provenientes del espacio exterior, obtenidas de radiotelescopios.
La técnica : Buscar patrones, series, repeticiones en el ruido de fondo
captado. El sistema está formado por un grupo de ordenadores
centrales que reciben las emisiones de los telescopios y dividen la información recibida en bloques
Los bloques se entregan a la red de PCs para buscar resultados parciales y luego ensamblarlos• Utiliza ciclos inactivos de CPU de los ordenadores a
través de Internet Con este sistema se procesa más del doble que con el
ordenador más potente ASCI White: 12 Teraflops/s (110 millones de $) SETI@home: 31 Teraflops/s (0,5 M$, 3,3 millones de PCs)
Red
es P
2P
SETI
Red
es P
2P
SETI
VIDEO: Seti2401
RADIO: radio_network_comercial
Red
es P
2P
An agent is one that is capable of flexible autonomous
action in order to meet its design objectives, where
flexibility means three things: Pro-activeness: the ability of exhibit goal-directed
behavior by taking the initiative Reactivity: the ability of percept the environment, and
respond in a timely fashion to changes that occur in it Social ability: the ability of interaction with other agents
(include human)
A node follows a protocol established in the system.
Node versus Agent
Red
es P
2P
Beneficios: Mejora dramáticamente la velocidad => Escalable Servidores con pocos requerimientos => Barato
Desafíos: Requiere incentivas para la cooperación Seguridad Manejabilidad Variabilidad en los anchos de banda Necesidad de algoritmos distribuidos
Distribución de contenido en P2P
Red
es P
2P
Topologías
• Centralized service location, e.g. Napster• Flooded request model / Distributed service
location with flooding, e.g. Gnutella• Document routing model / Distributed search
hashing / Distributed service location with hashing, e.g. Pastry, Chord
• BitTorrent
Red
es P
2P
Centralized service location
Red
es P
2P
Distributed service location with flooding
Red
es P
2P
Gnutella protocol
Red
es P
2P
Gnutella protocol
Red
es P
2P
Kazaa un Gnutella jerarquizado
Red
es P
2P
Distributed search hashing
• Internet-scale distributed hash tables– Equally valuable to large-scale distributed
systems?• Peer-to-peer systems
– CAN, Chord, Pastry, …• Large-scale storage management systems
– Publius, OceanStore, CFS …• Mirroring on the Web
Red
es P
2P
DHT Step 1: The Hash
Red
es P
2P
DHT Step 2: Routing
Red
es P
2P
Pastry
• Completely decentralized, scalable, and self-organizing
• Seeks to minimize the distance messages travel, according to a scalar proximity metric like the number of IP routing hops
• In a Pastry network,– Each node has a unique id, nodeId– Presented with a message and a key, Pastry node
efficiently routes the message to the node with a nodeId that is numerically closest to the key
Red
es P
2P
Pastry: NodeId
Red
es P
2P
Pastry: Routing
Red
es P
2P
Load balance: Chord acts as a distributed hash function, spreading keys evenly over the
nodes. Decentralization:
Chord is fully distributed: no node is more important than any other. Scalability:
The cost of a Chord lookup grows as the log of the number of nodes, so even very large systems are feasible.
Availability: Chord automatically adjusts its internal tables to reflect newly joined nodes
as well as node failures, ensuring that, the node responsible for a key can always be found.
Flexible naming: Chord places no constraints on the structure of the keys it looks up.
Chord: System Model
Red
es P
2P
The application interacts with Chord in two main ways: Chord provides a lookup(key) algorithm that yields the IP
address of the node responsible for the key. The Chord software on each node notifies the application of
changes in the set of keys that the node is responsible for.
Chord: System Model
Red
es P
2P
Definition of variables for node n, using m-bit identifiers.
Chord: Scalable key Location
Red
es P
2P
(a) The finger intervals associated with node 1. (b) Finger tables and key locations for a net with nodes 0, 1, and 3, and keys 1, 2, and 6.
Chord: Scalable key Location
Red
es P
2P
(a) Finger tables and key locations after node 6 joins. (b) Finger tableand key locations after node 1 leaves. Changed entries are shown inblack , and unchanged in gray.
Chord: Node joins
Red
es P
2P
Chord
Red
es P
2P
Chord routing
Red
es P
2P
Chord routing
Red
es P
2P
Chord node insertion
Red
es P
2P
Chord node insertion (cont’d)
Red
es P
2P
Chord node insertion (cont’d)
Red
es P
2P
El problema de los free riders
From Wikipedia, the free encyclopedia:
“In economics and political science free riders are actors who consume more than their fair share of a resource, or shoulder less than a fair share of the costs of its production. The free rider problem is the question of how to prevent free riding from taking place, or at least limit its negative effects.”
Red
es P
2PBitTorrent
Usa ideas básicas de la teoría de juegos para eliminar el problema de los free-riders
Los sistemas anteriores no trataban dicho problema
VIDEO: FutureOfBitTorrent
Red
es P
2PBitTorrent: Dilema del prisionero
Red
es P
2PBitTorrent
The main goal of BitTorrent concerning efficiency is to be Pareto efficient, because this measure is used often by economists as efficiency goal. By definition an outcome of a game is Pareto efficient if there is no other outcome that makes every player at least as well off and at least one player strictly better off. That is, a Pareto Optimal outcome cannot be improved upon without hurting at least one.
In computer science terms, seeking Pareto efficiency is a local optimization problem in which pairs of counterparties see if they can improve their lot together, and such algorithms tend to lead to global optima.
Red
es P
2P
Cortar un fichero en diferentes piezas Replicar diferentes piezas en diferentes peers Tan pronto como un peer dispone de una parte, él
puede negociar con esto con otros peers Con un poco de suerte, al final el peer será capaz de
obtener todas las piezas para completar el fichero
BitTorrent: Idea básica
Red
es P
2PBitTorrent: Componentes básicos
SeedPeer que dispone del fichero completo
Leacher Peer que dispone de un fichero incompleto
A Torrent file Componente pasivo Ficheros son fragmentados en piezas de 256KB El fichero contiene una lista de SHA1 hashes de todas las piezas que
permite a los peers verificar la integridad del fichero Típicamente hospedados en un servicio web
A Tracker Componente activo Permite a los peers encontrar otros peers Devuelve una lista aleatoria de peers
Red
es P
2P
El orden en que las piezas son seleccionadas por los diferentes peers es una parte critica para el buen funcionamiento del sistema
Si un mal algoritmo es usado, se puede llegar a la situación donde cada peer tiene todas las piezas que estan disponibles y ninguno la pieza que no tiene nadie.
Si el seed se desconecta, el fichero no puede ser bajado complemtamente => Existe altruismo
BitTorrent: Algoritmo
Red
es P
2PBitTorrent: Primera pieza
Inicialmente, un peer no tiene nada con que negociar Importante que él obtenga una pieza tan pronto como
sea posible Política: Seleccionar una pieza al azar del fichero y
bajarla
Red
es P
2PBitTorrent: Choking (estrangular)
Es un mecanismo que asegura que los nodos cooperen y elimina el problema de los nodos free-riders.
La cooperación implica que el agente de upload sub-piezas que dispone
Choking es denegar upload a un peer Las conexiones se mantienen abiertas así que el coste de
montar las conexiones no aumenta Basado en el concepto de teoría de juegos:
Tit-for-tat con repetición
Red
es P
2PBitTorrent: Choking Algorithm
El objetivo es tener varias conexiones bidireccionales abiertas continuamente
Un peer siempre unchockes un número fijo de peers (por defecto 4)
La decisión de chocke/unchoke se realiza sobre los ratios de download, los cuales son evaluados cada 20-segundos
Red
es P
2PBitTorrent revisited
Red
es P
2PEvolution of P2P Cooperation
Red
es P
2P
P2P and economic vision
Red
es A
d-h
oc
02/05/06
Del latín que significa “para esto (a propósito)”. En general es una solución que ha sido hecho a medida. Puede usarse también para indicar que algo es improvisado
Una red "Ad Hoc" consiste en un grupo de ordenadores que se comunican cada uno directamente con los otros a través de las señales de radio sin usar un punto de acceso. Las configuraciones "Ad Hoc" son comunicaciones de tipo punto-a-punto
Particularidad esencial de las redes “Ad hoc”: el movimiento de los nodos modifica la topología de la red. Este hecho se ve magnificado por el corto alcance de las tecnologías inalámbricas que suelen soportar las redes ad hoc (ej: Bluetooth, WLAN)
Definición
Red
es A
d-h
oc
02/05/06
[An ad hoc network is ] a transitory association of mobile nodes which do not depend upon any fixed support infrastructure. [...]
Connection and disconnection is controlled by the distance among nodes and by willingness to collaborate in the formation of cohesive, albeit transitory community. »
By Murphy et al. 1998
Definición
Red
es A
d-h
oc
02/05/06
Imposible de predecir Emergencias Catástrofes
Imposible (difícil) de configurar Redes de sensores Redes cooperativas
Uso
Red
es A
d-h
oc
02/05/06
Como obtener información de A a B cuando todo entre esos nodos esta en movimiento?
Y que sucede con: Retraso Rendimiento Consumo de energía Caminos fiables
Aspectos de la redes ad hoc
A
B
Red
es A
d-h
oc
02/05/06
P2P is based on an IP network Ad-hoc is based on a mobile radio network Mobile Ad-hoc and Peer-to-Peer Networks hold many
similarities concerning their routing algorithms and network management principles
Both have to provide networking functionalities in a completely unmanaged and decentralized environment
i.e. To determine how queries (packets) are guided through the network
Comparación redes Ad-hoc y P2P
Red
es A
d-h
oc
02/05/06
Comparación redes Ad-hoc y P2P
Red
es A
d-h
oc
02/05/06
Diferencias: redes Ad-hoc y P2P
Red
es A
d-h
oc
02/05/06
Similaridades: redes Ad-hoc y P2P
Gri
d C
om
pu
tin
g
02/05/06
Grid computing is an emerging computing model that provides the ability to perform higher throughput computing by taking advantage of many networked computers to model a virtual computer architecture that is able to distribute process execution across a parallel infrastructure.
Definición
From Wikipedia, the free encyclopedia:
Gri
d C
om
pu
tin
g
02/05/06
P2P versus Grid computing
Ambas abordan el mismo problema. Compartir recursos dentro de una comunidad virtual (pero no en las mismas
comunidades). Ambas realizan una misma aproximación.
Creación de capas cuya estructura no corresponde con la de la organización subyacente.
Las aplicaciones Grid generalmente usan gran cantidad de datos y cálculos. Los problemas que abordan las aplicaciones P2P actuales no requieren de una
gran intercambio de recursos entre los nodos. Cada uno ha creado avances técnicos propios, pero en una dirección
complementaria “Grid los ha dirigido en mejorar las infraestructuras pero no la tolerancia a fallos” “P2P los ha dirigido en mejorar los fallos pero no las infraestructuras”
Gri
d C
om
pu
tin
g
02/05/06
Grid
Scale & volatility
Grids
P2P
Convergence: Large, Dynamic, Self-Configuring Grids Large scale Intermittent resource participation Local control, Self-organization Weaker trust assumptions Infrastructures to support diverse applications Diversity in shared resources
Gri
d C
om
pu
tin
g
02/05/06
PlanetLab
• Plataforma de test apra experimentar con aplicaciones P2P y Grid. >600 nodes, >300 sites, – PlanteLab consorcio: + de 80 universidades,
Intel, HP
• Los usuarios ven un conjunto de Virtual Machines donde realizar tests.
Gri
d C
om
pu
tin
g
02/05/06
PlanetLab 452 nodes162 sites450 research projects• Un sistema de tests abierto y a gran escala para
aplicaciones P2P y servicios Grid.
Red
es c
oo
per
ativ
as
02/05/06
Bands of computer users in urban areas around the world are pioneering a new type of network called cooperative networks. When two geographically distant devices need to communicate and cannot send messages directly to one another, the sender asks intermediate devices to forward its message to the recipient or another type of action. The ownership of the networked devices is divided among many, possibly self-interested, individuals. Despite that the network devices’ owners have no immediate interest in helping one another, they frequently configure their devices to forward traffic. The resulting collection of devices form a cooperative network.
Definition
Red
es c
oo
per
ativ
as
02/05/06
La idea básica aquí es que la gente está de acuerdo en compartir de manera cooperativa su capacidad extra de conexión de banda ancha , a cambio de recibir acceso libre para otros miembros de la comunidad cuando se están desplazando a través de la ciudad.
“Ejemplo”: FON de Martin Varsavsky• Modelo de negocio
– Bill: ofrece su ADSL por WiFi y es recompensado– Alien: usa el WiFi y paga por el servicio
Ejemplo: Fon
FON ≈ P2P + WiFi + cooperación
VIDEO: Anuncio de FON en la 2 de TVE
Red
es c
oo
per
ativ
as
02/05/06
Ejemplo: Fon
Red
es c
oo
per
ativ
as
02/05/06
Ejemplo: Fon
Red
es c
oo
per
ativ
as
02/05/06
Ejemlo: Guifi.net
• guifi.net és la suma de molts nodes que aporten connectivitat als usuaris. Cada node dóna servei als clients que estan a prop seu i a la vegada s’interconnecta amb altres nodes propers per crear una xarxa lliure, gratuïta, alternativa i d’alta velocitat.
Red
es s
oci
ales
02/05/06
A social network is a social structure made of nodes which are generally individuals or organizations. It indicates the ways in which they are connected through various social familiarities ranging from casual acquaintance to close familial bonds. The term was first coined in 1954 by J. A. Barnes (in: Class and Committees in a Norwegian Island Parish, "Human Relations"). The maximum size of social networks tends to be around 150 people (Dunbar's number) and the average size around 124 (Hill and Dunbar, 2002).
Examples: LinkedIn, Tribe, openBC, Ryze, MeetUp, eVite, MySpace
Definición
02/05/06
El problema de los free riders
From Wikipedia, the free encyclopedia:
“In economics and political science free riders are actors who consume more than their fair share of a resource, or shoulder less than a fair share of the costs of its production. The free rider problem is the question of how to prevent free riding from taking place, or at least limit its negative effects.”
02/05/06
El problema de los free riders
Free Riding on Gnutella by Eytan Adar and Bernando A. Huberman
02/05/06
Sobreexplotación de los recursos (tragedy of commons)Freeriding and tragedy of the commons are two
major problems Nearly 70% of Gnutella users do not share any file with the P2P community and nearly 50% of all search responses come from the top 1% of content sharing nodes. Therefore, nodes that share resources are always congested and the tragedy of the commons occurs. Freeriding and tragedy of the commons are two major problems. Therefore, nodes that share resources are always congested and the tragedy of the commons occurs .
02/05/06
Políticas para detener/reducir estos problemas
One common approach has been to ignore rationality problems and hope for the best.
One reason why these systems may work is that there can be enough obedient users following a given protocol, even when it might be rational not to do so.
Alternatively, existing systems may work because there are enough rational users that maximize their expected utility by the enjoyment of providing a common good. This altruistic behavior is outside of typical game-theoretic models.
02/05/06
Incentive Mechanism
How to encourage cooperation among strangers?
Challenges: large, dynamic groups with anonymity, hidden action, hidden information, and asymmetries of interest.
02/05/06
Incentive Mechanism
•Tokens/currency
• Appropriate for trading of multiple resource types
• Examples: Mojonation, KARMA, tycoon, ...
•Barter/taxation
• Appropriate for single commodity type
• Sometimes called tit-for-tat or bit-for-bit
• Examples: BitTorrent, ESM
•Reciprocity
• Direct reciprocity (repetition)
• Indirect reciprocity (reputation)
02/05/06
Direct Reciprocity
Repetition encourages cooperation
e.g., Prisoner's Dilemma game:
• one-shot game: mutual defection is dominant strategy infinitely
• repeated game: mutual cooperation is dominant
Simple tit-for-tat (TFT) strategy works very well in iterated prisoners' dilemma (IPD) tournamentsClustering (e.g., clubs) and server selection (e.g., CoopNet) may facilitate direct reciprocity
Bob Alice
02/05/06
BitTorrent: Dilema del prisionero
02/05/06
Indirect Reciprocity
•Peers earn reputation via cooperation
•Reputable peers receive preferential treatment
•Implementation overhead for maintaining reputation information
•Various proposals:
• Image scoring
• Free Haven
• Eigentrust
• Differentiated admission
• CONFIDANT
Bob Alice
Carol
02/05/06
Mechanism design
The idea in mechanism design (MD) is to define the strategic situation, or rules of the game, so that the system as a whole exhibits good behavior in equilibrium when self-interested nodes pursue self-interested strategies.
Mechanism design can be thought of as inverse game theory – where game theory reasons about how agents will play a game, MD reasons about how to design games that produce desired outcomes.
02/05/06
Mechanism Design
Design of protocols such that in equilibrium,
the outcome can be shown to exhibit certain properties.
Mapping from strategies (actions) of agents to payoffs.
Mapping from strategies (actions) of agents to payoffs.
Mapping from strategies (actions) of agents to payoffs.
02/05/06
Price of Anarchy (Selfishness and how to cope with it)
How much does the society suffer by the lack of coordination between players?
The optimal social utility function happens when we have a single authority who dictates every agent what to do. In contrast, when agents choose their own action, we should study their behavior and compare the obtained social utility with the optimal one.
02/05/06
Economy
Economics is the study of how societies use scarce resources to produce valuable commodities and distribute them among different people.
Samuelson, Nordhaus - 1998 – Economics, p. 4
02/05/06
Beyond Homo Economicus (rationality revisited)
•AltruismInformation gift economies
e.g. linux, creative commons, wikipedia, ...Warm-glow"Digital Robin Hoods"
•Strong reciprocity
Reciprocate (reward cooperators and/or punish defectors) even if action reduces own utility
Ultimatum, Dictator, and Public Goods games: 50-60% of subjects exhibit reciprocal behavior, 20% exhibit selfish behavior
Considerations of fairness and social norms•Even selfish individuals may not be perfectly selfish
•bounded rationality or near rationality vs. hyperrationality•imperfect knowledge; imperfect execution (e.g., trembling hand)
Red
es P
2P
Resource allocation: the aggregate power of all computers on the Internet is huge. In a “dream world" this aggregate power will be optimally allocated online among all connected processors. One could imagine CPU-intensive jobs automatically migrating to CPU-servers, caching automatically done by computers with freedisk space, etc. Access to data, communication lines, and even physical attachments (such as printers) could all be allocated across the Internet. This is clearly a dicult optimization problem even within tightly linked systems, and is addressed, in various forms and with varying degrees of success, by all distributed operating systems.
The same type of allocation over the Internet requires handling an additional problem: the resources belong to different parties who may not allow others to freely use them. The algorithms and protocols may, thus, need to provide some motivation for these owners to “play along".
Assignment problem
02/05/06
Conclusiones
Redes + social es un tema de investigación vivo y que engloba muchas disciplinas
Esperamos nuevas que en los próximos años aparezcan nuevas killer applications que cambien nuestras vidas (Skype, …)
Tecnologías que descentralizan pueden ayudar a construir comunidades sociales
02/05/06
Referencias
P2P Working Group http://www.peer-to-peerwg.org
Grid Forum P2P https://forge.gridforum.org/projects/p2p
FreeNet http://freenetproject.org
SETI@Home http://setiathome.ssl.berkeley.edu/
02/05/06
Referencias
"BitTorrent Economics Paper" , Bram Cohen "BitTorrent protocol specification" , Bram Cohen "BitTorrent Resource Availability Analysis" , Brian Greinke
and James Hsia. (Rice) "Dissecting BitTorrent: Five Months in a Torrent's
Lifetime" , M. Izal, G. Urvoy-Keller, E.W. Biersack, P.A. Felber, A. Al Hamra, and L. Garc es-Erice. (Institut Eurecom, France)
“Pollution in P2P file Sharing Systems” http://cis.poly.edu/~ross/papers/pollution.pdf
Rationality and Self-Interest in Peer to Peer Networks by “Jeffrey Shneidman and David C. Parkes”
An Excess-Based Economic Model for Resource “Allocation in Peer-to-Peer Networks” by Christian Grothoff
02/05/06
Referencias
“In Search of Homo Swappus : Evolution of Cooperation in Peer-to-Peer Systems” by John Chuang
“The Past and Future of Multiagent Systems” by José M. Vidal
“Structure in Articial Societies” by Josep Maria Pujol Guifi.net: http://guifi.net/ca/book/print/371 “Reputation and Location Privacy in Cooperative Networks”
by Jonathan Bredin
02/05/06
Referencias
"Multiagent Systems“ by G.Weiss "Multi-Agent Systems“ by J. Ferber "Foundations of Distributed AI“ by G. M. P. O'Hare and N.
R. Jennings "Readings in Agents“ by M. Singh and M. Huhns. “An Introduction to Multiagent Systems” by Michael
Wooldridge