Skip to main content

You are currently viewing the Trifork Blog, to view our full website please go to Trifork.com

Exposing asynchronous communication through a synchronous REST API with Spring 5

Exposing asynchronous communication through a synchronous REST API with Spring 5

On my current project, we opted not to use REST for the communication between our services. Instead we make use of AxonIQ’s AxonHub, which acts as a specialized message broker. Messages can be of three types: Command – You want to change something Event – You want to inform others of something that happened Query […]

Read More

Service Discovery using Consul & Spring Cloud

Service Discovery using Consul & Spring Cloud

Introduction In one of our customer projects we are heavily using Spring Boot in combination with other Spring projects for our microservices. One of the more complex parts of microservices, especially when you are using them as fine-grained as meant to be, will be the fact that you need to setup and maintain the connections […]

Read More

Using Spring Session for concurrent session control in a clustered environment

For a long time, Spring Security has provided support to limit the number of sessions a single user can have concurrently. This prevents users from being logged in from many different devices at the same time, for example to ensure that they won’t share their credentials to a paid site with their friends and family. […]

Read More

Spring-AMQP and payload validation: some notes from the trenches

It’s been a while since I’ve written one of our from-the-trenches blogs: that’s mostly because I’ve been very busy in those trenches developing systems for our customers. This week I completed a Spring Boot-based microservice which is responsible for interacting with some 3rd party SOAP service: its own clients communicate with it by sending request […]

Read More

Active cache eviction with Ehcache and Spring Framework

Active cache eviction with Ehcache and Spring Framework

Caching is an essential to the majority of web applications. Let’s face it: most of the work done in an average web application (especially public ones) is repetitive, either the same user requesting the same information multiple times, or multiple users requesting the same information. The question is always: “How long do I cache”? We […]

Read More

Integrating Flyway In A Spring Framework Application

Integrating Flyway In A Spring Framework Application

This post is about how to integrate Flyway into a Spring/JPA application for database schema migration. To skip all the preambles and get straight to the instructions, jump to Project’s Dependencies Set-up Flyway is a database migration tool which helps do to databases, what tools like git/svn/mercurial does for source code…which is versioning. With Flyway you […]

Read More

Session Timeout and Concurrent Session Control with Spring Security and Spring-MVC

Session Timeout and Concurrent Session Control with Spring Security and Spring-MVC

A web application me and my team are building recently underwent a security review. As usual, because you haven’t yet had time to put any real effort into it, some security risks did surface. We use Spring Security and Spring-MVC and I will talk about implementing a session timeout and concurrent session control: nice subjects […]

Read More