Distributed Hash Tables, Part I
Listing 6. portscan.py
def __main__():
id=int(random.uniform(0,2**k))
node=Node(id)
join(node, initialContact)
line=raw_input('Enter an IP to scan: ').trim()
key=long(sha.new(line).hexdigest(),16)
value=lookup(node, key)
if value==None:
f=os.popen('nmap '+args[1])
lines=f.readlines()
value=string.join(lines, '\n')
store(node, key, value)
In this installment of our two-part series, we discussed the theory behind building DHTs. Next time, we'll talk about practical issues in using DHTs in real-world applications.
Resources
Achord: thalassocracy.org/achord/achord-iptps.html
Chord: www.pdos.lcs.mit.edu/chord
Curious Yellow: blanu.net/curious_yellow.html
How Can You Defend against a Superworm? linuxjournal.com/article/6069
Kademlia: kademlia.scs.cs.nyu.edu
Brandon Wiley is a peer-to-peer hacker and current president of the Foundation for Decentralization Research, a nonprofit corporation empowering people through technology. He can be contacted at blanu@decentralize.org.
- « first
- ‹ previous
- 1
- 2
- 3
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- New Products
- The Pari Package On Linux
- Home, My Backup Data Center
- Developer Poll
- This is the easiest tutorial
3 hours 32 min ago - Ahh, the Koolaid.
9 hours 10 min ago - git-annex assistant
15 hours 10 min ago - direct cable connection
15 hours 33 min ago - Agreed on AirDroid. With my
15 hours 43 min ago - I just learned this
15 hours 47 min ago - enterprise
16 hours 17 min ago - not living upto the mobile revolution
19 hours 8 min ago - Deceptive Advertising and
19 hours 44 min ago - Let\'s declare that you have
19 hours 45 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




Comments
Wrong Algorithm
the last else in distance should return (2**k)-(b-a), otherwise id would exceed the longest possible distance, i.e. the ring size.
Btw, nice article ;)
Re: Wrong Algorithm
After the last else in the distance function, b < a, so (b-a) is negative. The sum of (2**k) and (b-a) will still be less than (2**k).
Wrong Algorithm
The findNode should return
current.next