background preloader

Performance

Facebook Twitter

Database

Tips. Optimization. Tuning. Monitoring. Grinder. Make your Java Programs Rock Solid. This book, is definitely among one of the best books, I've read this year.

Make your Java Programs Rock Solid

It lays out some critical aspects to creating and rolling out stable software systems. Each of the case studies discussed is based on real events. While reading the book you will feel, how nice it would be if there is a library you could use to gain the advantages discussed to make your programs/software/systems rock solid. The JRugged is such a library written to be used in Java. To summarize, what it offers , here it is (directly from the project home page) :- The jrugged library provides straightforward add-ons to existing code to make it more robust and easier to manage. Although there are several lower-level building block classes here available for custom solutions, most clients will find they can use just the following classes: Monitorable, Status, and RolledUpStatus are related classes that provide a simple RED/YELLOW/GREEN encoding for service health, possibly useful for constructing operational dashboards.

Java tip: How to read files quickly. Technologies: Java 5+ Java has several classes for reading files, with and without buffering, random access, thread safety, and memory mapping. Some of these are much faster than the others. This article benchmarks 13 ways to read bytes from a file and shows which ways are the fastest. A quick review of file reading classes Let's quickly run through several ways to open and read a file of bytes in Java. FileInputStream with byte reads FileInputStream f = new FileInputStream( name ); int b; long checkSum = 0L; while ( (b=f.read()) ! FileInputStream opens a file by name or File object. FileInputStream uses synchronization to make it thread-safe. FileInputStream with byte array reads FileInputStream f = new FileInputStream( name ); byte[] barray = new byte[SIZE]; long checkSum = 0L; int nRead; while ( (nRead=f.read( barray, 0, SIZE )) ! FileInputStream does an I/O operation on every read and it synchronizes on all method calls to make it thread-safe.

BufferedInputStream with byte reads Benchmarks. Solving common Java EE performance problems. Java EE (Java Platform, Enterprise Edition) applications, regardless of the application server they are deployed to, tend to experience the same sets of problems.

Solving common Java EE performance problems

As a Java EE tuner, I have been exposed to a variety of environments and have made some observations about common problems. In this capacity, I see my role as similar to that of an automobile mechanic: you tell your mechanic that the engine is chirping; then he asks you a series of questions that guide you in quantifying the nature, location, and circumstances of the chirp.

From this information, he forms a good idea about a handful of possible causes of the problem. Featured Resource.