One problem I often encounter, are errors without any context.
If an arbitrary method returns an error "invalid character '}' after object key", you will have to dive down the stack until you find
the exact place the error happened. Therefore whenever you receive an error and you decide to not handle it, but instead
return it to the caller of y...
Recently I came across the problem of ThreadLocal context in multithreaded environment.
If the Thread that handled a request uses an Executor
to asynchronously execute tasks, the ThreadLocal context is lost and information such as requestId will be be missing in the logs.
We can solve this using the Decorator pattern:
Wrap Runnable to pre...
In a microservice architecture, one request can lead to multiple log entries
distributed across services.
One client request can cause multiple internal requests, which again can cause requests.
This can lead to unwanted depth of requests which leads to high latency.
I worked in a system with central logging using the ELK stack. It was easy to ...
Simplejson is an imitation of Java’s json-simple for go language. It allows to access json-data without the overhead of
predefining a model or casting elements manually. Therefore it is useful, whenever you want to get data from different schemas
in a quick and clean way. It additionally provides a handy Error-handling, as well as segmented keys...
There are tons of approaches how to update UI when data changes or other way round, short Model binding. In this
post we will investigate four possible implementations of a one-way binding and compare their performance in a series
of tests. Different code snippets provide an overview of the complexity when applying the approaches to a real exam...