Home » Author Archives: Peter Lawrey (page 4)

Author Archives: Peter Lawrey

Unique hashCodes is not enough to avoid collisions

java-logo

There is a common misconception that if you have unique hashCode() you won’t have collisions.  While unique, or almost unique, hashCodes are good, this is not the end of the story. The problem is that the size of a HashMap is not unlimited (or at least 2^32 in size)  This means the hashCode() number has to be reduced to a ...

Read More »

C++ like Java for low latency

java-logo

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

java-logo

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

java-logo

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

java-logo

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

software-development-2-logo

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

java-logo

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)

software-development-2-logo

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

software-development-2-logo

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

java-interview-questions-answers

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 »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.