Working recently with Hibernate batch processing I’ve followed the default pattern promoting callings session.clear()
periodically. In this article I’m going to describe what problems can be caused by this approach and how to avoid them.
Working with Micronaut, what I’ve been doing recently, it’s inevitable to stumble upon RxJava and Reactive Programming concepts, especially implementing some internal Micronaut interfaces usually returning Flowable<?>
instead of ?
. Having no previous experience but beign curious about this reactive hype I decided to delve into the subject and try to understand it deeper. Even though it turned out more difficult and tricky than I expected before, I think I’ve finally caught the idea. In this article I’ll try to introduce the newcomer to my way of thinking about the reactive programming step by step.
Micronaut is a brand-new framework from Grails creators targeted to be a first choice for microservices architecture framework in Java world and the as the main Spring Boot competitor, while GraphQL is becoming recently more and more popular standard to query backend data with JSON. In this article I’m going to show how to glue both technologies to provide a complete foundation on which one can build his own Hibernate/JPA application.
Read the full articleI have recently been learning Kotlin. While the original Kotlin Reference is quite good, it certainly contains too much text for me to quick-start with Kotlin after years of Java development. During reading the docs and testing some syntax I’ve made my own Kotlin tutorial, which consists mostly of source code. This is probably the only thing that is required for experienced Java developer to get started.
Read the full articleMongoDB stores by default all dates with time and timezone. What’s wrong with this approach? There’s definetly something wrong when related stackoverflow thread shows more votes for converting dates to string than keeping them using default BSON datetime with timezone.
Read the full articleThis article describes how to create Spring Boot application with oauth2 authorization using password
grant type. This grant type is appropriate for internal clients which we trust to get username and password from the user, like for example internal web UI or native mobile app.
Embedded Redisson Node is a service where you can execute asynchronous tasks using Redis with Redisson. This library is not bound to Spring whatsoever, so if you want to run your tasks in the Spring context you need to bind it manually. However, using Spring Boot with Devtools you may encounter some class loading problems between Redisson Node and Spring context, what I’ve today. Here is a quick howto what’s this about and how to overcome this problem.
Read the full articleDoing some proofs of concept for the brand new microservices architecture using Spring Boot and Spring Cloud I’ve chosen few backing technologies for tests. To create serious web application we need at least a database, something for messaging and distributed session/cache. The most common choices as always come from Spring-supported technologies and my ones are PostgreSQL and MongoDB as databases (depending on if we need transactional database in the specific service or not), Redis as a distributed memory grid and RabbitMQ for messaging. Now it’d be nice to have everything working transparently under one transaction manager.
Read the full articleThinking about new application architecture with Spring Cloud with Netflix OSS I’ve stuck on a problem of time you need to wait until the Ribbon client is ready to serve. It looks by default you need to wait 30s before server list is fetched from Eureka server and Ribbon load balancer can be used to route traffic to specific service. This is a pain in dev env because here we frequently need to restart services and test some results again and again. 30s is not an option, so I’ve been looking for decreasing this time what finally turned out to be a difficult thing.
Read the full articleWe have been thinking recently about using some SQL views in our Hibernate application backed by postgresql. It looks feasible and even it enables great possibilities. Below quick snapshot from my testing app showing how it works.
Read the full article