Alex Rivera | Logout

What is your development checklist for Java low-latency application?

Asked 2010-04-04T13:51:41.703
38

I would like to create comprehensive checklist for Java low latency application. Can you add your checklist here?

Here is my list
1. Make your objects immutable
2. Try to reduce synchronized method
3. Locking order should be well documented, and handled carefully
4. Use profiler
5. Use Amdhal's law, and find the sequential execution path
6. Use Java 5 concurrency utilities, and locks
7. Avoid Thread priorities as they are platform dependent
8. JVM warmup can be used
9. Prefer unfair locking strategy
10. Avoid context-switching (many threads lead to counter productive)
11. Avoid boxing, un-boxing
12. Give attention to compiler warnings
13. Number of threads should be equal or lesser than the number of core

Low-latency application is tuned for every milli-seconds.

Edit
Report

2 Answers

3

Measure, measure and measure. Use as close to real data with as close to production hardware to run benchmarks regularly. Low latency applications are often better considered as appliances, so you need to consider the whole box deployed not just the particular method/class/package/application/JVM etc. If you do not build realistic benchmarks on production like settings you will have surprises in production.

answered 2013-01-06T13:36:35.473
0

Another important idea is to get it working first, then measure the performance, then isolate any bottlenecks, then optimize them, then measure again to verify improvement.

As Knuth said, "premature optimization is the root of all evil".

answered 2010-04-21T21:20:01.920

Your Answer