background preloader


Facebook Twitter


Effective Java. Recently, I've re-read awesome java book Effective Java by Joshua Bloch.

Effective Java

The book contains 78 independent items, discussing various aspects of programming in java. Something like mini-design patterns with emphasis on their pros and cons. Few notes from each item as a refresher. Item 1: Consider static factory methods instead of constructors Static factory methods have more informative names than constructorsSame parameters list could be appliedNot required to create new objects, could return cached instanceStatic factory methods could return object subtypeReduced verbosity for generics due to type inferenceClasses without public/private constructor can't be subclassed, but it is good, because it enforces to "favor composition over inheritance"Hard to distinguish from other static methods. Solaris Troubleshooting and Performance Tuning. Disk I/O Components What we blithely call a "Disk I/O" is actually made up of several components, each of which may have an impact on overall performance.

Solaris Troubleshooting and Performance Tuning

These layers may be broken down as follows for a typical I/O operation: POSIX: Application calls a POSIX library interface. RESTful Web Services: A Tutorial. More than a decade after its introduction, REST has become one of the most important technologies for Web applications.

RESTful Web Services: A Tutorial

Its importance is likely to continue growing quickly as all technologies move towards an API orientation. Every major development language now includes frameworks for building RESTful Web services. As such, it is important for Web developers and architects to have a clear understanding of REST and RESTful services. JVM Languages. JVM Languages JVM Languages Feature Articles On this site is archived all the content from Dr.

JVM Languages

Dobb's that was published on the Web through December 31, 2014. The best tools available for creating, testing, and debugging code. Developing server-side apps with the popular Node.js framework can now be done with the full support of Visual Studio IntelliSense, debugging, and project management. A First RESTful Example - Java Web Services: Up and Running, 2nd Edition [Book] As befits a first example, the implementation is simple but sufficient to highlight key aspects of a RESTful web service.

A First RESTful Example - Java Web Services: Up and Running, 2nd Edition [Book]

The implementation consists of a JSP (Java Server Pages) script and two backend JavaBeans that the JSP script uses to get the data returned to the client (see Figure 1-6). The data is composed of sage corporate predictions. Here is a sample: There is an Ant script (see An Ant script for service deployment) that automates the deployment of this and other service examples.

Lambda Expressions in Java 8. 7. Memory : Stack vs Heap. Here is a short program that creates its variables on the stack.

7. Memory : Stack vs Heap

It looks like the other programs we have seen so far. #include <stdio.h> double multiplyByTwo (double input) { double twice = input * 2.0; return twice; } int main (int argc, char *argv[]) { int age = 30; double salary = 12345.67; double myList[3] = {1.2, 2.3, 3.4}; printf("double your salary is %.3f\n", multiplyByTwo(salary)); return 0; } double your salary is 24691.340 On lines 10, 11 and 12 we declare variables: an int, a double, and an array of three doubles.

These three variables are pushed onto the stack as soon as the main() function allocates them. Virtual Panel: Using Java in Low Latency Environments. Java is increasingly being used for low latency work where previously C and C++ were the de-facto choice.

Virtual Panel: Using Java in Low Latency Environments

InfoQ brought together four experts in the field to discuss what is driving the trend, and some of the best practices when using Java in these situations. The participants: Peter Lawrey is a Java consultant interested in low latency and high throughput systems. He has worked for a number of hedge funds, trading firms and investment banks. The LMAX Architecture. LMAX is a new retail financial trading platform.

The LMAX Architecture

As a result it has to process many trades with low latency. The system is built on the JVM platform and centers on a Business Logic Processor that can handle 6 million orders per second on a single thread. The Business Logic Processor runs entirely in-memory using event sourcing. The Business Logic Processor is surrounded by Disruptors - a concurrency component that implements a network of queues that operate without needing locks.

During the design process the team concluded that recent directions in high-performance concurrency models using queues are fundamentally at odds with modern CPU design. Disruptor by LMAX-Exchange. Download here...

Disruptor by LMAX-Exchange

Discussion, Blogs & Other Useful Links Presentations. FUN THINGS TO DO WITH KIDS IN NJ - Kids attractions NJ. Offloading data from the JVM heap (a little experiment) Last time, I wrote about the possibility of using Linux shared memory to offload cacheable/reference data from the JVM.

Offloading data from the JVM heap (a little experiment)

To that end I wrote a small Java program to see if it was practical. The results were better (some even stranger) than I had expected. WK's High Frequency Trading Blog. The response to my first few posts has been much larger than I’d imagined and I’d like to thank everyone for the encouragement. If you’re interested in building a trading system I recommend first reading my previous post on general ideas to keep in mind. My first really technical post will be on how to build a limit order book, probably the single most important component of a trading system.

Because the data structure chosen to represent the limit order book will be the primary source of market information for trading models, it is important to make it both absolutely correct and extremely fast. To give some idea of the data volumes, the Nasdaq TotalView ITCH feed, which is every event in every instrument traded on the Nasdaq, can have data rates of 20+ gigabytes/day with spikes of 3 megabytes/second or more. Eden Space. Hi All, Jay SenSharma JVM is the heart of any Java based Application Server. We face most of the issues deu to incorrect JVM tunning. Learn C The Hard Way. Troubleshooting Guide for Java SE 6 with HotSpot VM. Frequently Asked Questions About the Java HotSpot VM. This FAQ answers common questions about Java HotSpot Technology and about performance in general. Unless otherwise noted, all information on this page applies to both the HotSpot Client VM and the HotSpot Server VM as of Java SE version 1.4. General Memory and Garbage Collection JIT Compiler.

Tuning Garbage Collection for Mission-Critical Java Applications - Tuning Guidelines for Java Garbage Collection, Part 1 « mgm technology blog. I recently had the opportunity to test and tune the performance of several shop and portal applications built with Java and running on the Sun/Oracle JVM, among them some of the most visited in Germany. In many cases garbage collection is a key aspect of Java server performance. In the following article we take a look at the state-of-the-art advanced GC algorithms and important tuning options and compare them for diverse real-world scenarios. Seen from the point of Garbage Collection, Java server applications have wide varying requirements:

Java 8 Lambda Expressions & Streams.