Home » Java » Enterprise Java

Enterprise Java

Troubleshooting deadlock in an Apache opensource library

java-interview-questions-answers

Apache PDFBox is a popular open-source library that facilitates java applications to work with PDF documents. Recently we encountered a Deadlock that surfaced in this library. In this post we have shared how we troubleshooted and identified the root cause of the problem. What is Deadlock? First let’s try to understand what ‘Deadlock’ means. Several technical definitions aren’t clear. ‘Deadlock’ ...

Read More »

Skaffold for Local Java App Development

java-interview-questions-answers

Skaffold is a tool which handles the workflow of building, pushing and deploying container images and has the added benefit of facilitating an excellent local dev loop.  In this post I will be exploring using Skaffold for local development of a Java based application Installing Skaffold Installing Skaffold locally is straightforward, and explained well here. It works great with minikube as a local ...

Read More »

Google Cloud Function Gradle Plugin

java-interview-questions-answers

 It is easy to develop a Google Cloud Function using Java with Gradle as the build tool. It is however not so simple to test it locally. The current recommended approach to testing especially with gradle is very complicated. It requires pulling in Invoker libraries and adding a custom task to run the invoker function. I have now authored a ...

Read More »

Google Cloud Functions (2nd Gen) Java Sample

java-interview-questions-answers

Cloud Functions (2nd Gen) is Google’s Serverless Functions as a Service Platform. 2nd Generation is now built on top of the excellent Google Cloud Run as a base. Think of Google Cloud Run as a Serverless environment for running containers which respond to events(http being the most basic, all sorts of other events via eventarc). The blue area above shows ...

Read More »

Logging Performance Comparison

java-interview-questions-answers

In a previous blog post, I explained the pros and cons of using logging. In this post, we’ll explore and compare the performance of different logging solutions that approximate the role of an audit log. To recap, the premise is that in enterprise applications, logging should only be used mainly for the purposes of: Recording unexpected errors & unrecoverable situationsCompletion ...

Read More »

Google Cloud Structured Logging for Java Applications

java-interview-questions-answers

 One advice for logging that I have seen when targeting applications to cloud platforms is to simply write to Standard Out and platform takes care of sending it to the appropriate log sinks. This mostly works except when it doesn’t – it especially doesn’t when analyzing failure scenarios. Typically for Java applications this means looking through a stack trace and ...

Read More »

Complete Guide To Spring Testing

java-interview-questions-answers

Software testing is a non-negotiable aspect of the software development life cycle. Setting up and moving on with software testing might be a tedious task. You or your team may feel stuck devising a testing strategy or picking up a testing framework. However, the major roadblocks are either related to methodology or framework.This article revolves around how to perform testing of ...

Read More »

Insane AWS Lambda Speed Up

java-interview-questions-answers

What makes this post annoying is that we’ve suffered from a slow Lambda cold start for a very long time, and the solution was literally a few seconds’ work. I’ve written before about reducing bloat in Lambdas, especially the MySQL driver. However, the JVM is still quite slow to start. I’ve learned to package AWS Lambdas using ZIP, rather than ...

Read More »

Which is better: A monolithic Kafka cluster vs many?

java-interview-questions-answers

Apache Kafka is designed for performance and large volumes of data. Kafka’s append-only log format, sequential I/O access, and zero copying all support high throughput with low latency. Its partition-based data distribution lets it scale horizontally to hundreds of thousands of partitions. Because of these capabilities, it can be tempting to use a single monolithic Kafka cluster for all of ...

Read More »