views:

260

answers:

4

I have done good amount of Java programming, but yet to master Threading & Concurrency. I would like to become an expert programmer in threading & concurrency. I have also took a short at Tomcat code, I was able to understand, but looking even more complex project.

Could you suggest any open source project which heavily uses java threading & concurrency utilities?

Note : I have also reading java.util.concurrent package source code, but eager to learn from Application perspective, than creating my own threading utilities.

A: 

Maybe Quartz ? It's a scheduling framework.

http://www.quartz-scheduler.org/

"Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs"

Pierre Henry
A: 

Have a look at MINA or Netty. These are IO-Frameworks which can handle thousands of connections with ease. The structures are very similar between those two.

There are some projects that use these Frameworks, like JBoss Application Server, Vysper (Jabber Server), or the Apache FTPserver

Hardcoded
Those are both heavy NIO users, which means the probably don't do an awful lot of of concurrency (that's kind of the point of NIO), however I haven't looked at the source code well enough to be sure.
Dean Povey
With NIO it isn't necessary to have one thread per Socket to read from, but there is still plenty of concurrency. Otherwise it wouldn't scale with hundreds or thousands of connections
Hardcoded
+1  A: 

I suggest Grizzly:

Writing scalable server applications in the Java™ programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO and Web framework has been designed to help developers to take advantage of the Java™ NIO API. Grizzly goals is to help developers to build scalable and robust servers using NIO and we are also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet

Ok, the above talks a lot about NIO but, still, Grizzly is a good example for threading & concurrency.

Pascal Thivent
A: 

If you want to be ahead of the crowd, take a look at Software Transactional Memory (STM), and then dissect the Java implementations. I'm sure there must be one or two gems hiding in there, concurrency wise. Maybe that's another predication for the future: concurrency will be encapsulated by frameworks.

ShiDoiSi