We asked 25 developers, five technology leaders and someone “doing indescribable things with technology” – better known as our primary technology leader, what technologies (tools, libraries, language or frameworks) they believe have appeared, are happening or happened:
- Hippad – What new technologies are you eager to learn about this year?
- Happens – Are there any exciting technologies you used last year that we should learn this year?
- Happened – Did you move away from any technologies last year?
This is what we got back:
![Venn2](https://techlab.bol.com/app/files/2021/06/venn2-476x380.png)
This blog post, which is part of a series of six blog posts in total, we have a closer look at Java application frameworks and runtime:
Go to The hyped, happening and happening tech @ bol.com for a complete overview of all the hype, happening and happening tech on bol.com.
Why write tons of board code, when you can simplify them and use interfaces? Or waste time choosing libraries and tools when you can automatically use sensible defaults instead? Why create objects and manage dependencies manually, when you can do so using a simple note?
There are many frameworks that provide us with these features, and much more! Spring is probably the most popular of these frames, so let’s start with that. But do not stop reading after spring, because there is more out there.
Spring
Be the sixth most beloved framework by the developer community (https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-languages-loved) Spring does not need much acquaintance, so let’s move on to some of the popular Spring projects used within bol.com.
Spring boot
Spring was originally introduced, it stripped a lot of Java code from it. However, Spring itself needed some configuration to set up initially. It is taken one step further in the spring boot, where he takes the spring into his own mind and sets sensible defaults out of the box. Some things that have been defined are dependency on beginners, embedded web server, metrics, etc.
We at bol.com use an inner frame that uses a spring boot under the hood, making it an even more popular frame in our company.
Spring cloud
Spring Cloud is a framework for fast boot of some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, etc.). It Is a master project that contains many children’s projects that change across a wide range of technologies. A popular example is the GCP Cloud Spring Module which supports many cloud services such as Pub / Sub, BigQuery, Cloud SQL etc. Out of the box.
Spring Cloud also provides security-related projects such as the Spring Cloud Security module that provides token-based security features in Spring Boot applications.
Spring combination
In addition to the Spring framework, the Spring integration offers lightweight messaging within Spring-based applications. However, it does not stop with notifications within your app. It also offers channel-based communication to connect your spring app to other apps.
The spring combination implements many popular design patterns associated with messaging architectures, such as Publish Subscribe, Bridge and Adapter. This way you can rely on industry standards to build flexible, loosely connected applications and processes.
Popular alternatives
Although Spring dominates the industry, there are some new and anticipated alternatives, some of which look very promising. The following two frameworks are worthy of comparison for spring:
Quarkus
In the age of docker containers, Java is still widely used. Java has always been (not) famous for its performance, due to the layers of abstraction between the code and the basic machine – a price to pay for the ability to run across multiple platforms. Today, due to the large number of companies adopting micro services, this may no longer be relevant. The object will always operate on the same place and platform, i.e. the stabber container.
Quarkus is an open source system of technologies adapted for GraalVM and HotSpot for writing Java applications. It offers extremely fast operating time and low memory footprint, making it ideal for server-free containers and applications. Quarkus has better memory consumption, garbage collection and request output. However, this framework is still relatively new and does not have extensive documentation or community support like Spring.
Ketor
Ktor is a lightweight framework for building asynchronous servers and clients on connected systems using the Kotlin programming language. Similar to Quarkus, Ktor provides very fast operating times (about 60% faster than Spring) and low memory usage (about 50% less than Spring). Ktor is opinionated (unlike Spring) and does not impose many constraints on what technology should be used in the project – such as drawing, template, messages, etc. This framework also uses Kotlin’s corotins for asynchronous programming where coroutine IO can be used to communicate with other services.
Ktor currently works with JVM-based languages, but it integrates better with Kotlin because Ktor itself is written in Kotlin.
Allows blade
A “Simple elegant web framework with high full stack performance” This is how the authors themselves describe the Lets blade project. Lets blade is more of a collection of lightweight libraries that can be integrated modularly according to your specific needs. Among other things, he offers:
- A relaxed routing mechanism for setting up a binding between your URLs and application controllers
- A simple way to serve static resources
- Netty server is embedded, so you do not need an application server to run it
- A way to map Json objects to regular old Java objects
- Monitoring for your blade application
- Its own basic template engine and the option to add an external engine to your liking, like Velocity.
You build it, you (need something) manage it, you love it. This section focuses on the middle section – Java runtime to run your application written in your favorite JVM language.
OpenJDK 11
Not all of our apps are running in the cloud (yet). For those who do not, we also can not select JVM to run them. So when we moved to OpenJDK 11, we were still a little excited.
This was not because of the fact that it paved the way for migration to Java 11. Do not get us wrong, because the new long-term support version of Java brings us a lot of new and beautiful features, like:
- Useful service methods for strings, files and arrays,
- Improved syntax for Lambda parameters that allows you to add comments with, for example @NonNull comments, and
- Http client with better performance.
What really excited us, is the two new garbage collectors that this edition brings. OpenJDK11 was shipped with the Epsilon trash collector and the Z trash collector. The Z collector is still in its experimental phase. It works in a completely different way from other traditional garbage collectors. It strives to linger no more than 10 milliseconds even in incredibly large piles. Sounds good, right?
It even gets better, because Epsilon’s garbage collector ensures there are no breaks at all. Ok, that’s a little unfair, because he also does not collect unused objects. This means that your stack will only grow as you allocate more items over time. Therefore Epsilon’s garbage collector is only useful in specific scenarios. Think about taking the GC breaks out of the equation while comparing performance. Or use it for (short) batch applications that end before the stack fills up.
GraalVM
GraalVM has recently taken the technology world by storm, and for good reason. This is a high-performance runtime that provides significant improvements in app performance and efficiency. “It makes your Java programs run much faster without any code changes! ” [bol.com software developer]
It has the following main strengths:
- Just-in-Time (JIT) compiler – A traditional compiler compiles all the code into machine language before running the program. In contrast, a JIT compiler is running after the A program starts and composes a code. The fancy code, or house code sequences, become faster and more readable machine language, or original code. It translates the source code into a language that a host processor naturally understands, resulting in a faster and more efficient instruction system.
- Ahead-Of-Time (AOT) compiler – GraalVM also supports AOT compiler that translates JVM code to an original platform executable. These objects start immediately, are smaller in size and consume less resources, making them ideal for cloud architecture and micro-services.
- Polyglot – GraalVM supports Kotlin, Clojure, Scala, Groovy, R, JavaScript, Python and Ruby. This is very useful because it opens the door to the interoperability of a real language, like using the Python library within Java!
Want to read more about hype, happening and tech happening at bol.com? Read all about The hyped, happening and happening cloud technologies and data storage solutions @ bol.com or return to The hyped, happening and happen tech @ bol.com for a complete overview of all the hype, happening and happening tech in bol. com.