Direkt zum Hauptbereich

Posts

Creating load tests with Gatling instead of JMeter

I just came around a tool called Gatling (http://gatling-tool.org/) to create load tests for web applications. I used to use JMeter for a long time, but JMeter has weaknesses that Gatling doesn‘t have. JMeter uses a synchronous request approach. That means for every request JMeter generates, an internal thread is raised and therefore blocked until a response is being received or a timeout happens. This results in resource blocking on the load injector. The maximum number of threads is limited within a JVM - dependent on the underlying infrastructure -  and even if you are able to run a lot of parallel threads this will result in a high CPU and memory utilization. Although performance tweaking and scaling out to distributed testing might help in such a case, it makes testing more complex and error-prone. This behavior can result in distorted metrics. Think about a typical breakpoint load test. You want to determine, which is the maximum number of requests per second your tested syst
Letzte Posts

CQRS - Command Query Responsibility Segregation

A lot of information systems have been built with a data manipulation focus in mind. Often CRUD (create, read, update delete) operations built on top of a predefined relational data model are the first functionalities that are implemented and lay out as a foundation for the rest of an application. This is mainly because when we think about information systems we have a mental model of some record structure where we can create new records, read records, update existing records, and delete records. This had been learned throughout the last decade of data centric and transaction oriented IT systems. This approach often leads to shortcomings when it comes to query and analyze the system's data. Classical layered architecture This is where CQRS comes into the game. CQRS stands for Command Query Responsibility Segregation and has been first described by Greg Young and later on by Martin Fowler. This architectural pattern calls for dividing the software architecture into two parts

Moore's Law and Amdahl's law

Until the mid oft he 2000’s, there was some kind of an unbreakable fact regarding the vertical scalability of computer hardware and therefore the underlying scaling rules for computer software: Moore’s law. Moore’s law states that the number of transistors on integrated circuits doubles approximately every two years. In good old times of single core processors this meant that also the computing power doubled by this effect. This was a safe harbour for gaining performance in software development. The time was with you, you just had to wait and your execution was getting faster without any changes in the software architecture. Moore’s law is still a valid rule of thumb, but times for the software developers and architects have changed. Although the number of transistors is still growing rapidly, this results in more processor cores since the mid of the 2000’s which means a shift of the vertical scaling approach to horizontal scaling. This also means to gain a positive impact from micro

Create a Bearer token in Scala

Bearer tokens are a standard which is used in OAuth 2.0 . Although there have been discussions if the security mechanisms are significantly weaker than the use of using signatures as many implementations of OAuth 1.0 did (see http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-00 ), bearer tokens are part of the OAuth 2.0 specification and therefore widely adopted in nearly all implementations. The syntax of Bearer tokens is specified in RFC6750 ( http://http://tools.ietf.org/html/rfc6750 ) This is a lean utils object to create specification compliant Bearers in Scala using the java.security.SecureRandom implementation as a randomizer. The standard generate function returns a token of 32 byte length. A second polymorphic functions allows for the generation of a token of individual size. import scala.util._ import java.security.SecureRandom /* * Generates a Bearer Token with the length of 32 characters according to the * specification RFC6750 (http://http://tools.ietf

Using Chrome as Web Browser in Eclipse on Mac OS X

Today a short one: If you want to use Google Chrome as the default web browser in Eclipse on Mac OS X, just do the following (of course after you installed Chrome). In Eclipse open the "Preferences" dialog Select "General ->Web Browser" Choose "New" Enter the information in the dialog as shown in the screenshot below. Click "OK" Check the button next to the newly created entry "Google Chrome" Click "Apply" Now Chrome will be taken when you select a URL to be opened in Eclipse.

Design Patterns in JavaScript: The Singleton pattern

This post about design pattern covers one of the most popular creational patterns, the singleton pattern, and how to implement it in JavaScript. Intent and Applicability The intent of the singleton pattern is that only one instance of a specified class exists within a system. Although you could use a global variable as an instance of a class to be accessible globally, it might make sense to let the object itself be responsible for its uniqueness, that means it cannot be instantiated multiple times. General Concept The singleton pattern can be implemented within one class. The class uses a unique point of access, the getInstance() method.     To make this happen the implementation must prevent the class to be instantiated via a new statement, e.g. var newObj = new SingletonClass()); Implementation The concept can be implemented in this way: function SingletonClass() { if (SingletonClass.caller != SingletonClass.getInstance) { throw new Error("SingletonCl

Add an existing Grails project to Bitbucket using Git

I just started using Bitbucket as a new service to host masters of my source code repositories using Git. If you develop with Grails (like I also do more often) and ever asked yourself how to create a Git repository out of an existing project, here is the solution. Prerequisits Of course you need to have Git installt locally on your machine. If you haven't here are instructions on how to do it (if your a Mac user, I find this Mac OS X installer very useful). Of course you also need an account for bitbucket.org . It's free and easy to set up. In addition to your account you need to create an empty repository. Follow the guidance on the Bitbucket site, it's quite easy. Prepare your grails project As you do not want to store all your files in the repository, you need to create a so called .gitignore file. To do so, you can use a grails command: > grails integrate-with --git Afterwards, the .gitignore file has been created. If you are using the Grovy & Gr