Kill idle clients that do Keep-Alive almost forever.
How to do it
Block all web worker threads while doing the massacre. At the same time the
web workers must not block each other under all circumstances. Check
Do not use gettimeofday() to measure the last activity since this is fairly
difficult to do right in a highly loaded event based system. Instead, use
counters and do the math with the event wakeup timer. Check
I implemented a new feature called realms. What is this all about?
Torrentkino is a distributed hash table. The hostname gets translated into a hash and
that hash can be looked up within the DHT. But I expect that many people are
giving their computers the same names like Prometeus, Legolas or maybe
even Eyjafjallajökull.
Everybody is equal. Nobody owns a hostname. Conflicts may be the result. As a
counteraction you may setup an encryption key to isolate your computers from the
others completely. But more nodes help to stabilize the DHT and the data within
it…
So, here it goes. You only want to find your personal home server from your
notebook? You do not care about the others? Setup a realm like this:
torrentkino6 -x bootstrapserver.example.org -r"some strange long string"
The realm affects the way how the hashes are computed. That makes your lookup
process incompatible to the others. The computed hostname hash keys become
slightly different and also get stored somewhere else within the DHT. You will
not have any hostname conflicts as long as you do not share the same realm.
The benefits of realms are, that you can choose your hostnames freely and use
a bigger swarm for stability reasons at the same time. Great.