Articles Tagged ‘vert.x’

Resilient Architecture in Practice – Circuit Breakers for Java: Failsafe, Javaslang, Hystrix and Vert.x

Tuesday, February 14th, 2017

When dealing with remote services or APIs there is always the risk of latency issues, failures or connection losses. The worst thing to happen is when the remote service is down and our application hangs until the underlying protocol’s (e.g. TCP) connection timeout is reached and we’re receiving an exception. Until this moment is reached, our application might hang, memory is allocated for threads or bound objects and at last, our continuous requests might prevent the remote system from recovering.

We might use timeouts here but circuit-breakers take this approach one step further: A potential failing, critical or dangerous operation is encapsulated with a circuit breaker tracking failures and when a specified threshold is reached it tripping the breaker.  Now all calls to the API fail immediately and the  system does not even try to communicate with the failing remote system or the isolated API.
This avoids  flooding a  dead remote system with requests and allocating memory and system resources for waiting threads etc. and is also a good mechanism and  integration point to track business-critical errors.

In the following tutorial I’m going to demonstrate four different circuit-breaker implementations for Java forced to interact with a failing API.

(more…)

Continuous Delivery with Bitbucket Cloud and Bitbucket Pipelines

Friday, July 1st, 2016

Atlassian has added a continuous integration service as a new feature to their Bitbucket Cloud product. It’s called Bitbucket Pipelines and it is similar to Travis CI for GitHub offering a nice integration for continuous integration/delivery pipelines for projects hosted on Bitbucket.

It’s still in the beta phase and requires a sign-up but nevertheless I’d like to demonstrate the current state of this service and how easy it is to add scripted pipelines to a project.

(more…)

Creating a Websocket Chat Application with Vert.x and Java

Wednesday, November 13th, 2013

Vert.x is a modern, lightweight framework to build high performance applications running on the Java Virtual Machine. The framework is polyglot so that you’re able to write your application in Java, Groovy, Ruby, Python or even JavaScript.

In addition it offers a nice component system, an actor-like concurrency model a distributed event bus and an elegant API to create scalable applications in no time.

In the following tutorial we’re going to build a websocket chat by creating a HTTP server and the websocket server using Vert.x, Java and Maven.

(more…)

Search
Categories