DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Low-Code Development: Leverage low and no code to streamline your workflow so that you can focus on higher priorities.

DZone Security Research: Tell us your top security strategies in 2024, influence our research, and enter for a chance to win $!

Launch your software development career: Dive head first into the SDLC and learn how to build high-quality software and teams.

Open Source Migration Practices and Patterns: Explore key traits of migrating open-source software and its impact on software development.

Core Badge
Avatar

Denis Magda

DZone Core CORE

Head of DevRel at Yugabyte

Tampa, US

Joined May 2015

About

Learned Java from the inside while developing JVM & JDK for years. Then joined the world of distributed systems and databases, where remained ever since.

Stats

Reputation: 1760
Pageviews: 472.1K
Articles: 46
Comments: 12

Expertise

Databases Expertise Icon

Databases

  • Articles
  • Comments

Articles

article thumbnail
When Should You Use Distributed PostgreSQL for Gen AI Apps?
In this article, explore when gen AI applications should use distributed PostgreSQL deployments.
June 7, 2024
· 3,419 Views · 1 Like
article thumbnail
Creating AI Data Analyst With DBeaver
This article walks through the steps of creating an AI data analyst using DBeaver, allowing human data analysts to focus on more sophisticated tasks.
March 12, 2024
· 2,581 Views · 1 Like
article thumbnail
Streaming the Super Bowl: The Art of Scaling Across Multiple Cloud Regions
In this tutorial, learn to build multi-region applications that scale and tolerate all sorts of possible outages.
March 4, 2024
· 2,114 Views · 2 Likes
article thumbnail
Getting Started With Spring AI and PostgreSQL PGVector
Learn to build generative AI applications in Java from scratch using Spring AI and PostgreSQL pgvector.
January 24, 2024
· 8,102 Views · 8 Likes
article thumbnail
PostgresML: Extension That Turns PostgreSQL Into a Platform for AI Apps
Learn how to use the PostgresML extension for text translation, sentiment analysis, and other AI-related tasks within PostgreSQL.
December 27, 2023
· 4,858 Views · 3 Likes
article thumbnail
PostgreSQL as a Vector Database: Getting Started and Scaling
In this article, learn how to build and scale a sample Airbnb recommendation service using PostgreSQL as a vector database.
December 25, 2023
· 10,599 Views · 8 Likes
article thumbnail
Sample Data Generation With Built-In Database Capabilities
Learn how to use special functions, hierarchical queries, and common table expressions to generate sample data in PostgreSQL, Oracle, MySQL, and SQL Server.
November 10, 2023
· 3,605 Views · 3 Likes
article thumbnail
Hello YugabyteDB: Running Kong on the Distributed PostgreSQL Database
This guide demonstrates how to eliminate this final bottleneck by running Kong on YugabyteDB, a distributed SQL database built on PostgreSQL.
November 3, 2023
· 4,599 Views · 3 Likes
article thumbnail
Getting Started With Postgres: Three Free and Easy Ways
In this article, explore three practical, user-friendly, and absolutely free ways to kickstart your PostgreSQL journey.
August 11, 2023
· 7,124 Views · 7 Likes
article thumbnail
Using Spring Cloud Gateway and Discovery Service for Seamless Request Routing
In this tutorial, learn how to route requests between Java microservices with Spring Cloud Gateway and Discovery Service.
August 4, 2023
· 13,457 Views · 7 Likes
article thumbnail
Kubernetes Evolution: Transitioning from etcd to Distributed SQL
This tutorial explores how to replace etcd in Kubernetes with a distributed SQL database using Kine.
July 28, 2023
· 12,808 Views · 1 Like
article thumbnail
How To Use Terraform to Provision and Configure Distributed YugabyteDB Clusters
In this tutorial, explore how to use Terraform to effectively provision and configure distributed YugabyteDB Managed clusters.
June 29, 2023
· 5,434 Views · 2 Likes
article thumbnail
How To Use Geo-Partitioning to Comply With Data Regulations and Deliver Low Latency Globally
Read a geo-partitioning guide to deploying a YugabyteDB Managed database cluster and optimizing data distribution across regions.
June 2, 2023
· 5,607 Views · 2 Likes
article thumbnail
Getting Started With the YugabyteDB Managed REST API
In this article, learn how to generate an API key, list existing clusters, create a new cluster, and stream market orders into the cluster.
May 29, 2023
· 10,428 Views · 1 Like
article thumbnail
Improve Application Latency With Read Replicas Using YugabyteDB [Video]
Learn how to optimize read latency for users worldwide by utilizing YugabyteDB's read replica nodes. Achieve scalability and low latency for real-time data.
May 15, 2023
· 4,107 Views · 2 Likes
article thumbnail
Creating Scalable OpenAI GPT Applications in Java
In this tutorial, learn how to integrate the ChatGPT engine into your Java applications in a scalable way by sending prompts to the engine only when necessary.
April 3, 2023
· 20,115 Views · 9 Likes
article thumbnail
How To Best Use Java Records as DTOs in Spring Boot 3
Explore how to best use compact Java records as DTOs for database and API calls in Spring Boot 3 with Hibernate 6 as the persistence provider.
February 25, 2023
· 35,890 Views · 14 Likes
article thumbnail
Quick Pattern-Matching Queries in PostgreSQL and YugabyteDB
In this article, learn about optimizing pattern-matching requests in PostgreSQL and YugabyteDB by applying several indexing strategies.
February 1, 2023
· 3,251 Views · 1 Like
article thumbnail
The Generic Way To Convert Between Java and PostgreSQL Enums
Review the generic way of converting between Java and PostgreSQL enums, utilizing the cast operator of PostgreSQL.
December 27, 2022
· 14,609 Views · 4 Likes
article thumbnail
Run Java Microservices Across Multiple Cloud Regions With Spring Cloud
Let’s explore how to develop and deploy multi-region Java microservices with Spring Cloud and why you want to do so.
December 6, 2022
· 6,406 Views · 8 Likes
article thumbnail
When To Use the @DynamicUpdate With Spring Data JPA
Explore a few scenarios to use @DynamicUpdate with Spring Data JPA. Different classes of databases are highlighted, including PostgreSQL and YugabyteDB.
November 21, 2022
· 19,119 Views · 9 Likes
article thumbnail
How To Set Up a Scalable and Highly-Available GraphQL API in Minutes
This article shows how to set up a GraphQL layer (with an underlying database) across multiple availability zones of a public cloud region in minutes.
Updated November 18, 2022
· 3,038 Views · 2 Likes
article thumbnail
What Developers Need to Know About Table Geo-Partitioning
We’ll experiment with the table geo-partitioning feature of PostgreSQL that automatically distributes application data across multiple locations.
Updated November 16, 2022
· 8,019 Views · 3 Likes
article thumbnail
Lessons Learned Moving From On-Prem to Cloud Native
See how to move a sample ecommerce app from an on-premise architecture to a cloud-native one, using YugabyteDB database, Hasura Cloud, and Vercel.
Updated November 16, 2022
· 3,170 Views · 4 Likes
article thumbnail
What Developers Need to Know About Table Partition Pruning
An overview and some solid tips for optimizing your table partitions.
Updated November 15, 2022
· 4,748 Views · 2 Likes
article thumbnail
What Java Developers Need to Know About Geo-Distributed Databases
A helpful launchpad for connectivity and CRUD operations geo-distributed DBs in Java.
Updated November 7, 2022
· 5,110 Views · 8 Likes
article thumbnail
Geo-Distributed Microservices and Their Database: Fighting the High Latency
As my geo-distributed app development journey ends, let’s look at several database multi-region deployment options to keep the read and write latency low no matter the user’s location.
October 31, 2022
· 11,548 Views · 5 Likes
article thumbnail
Using Global Cloud Load Balancer to Route User Requests to App Instances
A geo-distributed messenger application development journey continues: my next challenge is forwarding application requests to the instance closest to the user.
October 20, 2022
· 4,993 Views · 3 Likes
article thumbnail
Geo-Distributed API Layer With Kong Gateway
Learn how to build a geo-distributed API layer with Kong Gateway.
October 11, 2022
· 8,482 Views · 3 Likes
article thumbnail
Automating Java Application Deployment Across Multiple Cloud Regions
Was I able to deploy several geo-messenger instances across multiple cloud regions? The geo-distributed messenger application development journey continues.
August 29, 2022
· 7,906 Views · 4 Likes

