Last month I’ve attended ElasticSearch trainings in Warsaw. Among huge number of things I learnt I want to share the way how to improve relevancy of matches in a search query.
Continue...Java, Distributed Systems & Software Engineering
Last month I’ve attended ElasticSearch trainings in Warsaw. Among huge number of things I learnt I want to share the way how to improve relevancy of matches in a search query.
Continue...In order to ensure specific version of node
used in the npm project you can add entry to package.json
and create .npmrc
file.
If you want to disable certain types of tests with Scala you can use tags.
Continue...Do you find configuring mocks for your tests a bit painful? I was there for a very long time.
Now I found a solution that makes it a lot easier and I would like to share it with you.
I believe that maintainability is a key feature of the code you produce. It is good when your code works. But it is even better when it is maintainable in the long run. For many years I was not happy with my code. I was learning about encapsulation, SOLID principles and immutability. But none of this lessons taught me as much as reading Yegor Bugayenko blog and - what is more - his book. In this blog post, I want to give you a short example which shows his point of view so you can grasp the idea.
Continue...In one of the previous posts I have briefly described what is the Hystrix Circuit Breaker and why it’s worth to consider using it. Now I go more into details and explain what are the key parameters and how they affect its behavior.
Continue...Very often you might hear that it is good to have classes highly cohesive & loosely coupled. For many people, it may mean something a little bit different. So more important than just hearing to the slogan, is to have practical examples of what it actually means. In order to achieve loose coupling you should consider event bus at the beginning.
Continue...public class ForecastCommand extends HystrixCommand<Forecast> {
private final String city;
public CommandHelloWorld(String city) {
super(HystrixCommandGroupKey.Factory.asKey("ForecastService"));
this.city = city;
}
@Override
protected String run() {
return forecastService.forecastFor(city);
}
};
void itCanBeUsedLike() {
ForecastCommand command = new ForecastCommand("Krakow");
String s = command.execute();
Future<String> s = command.queue();
Observable<String> s = command.observe();
}
forecastService
) is unavailable for a reason, Hystrix
will eventually stop calling it making your responses faster. And preventing downstream service from an exhaustion.