Monday, August 31, 2020

Latency for sharing data while using Hazelcast on Virtual Machine


A few days back we found out one old app which was running on multiple nodes while having in-memory cache usage. So, as a result, there was a case when the request came to the first node and the second node didn't get that data, and the app wasn't functioning properly. 

So, as always first thing which we considered to use Redis. However, we don't have ready to use the Redis cluster and we started looking for other solutions in a market. Finally, I saw there is a Hazelcast which allows sharing data between nodes even without having the Hazelcast cluster. Of course, it is working when you are running in the same network. So, nodes should be able to multicast and make a proper cluster.

Wednesday, November 13, 2019

Java List vs List<?> vs List<Object>

Before generics were introduced developers used lists as List which means you can store any type of objects including null inside it and when you read it you need to cast it
List list = new ArrayList();
list.add("String test");
list.add(new Date());

String s = (String) list.get(0);
From code above you can expect ClassCastException because if you try to assign 2nd item to String it will not succeed and you will get an exception during runtime. To prevent it you need to check if your type is correct and then cast as below

Friday, May 3, 2019

What kind of benefits you can expect in Poland

Hey, 

I relocated to Poland(Krakow) in 2017 and I'm very happy to be here. I just regret that why I didn't do it 5-10 years ago :) 

Except nice and kind people, beautiful, old and safe city you can even expect a lot of benefits from the government and companies. Today I want to share all kind of benefits which I know and use here. If you know additional ones please feel free to leave them in the comment, I'll be happy to check it and add to the list :)

Thursday, August 23, 2018

How to hibernate from the lock screen on Ubuntu 18


By default Ubuntu doesnt support hibernate option. Even when u enable it using "pm-utils" during resume(wake-up) your laptop will not require password. 
And this is very risky moment. 

In my case, I created a keyboard shortcut which enables hibernate and lock. 
Today I will share steps how you also can do it for your laptop/pc.



Monday, April 16, 2018

How to change Google Play Country on Android


As you know, Google Play filters some apps on a per country and/or per region basis. And I also when relocated to Poland wasn't able to download and use Poland based apps.

Long history, in short, most of the time developers or companies (bank and government organizations i.e.) put apps on the market which are allowed to download only by the account/user which belongs to that country. 


Today, when I need to change my account to use Poland as a country wasn't easy as expected :) That is why I decided to share easy steps how I did it with you.