Comments

Getting Started With Spring AI and PostgreSQL PGVector

Feb 05, 2024 · Denis Magda

Hey, here is a complete application that uses Spring AI, Postgres pgvector, and OpenaAI:
https://github.com/YugabyteDB-Samples/YugaPlus


One note, the article shows how to use both ChatClient and EmbeddingClient in the article. The app uses only the latter.

Let me know if you have any questions.

How To Best Use Java Records as DTOs in Spring Boot 3

Mar 04, 2023 · Denis Magda

> BTW OLTP applications should not fetch 1000s of records at once!

I meant 1000s of user requests per second that fetch 1000s or more records via an app and database instance.

Imagine, that your entity has 10 fields of variable size while an API call needs only 3 of them. The app will be wasting database, network, and backend resources by fetching and transferring 7 fields that nobody needs. If those 7 fields consume 40 bytes, then every second 40KB of garbage (1000 requests X 40 bytes = 40KB) will be fetched and transferred over the network. If those fields' size is 100 bytes, then the app fetches 1000 requests X 100 bytes = 100KB of garbage every second. And that's just for a single API call. While there are usually many more API calls of this kind.

So, IMO, it's not about micro-optimization but about a scalable and efficient architecture that is especially important for the public cloud where you pay for every transferred byte of data and CPU cycle.

