News for hackers. Stuff that matters.

DrHeisenberg

My Weekend Project: A push based Android Bitcoin index notifier using .NET

Bitcoins (BTC) is a hot topic at the moment, and with recent press coverage, the BTC index has soared on Bitcoin exchanges. If your're not familiar with BTC, it's a digital, cryptographic currency which avoids central authorities and issuers (http://en.wikipedia.org/wiki/Bitcoin).Bitcoins are currently being traded at Bitcoin exchanges, like MtGox and others. Because the phenomenon is...

( Read More... | no comments | 4 points | on HN )
Re:JavaEventing - An easy to use eventing library for Java on Thursday February 10, 2011 @10:43AM (#2202241)
The updated version (from 1.3.0) of the library uses a thread-pool, and yields between 50.000-100.000 events/second. While I apprechiate your focus on performance, for most actual use this would be academic. In most cases, even 10.000 events per second would be sufficient.
Re:JavaEventing - An easy to use eventing library for Java on Friday February 04, 2011 @04:26AM (#2178904)
Thank you for your views on the project. Creating new threads may not be as expensive as you seem to think, -on a standard desktop computer you get between 5000-1000 executed events per second, which is probably sufficient for most situations. This use of multi-threading is used to achieve full asynchronisity. The opposite, as you are implying, is to execute the events sequentially, within the same thread. I apprechiate that you would sometimes prefer the latter, but this can in fact be very easily achieved by using a fixed size thread pool, and adjusting its size to your preferences. Setting the size to one, would ensure sequencial execution of all events. Maybe I should include a threadpool in the next version, allowing its size to be specified.
Re:JavaEventing - An easy to use eventing library for Java on Friday February 04, 2011 @04:10AM (#2178876)
First of all, thank you for your thoughts on my project. As Pohl points out, the anonymous handler-implementations are chosen by design, and are in my opinion very well suited for these types of situations. But I'm thinking maybe you're not bothered by the anonymous implementations, but by the fact that classes like the Event-interface and the GenericEventHandler classes are made as public inner classes within the EventManager class? My thought was that, as they are so tightly coupled to the use of the EventManager class, they might as well be defined inside the EventManager as inner classes. However, if you have any reasons for why they should be defined elsewhere, I'd apprechiate your opinions.

As to your concerns regarding the static use of the EventManger, I can apprechiate your point of view. I'll put it on my todo-list for the next version.