Home » Author Archives: Peter Lawrey (page 6)

Author Archives: Peter Lawrey

C++ like Java for low latency

Overview Previously I wrote an article on C like Java.  This is term I had come across before. However, on reflection I thought C++ like Java is a better term as you still use OOP practices, (which not C-like) but you put more work into managing and recycling memory yourself. The term I favour now is “low level” Java programming. ...

Read More »

OpenHFT Java Lang project

OpenHFT/Java Lang started as an Apache 2.0 library to provide the low level functionality used by Java Chronicle without the need to persist to a file. This allows serializable and deserialization of data and random access to memory in native space (off heap)  It supports writing and reading enumerable types with object pooling. e.g. writing and reading String without creating ...

Read More »

Micro jitter, busy waiting and binding CPUs

Performance profiling a new machine When I work on a new machine, I like to get an understanding of it’s limitations.  In this post I am looking at the jitter on the machine and the impact of busy waiting for a new PC I built this weekend. The specs for the machine are interesting but not the purpose of the ...

Read More »

Why a synchronized StringBuffer was never a good idea

Introduction StringBuffer is a synchronized class for mutable strings.  The main problem with making it synchronized is that It was usually used as a local variable so making it synchronized just made it slower. It was never a good idea to use it in a multi-threaded way.  This problem is that developers assumed that methods which used StringBuffer were themselves ...

Read More »

Lies, statistics and vendors

Overview Reading performance results supplied by vendors is a skill in itself.   It can be difficult to compare numbers from different vendors on a fair basis, and even more difficult to estimate how a product will behave in your system. Lies and statistics One of the few quotes from University I remember goes roughly like this:   Peak Performance – A ...

Read More »

Chronicle and the Micro-Cloud

Overview A common question I face is; how do you scale a Chronicle based system if it is single writer, multiple readers. While there are solutions to this problem, it is far more likely it won’t be a problem at all. The Micro-Cloud This is the term I have been using to describe a single thread to do the work ...

Read More »

Java is dead (again)

Here is a couple of responses to this annual question I thought worth sharing: The Day Java lost the Battle There is a common myth amongst technologists that better technology will always be the most successful or that you must keep improving or die. A counter example I use is the QWERTY keyboard. No one who uses it, does so ...

Read More »

A down side of durable messaging

Overview Durable messaging can be very fast, as fast as non-durable messaging up to a point. Limitations of durable messaging Durable messaging is dependant on the size of your main memory and the speed of your hard drive.  If you have a HDD, this can be as low as 20 MB/s and as high as 60 MB/s.  A RAID set ...

Read More »

High Performance Durable Messaging


Overview While there are a good number of high performance messaging systems available for Java, most avoid quoting benchmarks which include durable messaging and serialization/deserialization of messages. This is done for a number of reasons; 1) you don’t always need or want durable messages 2) you want the option of using your own serialization. One important reason they are avoided ...

Read More »

Java Memory Model and optimisation

Overview Many developers of multi-threaded code are familiar with the idea that different threads can have a different view of a value they are holding, this not the only reason a thread might not see a change if it is not made thread safe. The JIT itself can play a part. Why do different threads see different values? When you ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns