JHUG meetup November 28th 2017
On November 28th 2017 JHUG held its latest meetup (Meetup.com event). The event was kindly hosted by Eurobank in their impressive auditorium. The attendance was around 140, which is very satisfactory because it shows that many Java developers care for their work and feel the urge to expand their knowledge.
The first presentation was by Vassilis Bekiaris (LinkedIn profile, Twitter) of Hazelcast with title “Using JCache to speed up your apps”. Vassilis began with the main motives for caching and that we should consider it when our data either does not offen change or is very expensive to retrieve. Then he explored how the concepts latency and size come together in caches, as well as when deserialisation plays a role. Then he presented the patterns of caching aside and caching through and went on with the differences of in-process caches (single node) and distributed caches (multiple nodes). In the latter, the cached data needs to be serializable (so that it can be transmitted to all the cache nodes). However, it may be a good practice to serialize in the first case as well, because your data may exceed the heap size (or simply because you may want to be ready to go distributed). JSR-107 is the specification for caching in Java, for which there are several implementations, one being Hazelcast. Vassilis went on with some of the entities JSR-107 specifies (Caching
, CachingProvider
, CacheManager
and Cache
), some other constructs to transform or perform computations on your data and with the Listeners your cache comes with. He then showed the annotations (with support for CDI, Spring and Guice) and can also provide real time statistics via JMX. Vassilis showcased some sample code (github) and also played around with caching in the Spring Boot sample (github). You can find the slides of his presentation here.
The second presentation was by Apostolos Polymenakos (LinkedIn profile) and Giorgos Sikalias(Youtube channel), both employees of Eurobank, and was titled “Docker, Kubernetes & Java Microservices”. Giorgos is an ex colleague from our days at Trasys and is an accomplished circuit driver, although I wouldn’t get in a car he drives. Apostolos started the presentation with some basic concepts of microservices and their main differences to monoliths. He went on explaining that containers have actually been around since 2008 and offer OS-level virtualization (they hide everything but the OS kernel and the appropriate binaries and libraries). VMs are inherently different from containers in that you may run multiple isolated containers on the same OS without paying the overhead of the OS again and again for each deployment. Their key advantages are the small footprint, their portability and the fast startup. Docker is the container engine with the greatest momentum. In order to manage a large number of containers in production, we need a container orchestration engine, and Kubernetes is also the one with the greatest momentum. Apostolos finished his part of the presentation explaining that Kubernetes tries to make sure that the production system remains in the specified declared desired state with mechanisms for self-healing, making effective use of the hardware, while abstracting the infrastructure.
Giorgos continued with the second part of the presentation, which was about how his team set out to use Docker and Kubernetes to build the infrastructure for Eurobank. He started with pointing out the importance of selecting an appropriate image with respect to size, out-of-memory handling and startup parameters. He went on with the importance of monitoring in order to be able to track down problems. Having this in mind, they use the Spring Boot Actuator, Jolokia and hawt.io. Giorgos continued with the Spring Cloud family of libraries (some of which come from Netflix) such as Hystrix, Sleuth. Another point to consider is that it is desirable to move as fast as possible to the final (on-premise in Eurobank’s case) infrastructure, as many public clouds are not performant and the developers and operations will need time to familiarize. He closed the presentation with some tips that boosted his team’s productivity, such as Kotlin, Spock for testing and the source-to-image tool. Giorgos also pointed out that a company needs to invest on good hardware and tooling for developers to be able to work effectively (I hope some managers are reading this). You can find the slides of his presentation here and the video below: