490 likes | 561 Views
Coping with Selfishness in D istributed Systems. Mechanism Design in Multi-Core and Peer-to-Peer Systems. TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A. Selfishness in Computer Science.
E N D
Coping with Selfishness in Distributed Systems • Mechanism Design in Multi-Core and • Peer-to-Peer Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAA
Selfishness in Computer Science „The Internet is unique among all computer systems in that it is built, operated, and used by a multitude of diverse economic interests, in varying relationships of collaboration and competition with each other.“ C. Papadimitriou, STOC 2001 Game theory attempts to mathematically capture behavior in strategic situations (games), in which an individual's success in making choices depends on the choices of others.
Game Theory & Mechanism Design • Game Theory explains/predicts behavior • Mechanism Design Selfishness-aware optimization
Mechanism Design with Payments + = cost = 2 net gain = 2
Complexity Optimal exact implementation NP-hard , , 1 2 , , , ,
Worst-Case Leverage • «maximum worst-case net gain»
Uniform Leverage • «maximum average net gain»
Transactional Memory explicit locks • transactions Which transaction shall I abort?? Timestamp, Polite, Karma, Polka, Randomized, ...
Transactional Memory is a Game • Players = programmers • Strategy space = placing of transactions • Their goal: fast execution • Social goal: maximize system throughput „My thread is the fastest!“
Good Programming incRingCounters(Node start){ var cur = start; transaction{ repeat{ cur.doSomething(); cur = cur.next; } until(cur==start) }} incRingCountersGP(Node start){ var cur = start; repeat{ transaction{cur.doSomething();} cur = cur.next; until(cur==start) }} R1 R1 R2 R2 R3 R3 Rs Rs t t long transactions vs short transactions
Good Programming Incentives • A CM is GPI compatible iff it • punishes unnecessary locking • and rewards partitioning.
Quasi Priority Accumulating CM Thm: Timestamp is not GPI compatible. R1 R2 R3 Rs t R1 R2 R3 Rs t
Randomized CM • Not priority based • „Choose random winner“ • Proof Intuition • Unnecessary Locks: stupid because only risk conflict (no priority gain) • Partitioning: Lemma: Randomized CM is GPI compatible. Ti Ti Ti1 Ti2 Ti1 Ti2
Randomized CM • Not priority based • „Choose random winner“ • Proof Intuition • Unnecessary Locks: stupid because only risk conflict (no priority gain) • Partitioning: Lemma: Randomized CM is GPI compatible. Ti Ti Ti1 Ti2 Ti2
Polka Karma throughput selfish (updates/s) throughput selfish (updates/s) throughput collaborators (updates/s) throughput collaborators (updates/s) Randomized Timestamp throughput selfish (updates/s) throughput selfish (updates/s) throughput collaborators (updates/s) throughput collaborators (updates/s)
Peer-to-Peer File Sharing • History
Evaluation • Results
Cyclic Trading Protocol CYCT4T outTable inTable Out-neighbors on cycles from : SELECT id FROM outTable INNER JOIN inTable ON outTable.id = inTable.source WHERE via = r; Update: SELECT DISTINCT source, dist FROM inTable WHERE distance < k − 1 AND via q;
Established Equilibrium utility ? n T4T
BitThief: Smooth Transition utility ? n
BitThief: Smooth Transition utility ? n
Steganographic Handshake in BitThief • BitThief is a BitTorrent client that • Free rides with BitTorrent clients [1], and • Trades tit-for-tat (T4T) with other BitThiefs [2] • Block request sequence • Hybrid approach using PEX • Order of peer addresses • Forged peer address [1] Locher et al.,Free Riding in Bittorrent is Cheap, HotNets 2006 [2] Locher et al., Rescuing Tit-for-Tat with Source Coding, P2P 2007
Steganographic Channels • P2P File sharing • Block request sequence • Block subset selection • Timing • Bandwidth • Ports
Encoding Bits Into a Permutation • Encode a message M in a permutation • Represent M as a factorial number • because • M is encoded into as the Lehmer Code of is 2210. • Lehmer Code • Counts the # swaps to get to • (1,2,3,4) ..2 swaps.. • (3,1,2,4) ..2 swaps.. • (3,4,1,2) ..1 swap.. • (3,4,2,1) ..0 swaps.. • (3,4,2,1)
Hidden Broadcast • Send a secret message to all conspirers n c n-c
Steganographic Broadcast • Send a message to all conspirers • Bittorrent-like p2p file sharing system k
Efficient Broadcast • If each conspirer randomly connects to peers, then the subnetwork induced by the 𝑐 conspirers is connected w.h.p. Lemma
Efficient Broadcast • Space complexity • Communication complexity w.h.p. • If each conspirer randomly connects to peers, then the subnetwork induced by the 𝑐 conspirers is connected w.h.p. Lemma • Get peer addresses • Acquire blocks • Reveal types of connected peers • Broadcast message in conspirer subnetwork Algorithm
Proof of Theorem 10.1 • If each conspirer randomly connects to peers, then the subnetwork induced by the conspirers is connected w.h.p. • Proof: • For each conspirer , it holds that . • (Chernoff) • If each edge of a graph G with c nodes is present with probability then G is connected with probability (Corollary from [Hofstad 2007]) • In such a graph G, all nodes have less than neighbors w.h.p. • Each conspirer implicitly chooses random neighbors in the conspirer subgraph.
Stronger Authority Models • Individual Monitoring • Authority monitors individual communication links, no correlation • where m is the # of blocks • Complete Monitoring • Authority monitors complete network • Stochastic Monitoring • Trade-off: Hidden communication vs. False positives
Broadcast under Stochastic Monitoring • Regular peers choose their request order permutation according to a distribution C • Authority classifies a peer as a conspirer if it uses a request order permutation with • Trade-off in the choice of threshold • Amount of hidden communication vs. False positives
Broadcast under Stochastic Monitoring • Regular peers choose their request order permutation according to a distribution C • Authority classifies a peer as a conspirer if it uses a request order permutation with • is a deterministic PRG
Conclusion t t
Thank You!Questions & Comments? TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAA