Interface Evolution With Default Methods – Part II: Interfaces

Default methods were introduced to enable interface evolution. If backwards compatibility is sacrosanct, this is limited to adding new methods to interfaces (which is their exclusive use in the JDK). But if clients are expected to update their code, default methods can be used to gradually evolve interfaces without causing compile errors, thus giving clients time to update their code ...

Read More »

On Servlets and Async Servlets

java-interview-questions-answers

The Servlet API, part of the Java EE standard, has long been (since 1998, when the 2.1 specification was officially released) an important building block of Java-based enterprise architectures. It is an opinionated API to serve request/response protocols built around a few fundamental concepts:             A compliant container, that is a dedicated runtime that is either a ...

Read More »

Scala Snippet: Object, Companion Object and Static Methods

If you are a Java developer moving to Scala, one notable difference in terminology that can cause confusion is the term ‘object’. In Java an object is always an instance of a class, created by calling a constructor. Object In Scala an object is used for defining a single instance of a class with the features you want. In practice ...

Read More »

Meta-cycles in technology choices

I’ve been working on my keynote for QCon Beijing and looking at technology trends and choices since the 1950s. One of the interesting tensions that I’ve seen in IT is the tensions between “getting it right” and “doing it quick”. Most of enterprise/business IT is about making good business decisions. Business people who make those decisions need information that’s mostly ...

Read More »

Farewell to Asynchronous Code

java-interview-questions-answers

Quasar is a library that adds true lightweight threads (fibers) to the JVM. These are very cheap and very fast – in fact, fibers behave just like Erlang processes or Go goroutines – and allow you to write simple blocking code while enjoying the same performance benefits of complex asynchronous code. In this post we’ll learn how to transform any asynchronous, ...

Read More »

Scalable, Robust – and Standard – Java Web Services with Fibers

java-interview-questions-answers

This blog post discusses benchmarking web service performance under load. To learn more about the theory of web service performance, read Little’s Law, Scalability and Fault Tolerance. Benchmarking a Web Service with Blocking and Asynchronous IO How a web application (or a web service) behaves under load, in the face of various failures, and under a combination of the two, is ...

Read More »

Microservice Design Patterns

The main characteristics of a microservices-based application are defined in Microservices, Monoliths, and NoOps.  They are functional decomposition or domain-driven design, well-defined interfaces, explicitly published interface, single responsibility principle, and potentially polyglot. Each service is fully autonomous and full-stack. Thus changing a service implementation has no impact to other services as they communicate using well-defined interfaces. There are several advantages of such an application, but its not ...

Read More »