26 Oct 2021

feedDZone Java Zone

Ultra-fast Java In-Memory Database Apps & Microservices with MicroStream

MicroStream is a fundamentally new persistence framework for storing complex Java object graphs natively, which means the object graph is stored on disk as it is in RAM. Vice versa it allows you to load any single subgraph on-demand that is then merged with your object graph in ram automatically. This leads to fantastic benefits: You can use object graphs as an in-memory database. An object graph is a powerful multi-model data structure. You can use any Java type, collections, and formats like JSON. Matching this, Java provides the perfect query language. With Java Streams, searching even huge object graphs will take only microseconds - up to 1000x faster than comparable SQL queries and even much faster than reading data directly from a local cache. DB-specific data structures or formats become meaningless for Java. No more expensive mappings. No more data-type conversion. No more DB-specific query language. Only one data model: Java classes (POJOs). No additional caching framework is required. No more inconvenient object copies. Simple architecture and type-safe query code. Core-Java only instead of DB-specific concepts. As an end result, you will get out an ultra-fast Java in-memory database app or microservice. MicroStream is in productive use for more than 5 years and becomes now open source and part of the popular microservice frameworks Helidon and Open Liberty.

26 Oct 2021 8:44pm GMT

Understanding Spring Boot Project, Spring Initializr, and POM.xml

In the video below, we take a closer look at the understanding Spring Boot project, Spring Initializr, and pom.xml. Let's get started!

26 Oct 2021 8:24pm GMT

HTTP Methods: GET, POST, DELETE and PUT — RESTful Web Services With Spring Framework | Spring Boot

In the video below, we take a closer look at HTTP Methods: GET, POST, DELETE and PUT - RESTful Web Services with Spring framework | Spring Boot. Let's get started!

26 Oct 2021 8:19pm GMT

RESTful API Example with Spring Data REST

In the video below, we take a closer look at RESTful API Example with Spring Data REST, and JPA Many To Many. Let's get started!

26 Oct 2021 4:14pm GMT

25 Oct 2021

feedDZone Java Zone

Why Do We Need Spring Boot? Before Spring Boot and After Spring Boot | Spring Boot Features

In the video below, we take a closer look at why we need Spring Boot. Also, learn about Before Spring boot and After Spring boot | Spring boot features. Let's get started!

25 Oct 2021 8:32pm GMT

24 Oct 2021

feedDZone Java Zone

The Debugger Checklist – Part I

I'm a disorganized person by nature. When I follow a process, it's by habit and intuition. But when a debugging problem keeps me up at night and gets me to that state of mind where a career of raising sheep in New Zealand seems like an attractive option … That's when I need to back off and walk through this process in an orderly fashion. This process never fails. When you walk through it, you can track any problem.

Now I'm going to skip a lot of common advice. Most debugging tutorials start with things that relate to a process: File an issue, reproduce as a test case, etc. I think there's plenty written on that online. People use it as filler since they assume debugging is a simple process. It is sometimes, but as we will learn in this blog, there's a lot of depth and breadth to this misleadingly simple process.

24 Oct 2021 7:50pm GMT

Interesting Application Garbage Collection Patterns

As the author of GCeasy - Garbage collection logs analysis tool, I get to see a few interesting Garbage Collection Patterns again and again. Based on the Garbage collection pattern, you can detect the health and performance characteristics of the application instantly. In this post, let me share a few interesting Garbage collection patterns that have intrigued me.

1. Healthy Saw-tooth Pattern
Fig 1: Healthy saw-tooth GC pattern

You will see a beautiful saw-tooth GC pattern when an application is healthy, as shown in the above graph. Heap usage will keep rising; once a 'Full GC' event is triggered, heap usage will drop all the way to the bottom.

24 Oct 2021 11:07am GMT

23 Oct 2021

feedDZone Java Zone

How To Copy Files From One Directory to Another in Java: Example

Hello folks. I have been programming in Java for a long time, and you won't believe it, but there was no file copy method in the Java API until Java 7. Our options were either to: write it ourselves using a FileInputStream, a FileOutputStream, and a buffer to copy bytes from one to the other; or, better yet, use the FileChannel.transferTo() method or the Apache Commons FileUtils, which was a lifesaver in those days and still is today.

JDK has evolved now, and you have a decent API to copy files from one directory to another. In this article, I'll show you both the pre-Java code for copying files from one directory to another as well post Java 7 code, which makes this task a lot easier.

23 Oct 2021 8:43pm GMT

22 Oct 2021

feedDZone Java Zone

Improving Backend Performance, Part 3/3: Fast Analytics

Analytics involves the computation of data to find patterns. From simple calculations - such as the sum of values or its average to statistics calculated with machine learning algorithms, analytics frequently deals with big amounts of data that need to be processed as fast as possible.

We saw in the previous part of this series of articles, how indexes help to improve the speed of database operations. And in all honesty, the problem in the laboratory application shown in this article can be solved by merely adding an index. However, in real-world applications with many tables that have a lot of columns, dealing with indexes can become difficult. In this article, I explore one interesting technology that helps with analytic SQL queries: ColumnStore using Spring Boot and Vaadin Flow.

