Sunday, January 10, 2010

FOSDEM 2010

So Ruben has been working on getting a bunch of talks organised for the Mono room in FOSDEM and I've been lucky enough to get a slot. I have a 30 minute slot, so I figured that would be long enough to talk about 2 things properly and then take questions.

I've decided that I want to talk about two things.

  1. The piece picker algorithm
  2. How i handle threading
The piece picking code handles which segment of the file will be downloaded next. It has gone through several iterations, each time adding new features. Eventaully the whole class became so hard to maintain and test that I just had to rewrite things from the ground up using a new approach. This might give some people ideas on how to tackle problems in their own projects but even if it doesn't, it should still be interesting ;)

MonoTorrent handles a lot of concurrent connections. Using one thread per connection just wouldn't scale yet using plain asynchronous sockets and locking has huge potential for deadlocks and race conditions. Getting this right took well over a year - probably due to my lack of experience at this - but right now I think I've hit the winning threading solution. This part of the talk should be useful to anyone who's worked on an app which does a lot of socket operations. Maybe I'll wake up in a few months time and see a dozen apps using that technique.

Anyway, feel free to drop in for my talk (and all the others!). If you have any questions about any other aspects of MonoTorrent, or programming in general, feel free to find me and ask.

12 comments:

Tommy Carlier said...

I liked your talk at FOSDEM. It was very interesting. I liked your "1 thread"-approach. I think you might be able to remove the lock on the queue by using the (lock-free) ConcurrentQueue from the ParallelFx project.

wcoenen said...

I enjoyed your short talk. The "lessons learned" on threading resonated with me because I had just run into a deadlock issue in my own code a few days before.

オテモヤン said...

オナニー
逆援助
SEX
フェラチオ
ソープ
逆援助
出張ホスト
手コキ
おっぱい
フェラチオ
中出し
セックス
デリヘル
包茎
逆援
性欲

Anonymous said...

酒店兼職 酒店打工 打工兼差 台北酒店 酒店兼差 酒店經紀 禮服酒店 酒店工作 酒店上班 兼差 酒店應徵 酒店 打工兼職 打工

cc22 said...

情趣用品,情趣,
角色扮演,吊帶襪,丁字褲,飛機杯,
按摩棒,跳蛋,G點,
自慰套,
情趣內衣,
情趣,情趣用品,
SM,G點,按摩棒,
飛機杯,充氣娃娃,
自慰套,情趣用具,

cc22 said...

角色扮演,
睡衣,
SM,
潤滑液,
情趣玩具,
愛愛,

情人趣味用品,
情人趣味千奈,
情人趣味愛戀,
情趣味用品,
情趣用具,

跳蛋,
G點,
按摩棒,
跳蛋,
飛機杯,
充氣娃娃,
自慰套,
情趣娃娃,
自慰器,
情趣用品,情趣,

Volker from Germany said...

Hallo,
Ich haben eben Eure Internetseite besucht und nutzen sogleich die Gelegenheit,euch auch einen Gruß aus Deutschland in Eurem Gästebuch zu hinterlassen. P.S. Kommt uns doch auch mal besuchen
http://www.MeerblickSylt.de
http://www.OstseeblickHolm.de

Send Flowers to Canada said...

Hey great stuff, thank you for sharing this useful information and i will let know my friends as well.

Cris said...

This information is very interesting, I really enjoyed, I would like get more information about this, because is very beautiful, thanks for sharing! costa rica investment opportunities

niz said...

Hello .. firstly I would like to send greetings to all readers. After this, I recognize the content so interesting about this article. For me personally I liked all the information. I would like to know of cases like this more often. In my personal experience I might mention a book called Generic Viagra in this book that I mentioned have very interesting topics, and also you have much to do with the main theme of this article.

site said...

In my opinion everyone must look at it.

aliya seen said...

You can now download free apps and can learn free online learning with perfect planning. this is become so easy and reliable.

Hit Counter