<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Denis Magda on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/author/denis-magda/</link><description>Articles written by Denis Magda on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 27 Apr 2023 14:18:45 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/author/denis-magda/index.xml" rel="self" type="application/rss+xml"/><item><title>Creating Scalable OpenAI GPT Applications in Java</title><link>https://foojayio.github.io/website/today/creating-scalable-openai-gpt-applications-in-java/</link><pubDate>Thu, 27 Apr 2023 14:18:45 +0000</pubDate><guid>https://foojayio.github.io/website/today/creating-scalable-openai-gpt-applications-in-java/</guid><description>&lt;p&gt;One of the more notable aspects of ChatGPT is its engine, which not only powers the web-based chatbot but can also be integrated into your Java applications.&lt;/p&gt;
&lt;p&gt;Whether you prefer reading or watching, let&amp;rsquo;s review how to start using the OpenAI GPT engine in your Java projects in a scalable way, by sending prompts to the engine only when necessary:&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/8bpIXrz7xJw?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;

&lt;br /&gt;
&lt;p&gt;Imagine you want to visit a city and have a specific budget in mind. How should you spend the money and make your trip memorable? This is an excellent question to delegate to the OpenAI engine.&lt;/p&gt;</description></item><item><title>How to Best Use Java Records as DTOs in Spring Boot 3</title><link>https://foojayio.github.io/website/today/how-to-best-use-java-records-as-dtos-in-spring-boot-3/</link><pubDate>Thu, 09 Mar 2023 17:06:46 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-to-best-use-java-records-as-dtos-in-spring-boot-3/</guid><description>&lt;p&gt;With the Spring 6 and Spring Boot 3 releases, &lt;a href="https://spring.io/blog/2022/11/16/spring-framework-6-0-goes-ga" title="Java 17&amp;#43; became the baseline framework" target="_blank" rel="noopener noreferrer"&gt;Java 17+ became the baseline framework&lt;/a&gt;
 version.&lt;/p&gt;
&lt;p&gt;So now is a great time to start using compact &lt;a href="https://docs.oracle.com/en/java/javase/14/language/records.html" title="Java Records" target="_blank" rel="noopener noreferrer"&gt;Java Records&lt;/a&gt;
 as Data Transfer Objects (&lt;a href="https://en.wikipedia.org/wiki/Data_transfer_object" title="DTOs" target="_blank" rel="noopener noreferrer"&gt;DTOs&lt;/a&gt;
) for various database and API calls.&lt;/p&gt;
&lt;p&gt;Whether you prefer reading or watching, let&amp;rsquo;s review a few approaches for using Java records as DTOs that apply to Spring Boot 3 with Hibernate 6 as the persistence provider.&lt;/p&gt;</description></item><item><title>How Java Litters Beyond the Heap: Solid-State Drives</title><link>https://foojayio.github.io/website/today/how-java-litters-beyond-the-heap-part-3-solid-state-drives/</link><pubDate>Fri, 27 Jan 2023 10:54:47 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-java-litters-beyond-the-heap-part-3-solid-state-drives/</guid><description>&lt;p&gt;A Java application dutifully executes your logic, leaving behind footprints in the Java heap in the form of dead objects.&lt;/p&gt;
&lt;p&gt;A garbage collector will then step in and clean out the memory for the new data. This cycle repeats until the app is stopped. This is well known.&lt;/p&gt;
&lt;p&gt;But, the Java heap is one of many places where your app can generate garbage.&lt;/p&gt;
&lt;p&gt;The application can also litter other parts of the software stack. It&amp;rsquo;s not done deliberately, but because some stack components also take advantage of garbage collection.&lt;/p&gt;</description></item><item><title>How Java Litters Beyond the Heap: Distributed Databases</title><link>https://foojayio.github.io/website/today/how-java-litters-beyond-the-heap-part-2-distributed-databases/</link><pubDate>Tue, 20 Dec 2022 11:40:43 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-java-litters-beyond-the-heap-part-2-distributed-databases/</guid><description>&lt;p&gt;&lt;strong&gt;Let&amp;rsquo;s create a simple Java application using a distributed database for the user data and see how the database generates litter in response to application requests.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;While the Java Virtual Machine executes our code at runtime, it generates garbage in the heap, which is dutifully collected by the garbage collector. This is a known fact.&lt;/p&gt;
&lt;p&gt;However, at the same time, Java apps don&amp;rsquo;t live in isolation and frequently communicate with services, databases, and other components. Some of those components also generate and collect garbage, while fulfilling the Java app&amp;rsquo;s requests. This is less known.&lt;/p&gt;</description></item><item><title>How Java Litters Beyond the Heap: Relational Databases</title><link>https://foojayio.github.io/website/today/how-java-litters-beyond-the-heap-relational-databases/</link><pubDate>Tue, 29 Nov 2022 19:08:04 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-java-litters-beyond-the-heap-relational-databases/</guid><description>&lt;p&gt;As Java developers, we&amp;rsquo;re no strangers to the concept of garbage collection. Our apps generate garbage all the time, and that garbage is meticulously cleaned out by CMS, G1, Azul C4, and other types of collectors.&lt;/p&gt;
&lt;p&gt;However, the story doesn&amp;rsquo;t end with the Java heap. In fact, it is just the beginning.&lt;/p&gt;
&lt;p&gt;In this article, we will create a simple Java application that uses a relational database for the user data and solid-state drives (SSDs) as a storage device. From here, we&amp;rsquo;ll explore how the application generates garbage at the database and SSD levels, while executing the application logic.&lt;/p&gt;</description></item></channel></rss>