Design and Implementation of a P2P Cloud Ozalp Babaoglu, Moreno Marzolla, Michele Tamburini {babaoglu, marzolla}@cs.unibo.it, miketambu@gmail.com
Our Goal Assemble a Cloud out of individual devices E.g. PC, but also low-power devices such as settop boxes Business model to harness the computational power of otherwise idle devices Individual devices leave and join, but the Cloud keeps a coherent structure No central controller ACM SAC, Riva del Garda (Italy), march 26-30 2012 2
Our vision O. Babaoglu, M. Jelasity, A-M Kermarrec, A. Montresor, M. van Steen, Managing clouds: a case for a fresh look at large unreliable dynamic networks ACM SIGOPS Operating s Review, 2006 ACM SAC, Riva del Garda (Italy), march 26-30 2012 3
P2P Cloud Goals Implement fully decentralized monitoring and management capabilities Allocate x% of available nodes for a given task Allocate at least n node for a given task How many nodes are currently busy? How many CPU hours have been consumed by user X? ACM SAC, Riva del Garda (Italy), march 26-30 2012 4
P2P Cloud Architecture User Cloud Node User Interface P2PCS Daemon Node-to-Node Interface ACM SAC, Riva del Garda (Italy), march 26-30 2012 5
P2P Cloud Architecture Authentication / Authorization layer Instance Management Dispatcher Slicing T-Man Aggregation Bootstrapping Peer Sampling = partially implemented modules ACM SAC, Riva del Garda (Italy), march 26-30 2012 6
P2P Cloud Architecture Authentication / Authorization layer Instance Management Dispatcher Slicing T-Man Aggregation Bootstrapping Peer Sampling Gather an initial set of nodes to start the message exchange = partially implemented modules ACM SAC, Riva del Garda (Italy), march 26-30 2012 7
P2P Cloud Architecture Authentication / Authorization layer Instance Management Dispatcher Slicing T-Man Aggregation Bootstrapping Peer Sampling = partially implemented modules Provide each node with a list of peers to exchange messages with ACM SAC, Riva del Garda (Italy), march 26-30 2012 8
P2P Cloud Architecture Authentication / Authorization layer Instance Management Dispatcher Slicing T-Man Aggregation Bootstrapping Rank the nodes according to one attribute (e.g., top 5% of fastest nodes) Peer Sampling = partially implemented modules ACM SAC, Riva del Garda (Italy), march 26-30 2012 9
P2P Cloud Architecture Authentication / Authorization layer Instance Management Dispatcher Slicing T-Man Aggregation Bootstrapping Peer Sampling Compute global measures (e.g., network size) using local message exchange = partially implemented modules ACM SAC, Riva del Garda (Italy), march 26-30 2012 10
P2P Cloud Architecture Authentication / Authorization layer Instance Management Dispatcher Slicing T-Man Aggregation Bootstrapping Peer Sampling Build an overlay network with a given topology (e.g., tree, ring, mesh...) = partially implemented modules ACM SAC, Riva del Garda (Italy), march 26-30 2012 11
P2PCS run-nodes subcloud_id number Creates a subcloud with number nodes; subcloud_id is set as the name of the newly created subcloud terminate-nodes subcloud_id nodename1 nodenamen Removes the named nodes from the subcloud with given id add-new_nodes subcloud_id number Adds number nodes to the subcloud identified by subcloud_id. The new nodes are chosen without any particular criteria describe-instances nodename Prints a human-readable description of the given node monitor-instances Return the global size of the Cloud using the aggregation service unmonitor-instances Stops printing the global size of the Cloud ACM SAC, Riva del Garda (Italy), march 26-30 2012 12
P2PCS: Building sub-clouds 1 2 3 1 2 3 1 2 3 slice 1 slice 1 4 5 6 4 5 6 4 5 6 slice 2 7 8 9 7 8 9 7 8 9 (a) (b) (c) ACM SAC, Riva del Garda (Italy), march 26-30 2012 13
P2PCS: Building sub-clouds Nodes have unique numerical IDs (e.g., hash value of their IP addresses) Each node collects IDs of neighbors (and of itself) IDs are sorted and wrapped as a ring The distance to each neighbor is defined as the minimum number of hops along the ring The node connects to the two nearest neighbors 12 43 7 23 8 9 87 7 8 9 12 23 43 87 8 7 9 12 87 43 23 O. Babaoglu, M. Jelasity, A. Montresor, T-MAN: Gossip-based fast overlay topology construction, Computer Networks, 53(2009), 2321 2339 ACM SAC, Riva del Garda (Italy), march 26-30 2012 14
P2PCS: Building sub-clouds T-Man allows rings (sub-clouds) to be automatically repaired when one or more participating nodes fail 1 2 1 2 6 3 6 3 5 4 5 4 ACM SAC, Riva del Garda (Italy), march 26-30 2012 15
Estimating the Cloud size We compute the mean of numerical values held at each node Each node holds zero by default; the node on which the monitor-instances command originated holds one After a few rounds we pick the value stored at any node and invert it. This is the estimated Cloud size (If there are N nodes, the mean converges to 1/N) X X X (X+Y)/2 ACM SAC, Riva del Garda (Italy), march 26-30 2012 16 X Y Y Y Y (X+Y)/2 Márk Jelasity, Alberto Montresor, Ozalp Babaoglu, Gossip-based aggregation in large dynamic networks, ACM Transactions on Computer s (TOCS), 2005
Conclusions P2PCS uses simple epidemic protocols as basic building blocks Intrinsecally scalable and robust Ongoing activity Transforming the prototype into a usable application Deployment and testing on some large infrastructure Prototype available at: http://cloudsystem.googlecode.com/ ACM SAC, Riva del Garda (Italy), march 26-30 2012 17
Thank you for your attention Questions? ACM SAC, Riva del Garda (Italy), march 26-30 2012 18