22 Oct 2021 5:57pm GMT

What Is Ant, Really?

Ant is a bit of a mystery bag. Its behavior is often obscure until you come to look at its code. Then you find that it consists of a number of fairly simple facilities that are often explained from a bottom-up detailed and technical viewpoint and not from a top-down architectural perspective. This article aims to provide the missing top-down view. It is targeted at an audience of software engineers. Armed with this article, and some solid opinions on when and when not to use this tool, you should be able to find your way in the anthill.

Ant History, Legacy, and Impact

If you have never heard of Ant, don't worry. Ant is yet ANother Tool in the realm of building software. It was the first attempt at a build tool for Java. When it was conceived, XML was all the rage, and C was the way to express software that Java mimicked. Consequently, Ant was influenced by the thinking of C's make tool. Combining these two trends, Ant is a curious hybrid that does not have make's terseness or stringent reproducibility but does have XMLs verbose syntax. Talk about the best of both worlds.

22 Oct 2021 3:36pm GMT

URL Shortener Complete Tutorial

Introduction

A URL shortener is a service that is used to create short links from very long URLs. Usually, short links have the size of one-third or even one-fourth of the original URL, which makes them easier to type, present, or tweet. Clicking on a short link user will be automatically redirected to the original URL.

There are many URL shortening services available online, such as tiny.cc, bitly.com, and cutt.ly. Implementing a URL shortening service is not a complex task, and it is often part of system design interviews. In this post, I will try to explain the process of implementing the service.

22 Oct 2021 1:29am GMT

21 Oct 2021

feedDZone Java Zone

Building a Metadata Driven UI

Description

Metadata-driven UI is especially useful in project teams with a high back-end or DBA competence rather than UI.

In general, it provides an element alignment by invocation of a single endpoint which provides all data required like cardinality, language, font size, and the font itself.

21 Oct 2021 6:12pm GMT

Smart Dependency Injection With Spring: Assignability (Part 2 of 3)

Preface

The Spring Framework is a very powerful framework and provides first class support for dependency injection (DI). This article is the second one in my series dedicated to dependency injection with Spring Framework. My series is split into these three articles:

In This Article, You Will Learn:

Overview

In my previous article, I reviewed the DI basics: different configuration types, injection variants, injection rules, or injected types. Most of it is well known and that article serves just as a summary.

21 Oct 2021 5:36pm GMT

Improving Backend Performance Part 2/3: Using Database Indexes

Database indexes are a concern of the developers. They have the potential to improve the performance of search and filter features that use an SQL query in the backend. In the second part of this series of articles, I'll show the impact that a database index has in speeding up filters using a Java web application developed with Spring Boot and Vaadin.

Read part 1 of this series if you want to learn how the example application that we'll use here works. You can find the code on GitHub. Also, and if you prefer, I recorded a video version of this article:

21 Oct 2021 2:57pm GMT

Deploy a Java application using Helm, Part 1

To deploy enterprise Java applications with Red Hat JBoss Enterprise Application Platform (EAP) servers to Red Hat OpenShift, developers have usually needed to learn how to use OpenShift templates or Operators to specify Kubernetes and OpenShift resources such as build config, deployment, volume, environment variables, and application image. This article, the first of a two-part series, explains a simpler way to deploy an enterprise Java application to OpenShift using Helm charts, and how to connect the application to a PostgreSQL database.

Helm: Simplifying application deployment on Kubernetes

Deployment practices are not familiar to application developers because resource definition has traditionally been determined by the IT operations team. When moving rapidly into the DevOps era, developers need to take more responsibility to set appropriate resources in alignment with cloud microservices.

21 Oct 2021 12:34pm GMT

20 Oct 2021

feedDZone Java Zone

A Java MicroProfile Application for Content Negotiation

An HTTP server can use content negotiation to respond to different clients. Modern clients typically expect a JSON response. At times, a different format is required, such as XML for older clients or binary for newer ones. The process used to manage that challenge, as well as others like coping with numerous languages and even compressing HTTP requests, is known as content negotiation.

In this article, we'll walk through the process of creating a small Java MicroProfile application as we explain how content negotiation works.

20 Oct 2021 9:08pm GMT

10 Nov 2011

feedPlanetJava

OSDir.com - Java: Red Hat's top secret Java Killer/Successor: The Ceylon Project

From the Ceylon dept.:

Gavin King of Red Hat/Hibernate/Seam fame recently unveiled the top secret project that he has been working on over the past two years, a new language and SDK designed to replace Java in the enterprise. The project came out of hiding without much fanfare or publicity at QCon Beijing in a keynote titled "The Ceylon Project - the next generation of Java language?".

10 Nov 2011 6:01am GMT

OSDir.com - Java: Oracle Introduces New Java Specification Requests to Evolve Java Community Process

From the Yet Another dept.:

