Oscar Johansson

Ranch Hand
+ Follow
since Mar 01, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Oscar Johansson

Congrats! All one needs is the desire to succeed. There are plenty of opportunities.
12 years ago
Concurrent Modification with CopyOnWriteArrayList - That's a blog post I wrote today to explain the scenarios in which using a CopyOnWriteArrayList is appropriate.

Corrections and comments welcome.

PS: I am not making any money off traffic to my blog. There are no ads there.
Canon SD1400 IS (or the older and cheaper but almost the same Canon SD 780 IS).

The 1280x720 video is very good! And the ability to play it directly to your monitor via HDMI is cool!
13 years ago
There are many oil companies and bankers in Nigeria who seem to need my help moving millions of dollars around.
13 years ago
Terracotta - http://www.terracotta.org/

That's a very cool product which does exactly what you are asking about.
FindBugs will help a bit: http://findbugs.sourceforge.net

Buying a copy of of 'Java Concurrency in Practice' for all developers on your team will help too (in the long run) as far as you can convince them to read most of the stuff in it.
10 seconds to do something sounds like quite a lot-

Try to check if all cores of all CPUs on your machine are tied at 100% throughout the processing.

Reduce the number of messages being processed simultaneously until you still have 100% for all CPUs. (This will ensure that CPU is not getting busy doing task scheduling rather than processing)

Check if IO is excessive - Use something like iostat / vmstat.

Check your log files and logging levels - Too much logging would cause IO burden.
Cost per developer per month - $3500
Cost of 4 developers spending 2 weeks to improve performance in various ways like app server tuning, db tuning, architecture etc. - $7000
Cost of 16GB Server memory - $600
Cost of a 12 core AMD Opteron CPU - $1000
Good quality SSD for your hot persistent data - $600

Moral of the story - Better hardware can be a much cheaper option.

Also, faster hardware also means a lot of developer time saved in the long run.
My suggestions -
  • Get the latest edition of this book - Head First Java
  • If you work on a Java/J2EE based project, ask one of the developers to show you how to setup a development environment on your system so that you can update to the latest code and build and run stuff on your own system.
  • Start trying to get involved in discussions of 'how to do stuff' with the developers besides the 'what to do' discussions that you are probably already involved in.
  • Try making small changes yourself.
  • 13 years ago
    I too would highly recommend reading 'Java Concurrency in Practice'.
    Putting a key/value into a ConcurrentHashMap does constitute safe publication for a different thread reading the map, doesn't it?

    Meaning, if I change the members of an object and then put it as a value in key, value pair and then lookup the key in a different thread, I will see the updated members.

    I also believe that if I do a put into the ConcurrentHashMap and then change the members of the value that was just put, there is no guarantee that a thread that does a get on the key will see the updates to the members of the value.

    Wrong on any count?
    I think I've seen this happen due to issues with JVM version being used.

    Did you compile something with JDK 5 and then try to run it in JVM 1.4? Or maybe some similar 1.4 vs 5 confusion?
    14 years ago
    Graphics card - Get one of the Radeon 5xxx series models instead. It was released last week or so.
    14 years ago