Caching method results with JCache

java-interview-questions-answers

In JCache there is a handy functionality that transparently caches the result of methods. You can annotate methods of managed beans with @CacheResult and the result of the first call will be returned again without calling the actual method a second time. import javax.cache.annotation.CacheResult; // ... public class Calculator { @CacheResult public String calculate() { // do some heavy lifting... ...

Read More »

Emerging role of PaaS (Platform as a service) in building cloud-native applications

Challenges & opportunities for cloud-native applications Current technology landscape for cloud-native apps is evolving and Platform-as-a-Service (PaaS) solutions are constantly changing to meet the demands such architecture. As customers need flexibility and openness in terms of choosing PaaS solution (without any vendor or technology lock-in), a key need is to provide a neutral view in terms of: Which PaaS solution ...

Read More »

Kotlin – Try type for functional exception handling

Scala has a Try type to functionally handle exceptions. I could get my head around using this type using the excellent Neophyte’s guide to Scala by Daniel Westheide. This post will replicate this type using Kotlin. Background Consider a simple function which takes two String, converts them to integer and then divides them(sample based on scaladoc of Try) : fun ...

Read More »

Choosing Java Cryptographic Algorithms Part 1 – Hashing

Abstract This is the 1st of a three-part blog series covering Java cryptographic algorithms. The series covers how to implement the following: Hashing with SHA–512 Single-key symmetric encryption with AES–256 Public/Private key asymmetric encryption with RSA–4096 This 1st post details how to implement SHA–512 hashing. Let’s get started. Disclaimer This post is solely informative. Critically think before using any information ...

Read More »

Fatjars, Thinwars and why OpenLiberty is cool

java-interview-questions-answers

Fatjars Building a Fatjar (or Uberjar) that contains everything you need to run your application nicely packaged together means you can just do: java -jar myapp.jar and off you go. No Application server. No classpath. This approach has been popularised by the microservices architectural style and frameworks like Springboot. “In short, the microservice architectural style is an approach to developing ...

Read More »

Getting to Working Software: Code Reviews – Benefits

Last time we talked about the different mechanisms and practices we put in place in order to get us to working software, the main metric in agile delivery. We talked about how “working software” means not just that software is functional, it’s built to last. One of the most effective of these practices is code reviews, and we’ll start, as ...

Read More »

IoT Trends for 2018

Last year I made the bold move to write-up the 2017 trends I thought would be important for the IoT industry and Eclipse IoT community. It seemed like a useful exercise so I thought a 2018 version is appropriate. 1. Edge/Fog/IoT Gateway computing will continue to gain traction.  It is not feasible that all IoT devices will be communicating directly ...

Read More »

JavaParser to generate, analyze and modify Java code

As developers we frequently look in contempt to people doing repetitive work manually. They should automate that, we think. Still, we do all activities related to coding by hand. Sure, we use fancy IDEs that can perform some little refactoring for us but that is basically the end of it. We do not taste our own medicine. Let’s change that. ...

Read More »