To further its commitment to the Java Community Process (JCP), Oracle has submitted the first of two Java Specification Requests (JSRs) to update and revitalize the JCP.

10 Nov 2011 6:01am GMT

OSDir.com - Java: No copied Java code or weapons of mass destruction found in Android

From the Fact Checking dept.:

ZDNET: Sometimes the sheer wrongness of what is posted on the web leaves us speechless. Especially when it's picked up and repeated as gospel by otherwise reputable sites like Engadget. "Google copied Oracle's Java code, pasted in a new license, and shipped it," they reported this morning.



Sorry, but that just isn't true.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Released

From the Grande dept.:

Oracle today announced the availability of Java Platform, Standard Edition 7 (Java SE 7), the first release of the Java platform under Oracle stewardship.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Java SE 7 Passes JCP

From the Jitters dept.:

The next edition of Java has been approved by a Java Community Process executive committee, but not without some acrimony.

10 Nov 2011 6:01am GMT

OSDir.com - Java: JDK 7 RC1 Released

From the JDK dept.:

After an initial round of testing we've declared build 147 to be the first Release Candidate of JDK 7.



There are only thirteen changes in this build. Over half of them are administrivial updates that don't affect the actual code; the remainder are true showstoppers, including several hard VM crashes and a JIT correctness bug identified by an Eclipse unit test.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Google Files Sizzling Answer to Oracle's Amended Java Complaint

From the Counter dept.:

Google has filed its answer to Oracle's amended complaint and its memorandum opposing Oracle's Motion to Dismiss. And we find out why Google didn't just roll over and pay Oracle for a license. Oracle asked in its motion to dismiss that the counterclaims alleging that Oracle's patents are invalid be dismissed. So Google explains more thoroughly why it believes they are in fact invalid. First, Google asserts:



Each of the Patents-in-Suit is invalid under 35 U.S.C. § 101 because one or more claims are directed to abstract ideas or other non-statutory subject matter.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache loses Java showdown vote to Oracle

From the Dis Harmony dept.:

The Apache Software Foundation - one of tech's most influential open-source groups - is closer to quitting Java's governing body after losing a stand-off vote against Oracle on Java.



The Reg has learned that with 75 per cent of qualifying Java Community Process (JCP) members having voted on whether to ratify Oracle's proposed roadmap for Java 7 and 8, Oracle's plan has been accepted.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Software Foundation Resigns from Java Community Process

From the So Long dept.:

The Apache Software Foundation has resigned its seat on the Java SE/EE Executive Committee. Apache has served on the EC for the past 10 years, winning the JCP "Member of the Year" award 4 times, and recently was ratified for another term with support from 95% of the voting community. Further, the project communities of the ASF, home to Apache Tomcat, Ant, Xerces, Geronimo, Velocity and nearly a 100 mainstay java components have implemented countless JSRs and serve on and contribute to many of the JCPs technical expert groups.



We'd like to provide some explanation to the community as to why we're taking this significant step.



The recent Java SE 7 vote was the last chance for the JCP EC to demonstrate that the EC has any intent to defend the JCP as an open specification process, and demonstrate that the letter and spirit of the law matter. To sum up the issues at stake in the vote, we believe that while continuing to fail to uphold their responsibilities under the JSPA, Oracle provided the EC with a Java SE 7 specification request and license that are self-contradictory, severely restrict distribution of independent implementations of the spec, and most importantly, prohibit the distribution of independent open source implementations of the spec. Oracle has refused to answer any reasonable and responsible questions from the EC regarding these problems.

10 Nov 2011 6:01am GMT

OSDir.com - Java: Apache Discontinues Independent Java Implementation 'Harmony'

From the DisHarmony dept.:

After the resignation of Apache from the Java SE/EE Executive Committee, the time has now come for Harmony to be added to the Apache Attic. Harmony was 'the project to produce an open source cleanroom implementation of Java.' An open vote was taken within the Project Management Committee, which resulted in a 20-2 majority to discontinue development.

10 Nov 2011 6:01am GMT

Javable: YourKit Java Profiler 7.0 released

The major update to YourKit Java Profiler has been released. Version 7.0 includes

10 Nov 2011 6:01am GMT

Javable: Sun phases out mobile Java

Sun will gradually phase out mobile Java (Java Micro Edition) and move respective services to Standard Edition. "We're trying to converge

10 Nov 2011 6:01am GMT

Javable: Google Android SDK is available

The development kit and API for Google mobile platform, Android, has been released.

10 Nov 2011 6:01am GMT

Javable: Consumer JRE Early Access

Sun has started an early access program to Java SE 6 Update N (formerly known as the "Consumer

10 Nov 2011 6:01am GMT

Javable: NetBeans 6.0 released

New version of pure Java IDE has been released, with support for many new

10 Nov 2011 6:01am GMT

Javable: Happy New Year!

We wish a Happy New Year to all our readers and contributers. Hope to see you all in 2008.

10 Nov 2011 6:01am GMT