Articles Tagged ‘database’

Using Throwaway Containers for Integration Testing with Java, JUnit 5 and Testcontainers.

Wednesday, January 30th, 2019

A lot of boilerplate code is written when developers need to test their applications with different connected systems like databases, stream platforms and other collaborators.

Docker allows to handle those dependencies but there is still some glue code required to bind the container’s lifecycle and the configuration to the concrete integration test.

Testcontainers is a testing library that offers lightweight throwaway instances of anything able to run in a Docker container, with bindings to configure the specific containers and also provides wrappers to manage our own custom containers.

In the following short tutorial I am going to demonstrate how to start Apache Kafka as well as a classical Postgresql database from a JUnit 5 integration test.

(more…)

Using jetstreamDB as in-memory Database for Java

Saturday, June 30th, 2018

JetstreamDB is a in-memory database engine for Java that claims to be built for ultra-high speed and the ability of managing complex data structures by storing real Java objects instead of serializing data structures to other database specific formats.

In the following short example I would like to demonstrate how to create and read items from such a database by building a small article management sample app.

(more…)

Creating and Providing HipChat Integrations with Atlassian Connect, Nodejs and Express

Tuesday, August 18th, 2015

HipChat is Atlassian’s alternative to Slack and its solution to team collaboration chats. Atlassian Connect offers developer tools to bootstrap applications, connect to Atlassian’s cloud products with easy and in combination with HipChat’s REST APIs allows us to write integrations for such a chat server in no time.

In the following tutorial I’d like to show how to write an integration within a few steps using Atlassian Connect, Node.js and Express and how to connect the integration to a HipChat server.

Finally on the one hand I’m going to explain how to speed up local development with ngrok, an in-memory database and nodemon for automatic application restarts and on the other hand I’m going to demonstrate how to configure the application for production, running with a Redis key-value store on Heroku.

(more…)

A short Overview of Neo4j Indexing Strategies

Sunday, January 25th, 2015

When it comes to indexing in a Neo4j graph database, different options exist for a developer to create and maintain the index.

In the following short examples I’d like to demonstrate different possibilities for index management.

(more…)

Java Persistence API: Controlling the Second-Level-Cache

Monday, April 21st, 2014

Using the Java Persistence API and a decent persistence provider allows us to configure and fine-tune when and how the second level cache is used in our application.

In the following short examples, we’re going to demonstrate those features written as JUnit test cases and running on a H2 in-memory database.

(more…)

Creating elegant, typesafe Queries for JPA, mongoDB/Morphia and Lucene using Querydsl

Thursday, February 13th, 2014

Querydsl is a framework that allows us to create elegant, type-safe queries for a variety of different data-sources like Java Persistence API (JPA) entities, Java Data Objects (JDO), mongoDB with Morphia, SQL, Hibernate Search up to Lucene.

In the following tutorial we’re implementing example queries for different environments – Java Persistence API compared with a JPQL and a criteria API query, mongoDB with Morphia and last but not least for Lucene.

(more…)

Search
Categories