programming

All posts (56)

Best practices working with GIT

Here are some of my takeaways on working wth git: Theoretically rebasing is better, but merging is fine. When there are many commits in your feature branch, but there is no point of keeping those commits individually in the history, one should squash the changes, so it will be one commit in master branch. Let’s aim to have everything you have been working on during the day to be merged to master in the evening.

Dynamic containers dynamic ports

Running integration tests locally with Docker on fixed ports is not always possible due to port conflicts. This is especially true when running tests in shared CI environment. Fortunately, testcontainers allow to start Docker containers listening on a random port. Here is an example: // create and start container val container = new GenericContainer("softwaremill/elasticmq-native") .withExposedPorts(9324) .withReuse(true) container.start() // create sqsClient val sqsPort = container.getMappedPort(9324) val clientBuilder = SqsAsyncClient.builder() .credentialsProvider(DefaultCredentialsProvider.create()) .region(Region.EU_CENTRAL_1) .

Spring Boot Configuration Best Practices

Spring Boot comes with very neat configuration mechanism. Default default application configuration is defined in one configuration file and environment specific setting in separate files. But still this mechanism is often not used properly resulting in verbose and unmaintainable configurations.

What happens when you split systems into many microservices

Moving from monolithic applications into microservices is current trend in software design. Let’s identify some pros and cons of both architectures and challenges one may face during the system transformation.

Building Data Pipeline with Kotlin Coroutines Actors

In this post I will show how to build simple data-enriching pipeline using Kotlin coroutines. I will use Channels and Actors abstractions provided by kotlinx-coroutines. In Actors model “actors” are the universal primitives of concurrent computation. In response to a message that it receives, an actor can: make local decisions, create more actors, send more messages, and determine how to respond to the next message received. Actors may modify their own private state, but can only affect each other through messages (avoiding the need for any locks).

The Typical Mistake in Web-Service Design

Working on different projects I often see the same problems with application design.

logo   Never miss a story, subscribe to our newsletter