Monthly Archive for July, 2011

wait() and notify()

Thread Synchronization

Excerpt from old “Exploring Java” book.
It clearly states, what wait(), notify(), notifyAll() are used for and what they do.

With the synchronized keyword, we can serialize the execution of complete methods and blocks of code. The wait() and notify() methods of the Object class extend this capability. Every object in Java is a subclass of Object, so every object inherits these methods. By using wait() and notify(), a thread can give up its hold on a lock at an arbitrary point, and then wait for another thread to give it back before continuing. All of the coordinated activity still happens inside of synchronized blocks, and still only one thread is executing at a given time.
Continue reading ‘wait() and notify()’

Rutorrent + rTorrent on Debian Server

ruTorrent logoOnce, I’ve installed it myself.
Yes, in the way, everyone did this: checkout, compile with xml-rpc support, install web-server, bind everything together and enable some security.
It worked great, but after some updates, it broke up. Don’t know what happened exactly, I was a bit busy at that time.

Several weeks ago, I desperately needed torrent client, but in that environment, no applications could be installed. It was a great disappointment to find out, that me own rTorrent is down on the server. So I tried to perform mentioned actions again, but with no luck.

Right at that moment, I found out about an AWESOME!!! script, which does everything you need! It just installs

  • rTorrent
  • ruTorrent
  • your favourite web-server
  • FTP
  • Webmin

It binds everything together, and it just works!

Here’s the MAGIC link to the documentation:
http://forums.rutorrent.org/index.php?topic=608.msg4427
Everything is pretty strait-forward and troubleless.

Hint: run the downloaded script inside screen session. Script, itself, runs several minutes. It configures and compiles everything. So, please, be patient. If you have poor ssh access, it would be much better to reattach to the running screen process, after connection failure or something.

The only thing, I had to modify afterwards, was a web-server’s port, ’cause my ISP blocks port #80.
As I’ve chosen lighttpd, as my webser, I had to modify lighttpd config file
nano /usr/share/lighttpd/lighttpd.conf
and set
server.port = 1234




Hosted by EOMY.NET