How To Best Use Java Records as DTOs in Spring Boot 3

Mar 03, 2023 · Denis Magda

Hey Sergio,

It depends on the application load - how many entities per second an app needs to fetch from a database. For instance, if it's just 10 entities per second, then certainly, the suggested optimizations might be overkill. But if the app needs to fetch 100s or 1000s of records per second, then the less you retrieve from the database, the better.

Also, consider another example when you need to get a list of items from the database - getting a list of Entities and then converting it to a list of DTOs/Records might have a noticeable performance impact (again, depends on the app load).

The Generic Way To Convert Between Java and PostgreSQL Enums

Jan 04, 2023 · Denis Magda

Yeap, the check constraint is one of the alternate solutions here. Both the constraints and enums are used in the wild for various reasons. And this article is solely for those who went forward with enums.

When To Use the @DynamicUpdate With Spring Data JPA

Nov 24, 2022 · Denis Magda

I do see the method used frequently, especially by beginners. Probably, because it is used in many getting-started tutorials and learning materials.

The more skillful you become, the more you turn to various optimization techniques like the one mentioned by you (findById()->managed entity->update it in place and it will get persisted), or @DynamicUpdate, or native queries, etc. Personally, I'm a big fan of native queries.

Various use cases and various options.

The Distributed Data Problem

Nov 21, 2022 · Pieter Humphrey

For big enterprises or apps/services with a global customer base, multi-region deployments are crucial, fully agree - latency, fault-tolerance, and data residency requirements.

At the same time, small and mid-size companies will always be out there. Those might not need distributed databases at the beginning of their journey. They can comfortably seat on Amazon Aurora, Google AlloyDB or Neon that function across multiple AZs, boost reads via read replicas, and can withstand AZ-level outages. For such companies, 65ms roundtrip latency from the West to East cost is not usually a big deal.

And it's fair to mention that relational databases evolved in the last decade. There is a class of distributed SQL databases (distributed RBDMS - Google Spanner, CockroachDB, YugabyteDB) that are architected to function across multiple availability zones and regions. So, it's no longer the territory just of NoSQL. SQL and NoSQL are merging: https://dzone.com/articles/exploring-multi-region-database-deployment-options

Running Microservices on Top of In-Memory Data Grid: Part II

Mar 29, 2017 · Dmitriy Setrakyan

Hi Rabi, sorry for a delayed reply. Feel free to send messages to Apache Ignite user list regarding the post or directly to me at dmagda@apache.org.

The request will be forwarded to the other service instance that is still alive.

Running Microservices on Top of In-Memory Data Grid: Part I

Jan 18, 2017 · Dmitriy Setrakyan

For those who are interested. The second part has been published. Enjoy:

https://dzone.com/articles/running-microservices-on-top-of-in-memory-data-gri-1

Apache Ignite With JPA: A Missing Element

Dec 14, 2016 · Shamim Bhuiyan

Added to Apache Ignite blog posts list, thanks!

https://ignite.apache.org/blogs.html


Let us know when you write something new about Ignite and wants your work to be added to Apache Ignite site.

Running Microservices on Top of In-Memory Data Grid: Part I

Dec 13, 2016 · Dmitriy Setrakyan

Alexander, sorry for the delay. Too tough schedule before the holidays. Will do all my best to complete the second part this year.

Apache Ignite With JPA: A Missing Element

Dec 13, 2016 · Shamim Bhuiyan

Truly useful blog post. Don't you mind it will be added to the blogs list of Apache Ignite community?

https://ignite.apache.org/blogs.html


It would be great if you write a message to Apache Ignite community regarding this or I can add a reference to the post there.

Running Microservices on Top of In-Memory Data Grid: Part I

Nov 08, 2016 · Dmitriy Setrakyan

Thanks, I'll be working on the next part in the nearest time.

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: