Java 8 Tutorial Through Katas: Berlin Clock (Easy)

July 15, 2015 Leave a comment

Technology Conversations

A programming kata is an exercise which helps a programmer hone his skills through practice and repetition.

This article is part of the series Java Tutorial Through Katas.

View original post 532 more words

Categories: Uncategorized

Gatling – SBT For Load Testing

July 14, 2015 Leave a comment

Knoldus Blogs

Gatling is an open source load testing framework based on Scala, Akka and Netty and ready our self for load testing. Load testing is performed to determine a system’s behaviour under both normal and at peak conditions.

The aim includes;

  • High performance
  • Ready-to-present HTML reports
  • Scenario recorder and developer-friendly DSL


1. In project/plugins.sbt, add:

Also needs to add these two dependencies in  build.sbt:


A Simulation is a real Scala class containing 4 different parts:
we can define the baseURL, which will be prepended to all the relative paths in the scenario definition. Also we can define some other configurations such as common headers, user agent etc, which will be added on each request.

we define the headers which can be used for each request that will be sent to the server.

This is the main part of your test. It has a sequence…

View original post 80 more words

Categories: Uncategorized

Scaling To Infinity with Docker Swarm, Docker Compose and Consul (Part 3/4) – Blue-Green Deployment, Automation and Self-Healing Procedure

July 13, 2015 Leave a comment

Technology Conversations

This series is split into following articles.

In the previous article we manually deployed the first version of our service together with a separate instance of the Mongo DB container. Both are (probably) running on different servers. Docker Swarm decided where to run our containers and Consul stored information about service IPs and ports as well as other useful information. That data was used to link one service with another as well as to provide information nginx needed to create proxy.

We’ll continue where we left and deploy a second version of our service. Since we’re practicing blue/green deployment, the first version was called blue and the next one will be green. This time there will be some additional complications. Deploying the second time is a bit more complicated since…

View original post 2,357 more words

Categories: Uncategorized

Monitoring microservices with HAProxy and Riemann

July 13, 2015 Leave a comment
Categories: Uncategorized

How to deploy a Spring Boot application to Amazon AWS using Elastic Beanstalk

March 9, 2015 Leave a comment

Software Developer Blog

I have recently started playing with Spring Boot and have been really impressed with everything I’ve seen. If I need to create a RESTful web service, no problem. If I need to create a web MVC application that uses JPA, no problem. Using embedded Tomcat and H2 database out of the box enables any Java developer to rapidly create applications. Then when I need to deploy this on to a Tomcat server as a war it’s simply a case of just changing the pom.xml and ensuring that the tomcat dependencies are provided. (I’ll cover this later).

This article is the first in a series that will share what I learn about Spring Boot and deploying it into the cloud. The articles will include details on how to architect an application that uses Spring Profiles to run integration tests on local databases, while being able to deploy the same code…

View original post 779 more words

Categories: Uncategorized

How to fix optimistic locking race conditions with pessimistic locking

February 6, 2015 Leave a comment

Vlad Mihalcea


In my previous post, I explained the benefits of using explicit optimistic locking. As we then discovered, there’s a very short time window in which a concurrent transaction can still commit a Product price change right before our current transaction gets committed.

This issue can be depicted as follows:


  • Alice fetches a Product
  • She then decides to order it
  • The Product optimistic lock is acquired
  • The Order is inserted in the current transaction database session
  • The Product version is checked by the Hibernate explicit optimistic locking routine
  • The price engine manages to commit the Product price change
  • Alice transaction is committed without realizing the Product price has just changed

Replicating the issue

So we need a way to inject the Product price change in between the optimistic lock check and the order transaction commit.

After analyzing the Hibernate source code, we discover that the SessionImpl.beforeTransactionCompletion() method is…

View original post 366 more words

Categories: Uncategorized

What happens when too few databases become too many databases?

February 5, 2015 Leave a comment


So here’s some irony for you: For years, Andy Palmer and his oft-time startup partner Michael Stonebraker have pointed out that database software is not a one-size-fits-all proposition. Companies, they said, would be better off with a specialized database for certain tasks rather than using a general-purpose database for every job under the sun.

And what happened? Lots of specialized databases popped up, such as Vertica (which Stonebraker and Palmer built for data warehouse query applications and is now part of HP). There are read-oriented databases and write-oriented databases and relational databases and non-relational databases … blah, blah, blah.

The unintended consequence of that was the proliferation of new data silos, in addition to those already created by older databases and enterprise applications. And the existence of those new silos pose a next-generation data integration problem for people who want to create massive pools of data they can cull for those big data insights…

View original post 384 more words

Categories: Uncategorized