<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mongo on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/category/mongo/</link><description>Recent content in Mongo on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 23 Jul 2026 19:20:44 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/category/mongo/index.xml" rel="self" type="application/rss+xml"/><item><title>Aggregation Optimization in MongoDB: Unnecessary Unwinds (Part 2)</title><link>https://foojayio.github.io/website/today/aggregation-optimization-in-mongodb-unnecessary-unwinds-part-2/</link><pubDate>Thu, 25 Jun 2026 10:01:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/aggregation-optimization-in-mongodb-unnecessary-unwinds-part-2/</guid><description>&lt;h2 id="h2-0-and-why-mongodb-might-be-a-better-relational-database-than-you-ever-realized"&gt;And why MongoDB might be a better relational database than you ever realized.&lt;/h2&gt;
&lt;figure class="wp-block-image size-full is-resized"&gt;
 &lt;img fetchpriority="high" decoding="async" width="700" height="307" src="tue11.png" alt="" class="wp-image-124328" style="aspect-ratio:2.2802192518511397;width:840px;height:auto"&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;a href="https://www.mongodb.com/events/mongodb-schema-design-reviews/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=agg-part2-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;&lt;em&gt;Design reviews&lt;/em&gt;&lt;/a&gt;
&lt;em&gt;are one-on-one meetings where MongoDB experts deliver advice on data modeling best practices and application design challenges. In this series, we are going to explore common real-life scenarios where design reviews helped developers achieve meaningful success with MongoDB.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This article was written by Graeme Robinson. Find him on&lt;/em&gt; &lt;a href="https://www.linkedin.com/in/graemecrobinson" target="_blank" rel="noopener noreferrer"&gt;&lt;em&gt;LinkedIn&lt;/em&gt;&lt;/a&gt;
&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://foojayio.github.io/website/today/aggregation-optimization-in-mongodb-a-case-study-from-the-field-part-1/"&gt;In Part 1 of this series&lt;/a&gt;
, we described a use case based on a recent design review I conducted with a team at a MongoDB customer. The team in question was new to MongoDB, and the approach they had taken to both modeling their data and then subsequently querying it was very &amp;ldquo;RDBMS-like.&amp;rdquo; As a result, query performance was significantly slower than their SLA called for.&lt;/p&gt;</description></item><item><title>Aggregation Optimization in MongoDB: A Case Study From the Field (Part 1)</title><link>https://foojayio.github.io/website/today/aggregation-optimization-in-mongodb-a-case-study-from-the-field-part-1/</link><pubDate>Tue, 23 Jun 2026 13:17:32 +0000</pubDate><guid>https://foojayio.github.io/website/today/aggregation-optimization-in-mongodb-a-case-study-from-the-field-part-1/</guid><description>&lt;h2 id="h2-0-and-why-mongodb-might-be-a-better-relational-database-than-you-ever-realized"&gt;And why MongoDB might be a better relational database than you ever realized.&lt;/h2&gt;
&lt;figure class="wp-block-image size-full is-resized"&gt;
 &lt;img fetchpriority="high" decoding="async" width="700" height="307" src="tue11.png" alt="" class="wp-image-124328" style="width:840px;height:auto"&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;em&gt;This article was written by Graeme Robinson. Find him on&lt;/em&gt; &lt;a href="https://www.linkedin.com/in/graemecrobinson" target="_blank" rel="noopener noreferrer"&gt;&lt;em&gt;LinkedIn&lt;/em&gt;&lt;/a&gt;
&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.mongodb.com/events/mongodb-schema-design-reviews/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=foojay.io&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;&lt;em&gt;Design reviews&lt;/em&gt;&lt;/a&gt;
&lt;em&gt;are one-on-one meetings where MongoDB experts deliver advice on data modeling best practices and application design challenges. In this series, we are going to explore common real-life scenarios where design reviews helped developers achieve meaningful success with MongoDB.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
&lt;p&gt;MongoDB is often described as a non-relational database, but whenever we store data in a database, there are relationships within that data. Depending on the type of database we use, though, how we model those relationships may change. As my colleague Rick Houlihan &lt;a href="https://www.youtube.com/watch?v=ThmU8a2eVnw" target="_blank" rel="noopener noreferrer"&gt;has often pointed out&lt;/a&gt;
, there really is no such thing as non-relational data.&lt;/p&gt;</description></item><item><title>Building an AI-Powered Operations Assistant with Spring AI and MongoDB Atlas — Part 2: Conversational Memory</title><link>https://foojayio.github.io/website/today/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-2-conversational-memory/</link><pubDate>Wed, 10 Jun 2026 19:23:46 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-2-conversational-memory/</guid><description>&lt;p&gt;This is the second article in a three-part series. Part 1 covered the RAG foundation &amp;mdash; loading runbooks into a vector store and wiring them to a language model. Part 3 will introduce stateful workflow checkpointing with pause and resume.&lt;/p&gt;
&lt;h2 id="h2-0-the-problem-with-stateless-chat"&gt;The Problem with Stateless Chat&lt;/h2&gt;
&lt;p&gt;In the first part of the series, we successfully created a chat interface where an operator can ask questions and receive answers based on the actual content of the runbooks they have uploaded and embedded in the system. For example, they can ask in the chat, &amp;ldquo;&lt;em&gt;What should I check when my server&amp;rsquo;s CPU usage exceeds 80%?&lt;/em&gt;&amp;rdquo; and the assistant retrieves the relevant sections from the various runbooks and assembles a coherent and concrete response.&lt;/p&gt;</description></item><item><title>Introduction to CQRS using MongoDB</title><link>https://foojayio.github.io/website/today/introduction-to-cqrs-using-mongodb/</link><pubDate>Tue, 09 Jun 2026 10:00:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/introduction-to-cqrs-using-mongodb/</guid><description>&lt;p&gt;In enterprise environments, projects often begin with a simple structure: one model, one service, and one document, using a single class and data transfer object for both read and write operations. While this unified approach works at first, it becomes problematic as requirements grow. Operations become more complex, requiring additional validations, rules, and constraints. Over time, read operations may demand different formats, such as aggregations, summaries, or custom views. Relying on a single model for both reading and writing leads to maintenance challenges and inefficient queries. This approach can result in returning unnecessary data or omitting required information, violating the single responsibility principle and making the design less effective.&lt;/p&gt;</description></item><item><title>MongoDB as a Vector Database for AI Agents-MongoDB</title><link>https://foojayio.github.io/website/today/mongodb-as-a-vector-database-for-ai-agents-mongodb/</link><pubDate>Thu, 04 Jun 2026 10:00:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-as-a-vector-database-for-ai-agents-mongodb/</guid><description>&lt;p&gt;Modern artificial intelligence systems are continually evolving. Large Language Models, or LLMs, have become the backbone of modern applications and help build conversational interfaces, like GPS, to more integrated content. However, LLMs lack memory and the capacity to retain content across interactions because they are stateless. And these limitations led to the building of AI agents. These AI agents build beyond simple prompt-response interactions into more autonomous, task-oriented workflows.&lt;/p&gt;
&lt;p&gt;These agents are not just model invocations; rather, they are an orchestration layer that combines reasoning with capabilities like retrieval, memory, and tool execution. While developing these agents, a database with the ability to store and retrieve semantically meaningful data is needed, which is where vector databases come into the picture.&lt;/p&gt;</description></item><item><title>What is Sharding in MongoDB and When Should You Use It?</title><link>https://foojayio.github.io/website/today/what-is-sharding-in-mongodb-and-when-should-you-use-it/</link><pubDate>Tue, 02 Jun 2026 22:15:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/what-is-sharding-in-mongodb-and-when-should-you-use-it/</guid><description>&lt;h3 id="h3-0-a-practical-introduction-to-horizontal-scaling"&gt;&lt;strong&gt;A Practical Introduction to Horizontal Scaling&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;When building applications, most developers start with a &lt;strong&gt;single database server&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;At the beginning, everything works perfectly.&lt;/p&gt;
&lt;p&gt;Your application might have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A few thousand users&lt;/li&gt;
&lt;li&gt;Manageable traffic&lt;/li&gt;
&lt;li&gt;Datasets that easily fit on one machine&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But as your application grows, something interesting starts to happen.&lt;/p&gt;
&lt;p&gt;Queries take longer.&lt;/p&gt;
&lt;p&gt;Write operations slow down.&lt;/p&gt;
&lt;p&gt;The database server starts hitting &lt;strong&gt;CPU, RAM, or storage limits&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;At this stage, many engineers ask an important question:&lt;/p&gt;</description></item><item><title>Exploring MongoT</title><link>https://foojayio.github.io/website/today/exploring-mongot-atlas-search/</link><pubDate>Thu, 28 May 2026 21:02:49 +0000</pubDate><guid>https://foojayio.github.io/website/today/exploring-mongot-atlas-search/</guid><description>&lt;p&gt;Let&amp;rsquo;s explore this fascinating and awesome Java project from MongoDB - MongoT!&lt;/p&gt;
&lt;p&gt;You can check out the source code here:&lt;/p&gt;
&lt;pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""&gt;git clone https://github.com/mongodb/mongot&lt;/pre&gt;
&lt;p&gt;&lt;img src="https://foojayio.github.io/website/today/exploring-mongot-atlas-search/Screenshot-2026-05-08-at-3.17.36-PM-1024x548.png" alt="" loading="lazy"&gt;
&lt;/p&gt;
&lt;p&gt;MongoT is a wrapper around the amazing Java search engine: &lt;a href="https://lucene.apache.org/" target="_blank" rel="noopener noreferrer"&gt;Lucene&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Lucene is a powerful search toolkit built around an inverted token index structure that enables advanced text search capabilities, including ranked results, autocomplete, synonyms, fuzzy matching, highlighting, and faceting &amp;mdash; all with high performance regardless of dataset size. Unlike MongoDB&amp;rsquo;s native query engine, it can efficiently search across multiple indexes simultaneously by intersecting lists of ordinal document IDs in parallel, using optimization techniques like skip-lists, ordinal compression, and document frequency ordering. It also supports indexing of various field types (integers, dates, keywords, etc.) and has expanded into vector search, enabling semantic similarity search by meaning rather than exact text matching.&lt;/p&gt;</description></item><item><title>AI-Powered Code Review Assistant: Automated Code Analysis with Spring AI and MongoDB</title><link>https://foojayio.github.io/website/today/ai-powered-code-review-assistant-automated-code-analysis-with-spring-ai-and-mongodb/</link><pubDate>Thu, 14 May 2026 17:09:39 +0000</pubDate><guid>https://foojayio.github.io/website/today/ai-powered-code-review-assistant-automated-code-analysis-with-spring-ai-and-mongodb/</guid><description>&lt;p&gt;Code reviews catch bugs before they ship, but they take time. Most teams rely on manual review or basic linters that flag syntax issues but miss deeper problems like subtle resource leaks, poor exception handling, or security anti-patterns. Static analysis tools help, but they work with rigid rules that cannot generalize across code variations. A rule that catches &lt;code&gt;catch (Exception e) {}&lt;/code&gt; will miss &lt;code&gt;catch (Throwable t) { return null; }&lt;/code&gt;, even though both are the same underlying problem.&lt;/p&gt;</description></item><item><title>Building an AI-Powered Operations Assistant with Spring AI and MongoDB Atlas — Part 1: RAG Foundation</title><link>https://foojayio.github.io/website/today/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-1-rag-foundation/</link><pubDate>Thu, 07 May 2026 19:22:11 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-an-ai-powered-operations-assistant-with-spring-ai-and-mongodb-atlas-part-1-rag-foundation/</guid><description>&lt;p&gt;This is the first article in a three-part series. Part 2 covers short-term and long-term memory; Part 3 introduces stateful workflow checkpointing with pause/resume.&lt;/p&gt;
&lt;h2 id="h2-0-the-problem"&gt;The problem&lt;/h2&gt;
&lt;p&gt;It&amp;rsquo;s 2 a.m. Suddenly, an alert pops up indicating abnormal CPU usage on the payment services. The on-call engineer opens their laptop, logs into the monitoring dashboards, and begins the hunt. One by one, he searches the runbooks on Confluence, checks the Slack chats, and opens the GitHub wikis and documents shared during the design phase. By the time he finds any useful information, ten minutes have already passed.&lt;/p&gt;</description></item><item><title>When Should You Use a Cache With MongoDB?</title><link>https://foojayio.github.io/website/today/when-should-you-use-a-cache-with-mongodb/</link><pubDate>Tue, 05 May 2026 15:23:30 +0000</pubDate><guid>https://foojayio.github.io/website/today/when-should-you-use-a-cache-with-mongodb/</guid><description>&lt;p&gt;From time to time, I&amp;rsquo;ll run a &lt;a href="https://www.mongodb.com/events/mongodb-schema-design-reviews/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=cache-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;design review&lt;/a&gt;
 for an application being migrated from a relational database onto MongoDB, where the customer shares an architectural diagram showing a caching layer (typically Redis) sitting between the app server and MongoDB.&lt;/p&gt;
&lt;p&gt;I like to keep the architecture as simple as possible&amp;mdash;after all, each layer brings its own complexity and management costs&amp;mdash;so I&amp;rsquo;ll ask why the caching layer is there. Of course, the answer is always that it&amp;rsquo;s there to speed up data access. This reveals a misunderstanding of both the reason why caching layers were created and what MongoDB provides.&lt;/p&gt;</description></item><item><title>Large-Scale ETL Pipeline Architecture</title><link>https://foojayio.github.io/website/today/large-scale-etl-pipeline-architecture/</link><pubDate>Fri, 01 May 2026 19:23:04 +0000</pubDate><guid>https://foojayio.github.io/website/today/large-scale-etl-pipeline-architecture/</guid><description>&lt;p&gt;Modern data-driven systems. ETL pipelines are no longer simply scheduled background processes that run silently overnight, one after another. They are the backbone of real-time analytics, powering operational dashboards and recommendation systems. They enable machine learning workflows.&lt;/p&gt;
&lt;p&gt;This evolution, while creating enormous benefits, has&amp;mdash;with the increase in data volume and the decrease in latency tolerance&amp;mdash;called into question the traditional sequential ETL approach. A bottleneck for the speed is now required.&lt;/p&gt;</description></item><item><title>Building a Personalized Content Delivery System</title><link>https://foojayio.github.io/website/today/building-a-personalized-content-delivery-system/</link><pubDate>Thu, 23 Apr 2026 15:10:45 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-a-personalized-content-delivery-system/</guid><description>&lt;p&gt;Recommendation engines have a reputation for requiring specialized ML infrastructure: matrix factorization pipelines, training jobs, and model serving layers. That is one way to do it, but not the only way. If your data already lives in MongoDB and your application runs on Spring Boot, you can build a practical recommendation system using tools you already have. MongoDB aggregation pipelines handle the scoring math server-side, and Atlas Vector Search adds semantic matching without a separate vector database.&lt;/p&gt;</description></item><item><title>Distributed Cache Invalidation Patterns</title><link>https://foojayio.github.io/website/today/distributed-cache-invalidation-patterns/</link><pubDate>Tue, 21 Apr 2026 13:52:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/distributed-cache-invalidation-patterns/</guid><description>&lt;p&gt;Caching is one of the most powerful tools developers have at their disposal for optimizing application performance. Caching systems can significantly reduce latency and reduce the load on databases or external systems by storing frequently accessed data as close as possible to the application layer. The result? Improved responsiveness and overall system usability.&lt;/p&gt;
&lt;p&gt;In small monolithic applications, cache management is usually very simple. A service retrieves data from a database, stores it in memory, and fulfills subsequent requests by retrieving the data directly from the cache. When the data changes, the cache key is invalidated or updated.&lt;/p&gt;</description></item><item><title>CQRS in Java: Separating Reads and Writes Cleanly</title><link>https://foojayio.github.io/website/today/cqrs-in-java-separating-reads-and-writes-cleanly/</link><pubDate>Thu, 16 Apr 2026 20:25:28 +0000</pubDate><guid>https://foojayio.github.io/website/today/cqrs-in-java-separating-reads-and-writes-cleanly/</guid><description>&lt;h3 id="h3-0-what-you-ll-learn"&gt;What you&amp;rsquo;ll learn&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;How the MongoDB Spring repository can be used to abstract MongoDB operations&lt;/li&gt;
&lt;li&gt;Separating Reads and Writes in your application&lt;/li&gt;
&lt;li&gt;How separating these can make schema design changes easier&lt;/li&gt;
&lt;li&gt;Why you should avoid save() and saveAll() functions in Spring&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Command Query Responsibility Segregation (CQRS) pattern is a design method that segregates data access into separate services for reading and writing data. This allows a higher level of maintainability in your applications, especially if the schema or requirements change frequently. This pattern was originally developed with separate read and write sources in mind. However, implementing CQRS for a single data source is an effective way to abstract data from the application and make maintenance easier in the future. In this blog, we will use Spring Boot with MongoDB in order to create a CQRS pattern-based application.&lt;/p&gt;</description></item><item><title>Building a Kotlin App with Spring Boot and MongoDB Search</title><link>https://foojayio.github.io/website/today/building-a-kotlin-app-with-spring-boot-and-mongodb-search/</link><pubDate>Thu, 09 Apr 2026 15:21:05 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-a-kotlin-app-with-spring-boot-and-mongodb-search/</guid><description>&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/b0dkQYcvBkQ?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;p&gt;One of my favorite activities is traveling and exploring the world. You know that feeling of discovering a new place and thinking, &amp;ldquo;How have I not been here before?&amp;rdquo; It&amp;rsquo;s with that sensation that I&amp;rsquo;m always motivated to seek out new places to discover. Often, when searching for a place to stay, we&amp;rsquo;re not entirely sure what we&amp;rsquo;re looking for or what experiences we&amp;rsquo;d like to have. For example, we might want to rent a room in a city with a view of a castle. Finding something like that can seem difficult, right? However, there is a way to search for information accurately using MongoDB Search.&lt;/p&gt;</description></item><item><title>Manage HTTP Sessions with Spring Session MongoDB</title><link>https://foojayio.github.io/website/today/building-distributed-http-sessions-with-spring-session-mongodb/</link><pubDate>Tue, 07 Apr 2026 15:19:10 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-distributed-http-sessions-with-spring-session-mongodb/</guid><description>&lt;p&gt;&lt;a href="https://www.mongodb.com/docs/drivers/java/sync/current/integrations/spring-session/?utm_campaign=devrel&amp;amp;utm_source=third-part-content&amp;amp;utm_medium=cta&amp;amp;utm_content=spring&amp;#43;sessions&amp;#43;mongodb&amp;amp;utm_term=tim.kelly" target="_blank" rel="noopener noreferrer"&gt;Spring Session MongoDB&lt;/a&gt;
 is a library that enables Spring applications to store and manage HTTP session data in MongoDB rather than relying on container-specific session storage. In traditional deployments, session state is often tied to a single application instance, which makes scaling across multiple servers difficult. By integrating &lt;a href="https://spring.io/projects/spring-session" target="_blank" rel="noopener noreferrer"&gt;Spring Session&lt;/a&gt;
 with MongoDB, session data can be persisted beyond application restarts and shared across instances in a cluster, enabling scalable distributed applications with minimal configuration.&lt;/p&gt;</description></item><item><title>Java Faceted Full-Text Search API Using MongoDB Atlas Search</title><link>https://foojayio.github.io/website/today/java-faceted-full-text-search-api-using-mongodb-atlas-search/</link><pubDate>Thu, 02 Apr 2026 16:27:30 +0000</pubDate><guid>https://foojayio.github.io/website/today/java-faceted-full-text-search-api-using-mongodb-atlas-search/</guid><description>&lt;p&gt;This is going to be a fun, practical tutorial demonstrating how to build a Java faceted full-text search API (like the ones powering sites like Amazon)!&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ll use an interesting dataset which showcases how you can effectively pair machine learning/AI-generated data with more traditional search to produce fast, cheap, repeatable, and intuitive search engines.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;: If you (like me!) are less about words and more about code, you can jump straight in. Check it out and run it locally like this:&lt;/p&gt;</description></item><item><title>MongoDB Search Score Breakdown</title><link>https://foojayio.github.io/website/today/mongodb-search-score-breakdown/</link><pubDate>Tue, 31 Mar 2026 15:05:08 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-search-score-breakdown/</guid><description>&lt;p&gt;Full-text search powers all of our digital lives &amp;mdash; googling for this and that; asking Siri where to find a tasty, nearby dinner; shopping at Amazon; and so on. We receive relevant results, often even in spite of our typos, voice transcription mistakes, or vaguely formed queries. We have grown accustomed to expecting the best results for our searching intentions, right there, at the top.&lt;/p&gt;
&lt;p&gt;But now it&amp;rsquo;s your turn, dear developer, to build the same satisfying user experience into your Atlas-powered application.&lt;/p&gt;</description></item><item><title>Modeling One-to-Many Relationships in Java with MongoDB</title><link>https://foojayio.github.io/website/today/modeling-one-to-many-relationships-in-java-with-mongodb/</link><pubDate>Thu, 26 Mar 2026 15:50:30 +0000</pubDate><guid>https://foojayio.github.io/website/today/modeling-one-to-many-relationships-in-java-with-mongodb/</guid><description>&lt;p&gt;In a relational database, modeling a one-to-many relationship is straightforward: you create two tables and connect them with a foreign key. When you need the data together, you write a JOIN. In MongoDB, you have a choice, and that choice has a direct impact on your application&amp;rsquo;s performance, scalability, and maintainability.&lt;/p&gt;
&lt;p&gt;Consider a common scenario: a BlogPost that has many Comment objects. In Java, this is a natural List&amp;lt;Comment&amp;gt; field on the post. But when it comes time to persist that relationship in MongoDB, you need to decide &lt;em&gt;how&lt;/em&gt; to store it. Should the comments live inside the blog post document? Or should they sit in their own collection, connected by references?&lt;/p&gt;</description></item><item><title>Clean Architecture with Spring Boot and MongoDB</title><link>https://foojayio.github.io/website/today/clean-architecture-with-spring-boot-and-mongodb/</link><pubDate>Tue, 24 Mar 2026 16:43:14 +0000</pubDate><guid>https://foojayio.github.io/website/today/clean-architecture-with-spring-boot-and-mongodb/</guid><description>&lt;p&gt;Most Spring Boot tutorials tightly wire everything together. Controllers call services, services call repositories, and MongoDB annotations like &lt;code&gt;@Document&lt;/code&gt; and &lt;code&gt;@Field&lt;/code&gt; sit right next to your business logic. It works until you need to swap the database, test logic in isolation, or reuse domain rules in a different context.&lt;/p&gt;
&lt;p&gt;Clean Architecture enforces one rule: source code dependencies always point inward. Your business logic never imports Spring or MongoDB classes. The database becomes a pluggable detail at the outermost layer, something you can replace without rewriting core application code.&lt;/p&gt;</description></item><item><title>Building Reactive Data Streams with Project Reactor</title><link>https://foojayio.github.io/website/today/building-reactive-data-streams-with-project-reactor/</link><pubDate>Thu, 19 Mar 2026 15:13:31 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-reactive-data-streams-with-project-reactor/</guid><description>&lt;h2 id="h2-0-creating-non-blocking-streaming-endpoints-for-high-throughput-applications"&gt;Creating Non-Blocking Streaming Endpoints for High-Throughput Applications&lt;/h2&gt;
&lt;p&gt;There are problems that only occur in production. Or rather, we only notice them in production.&lt;/p&gt;
&lt;p&gt;We have created an application that exposes clean APIs, according to all standards. You have modeled the domain elegantly and efficiently: all load tests show reassuring data. CPU usage is reasonable, to say the least. However, there is a problem: when traffic exceeds a threshold, the system slows down. Response time latency becomes inconsistent; threads stack up on top of each other. Response times increase unpredictably, and application customers begin to complain about this situation.&lt;/p&gt;</description></item><item><title>Language Learning Flashcard System - Part 1</title><link>https://foojayio.github.io/website/today/language-learning-flashcard-system-part-1/</link><pubDate>Tue, 17 Mar 2026 16:39:58 +0000</pubDate><guid>https://foojayio.github.io/website/today/language-learning-flashcard-system-part-1/</guid><description>&lt;p&gt;My native language is Spanish. I&amp;rsquo;ve been learning (and butchering) English my whole life. But at some point, I felt confident with English and wanted to learn Japanese. Big mistake. This is a totally different beast: three writing systems (Hiragana ひらがな, Katakana カタカナ and Kanji 漢字), a completely different grammar, no relation whatsoever with European languages&amp;hellip; I needed help. And tools to learn. And one of them is Space Repetition System based apps.&lt;/p&gt;</description></item><item><title>Atlas Online Archive: Efficiently Manage the Data Lifecycle</title><link>https://foojayio.github.io/website/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/</link><pubDate>Thu, 12 Mar 2026 14:55:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/atlas-online-archive-efficiently-manage-the-data-lifecycle/</guid><description>&lt;h2 id="h2-0-problem-statement"&gt;Problem statement&lt;/h2&gt;
&lt;p&gt;In the production environment, in a MongoDB Atlas database, a collection contains massive amounts of data stored, including aged and current data. However, aged data is not frequently accessed through applications, and the data piles up daily in the collection, leading to performance degradation and cost consumption. This results in needing to upgrade the cluster tier size to maintain sufficient resources according to workload, as it would be difficult to continue with the existing tier size.&lt;/p&gt;</description></item><item><title>Event-Driven Architecture in Java and Kafka</title><link>https://foojayio.github.io/website/today/event-driven-architecture-in-java-and-kafka/</link><pubDate>Tue, 10 Mar 2026 18:35:42 +0000</pubDate><guid>https://foojayio.github.io/website/today/event-driven-architecture-in-java-and-kafka/</guid><description>&lt;p&gt;Reactive Java is well suited to modern streaming, event driven applications. In this article, we&amp;rsquo;ll walk through an example of such an application using Reactive Java with MongoDB. Specifically, we&amp;rsquo;re going to cover:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Why Reactive Java was introduced and how it differs from more traditional Java programming.&lt;/li&gt;
&lt;li&gt;Details of some of the key elements of Reactive Java - &lt;strong&gt;Mono&lt;/strong&gt; , &lt;strong&gt;Flux&lt;/strong&gt; and &lt;strong&gt;flatMap&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A walk through of a sample application, comparing a Reactive version of the code using the Reactive Streams MongoDB driver, with a more traditional version of the code using the synchronous MongoDB driver.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="h2-0-streaming-data-the-air-traffic-control-example"&gt;Streaming Data - The Air Traffic Control Example.&lt;/h2&gt;
&lt;p&gt;As a key part of global initiatives to modernize national airspace systems, many national aviation authorities have introduced mandates requiring most non-military aircraft transmit GPS based location data using a system known as Automatic Dependent Surveillance Broadcast, or &amp;ldquo;ADS-B&amp;rdquo;.&lt;/p&gt;</description></item><item><title>Role-Based Access Control in Java Applications</title><link>https://foojayio.github.io/website/today/role-based-access-control-in-java-applications/</link><pubDate>Thu, 05 Mar 2026 20:31:49 +0000</pubDate><guid>https://foojayio.github.io/website/today/role-based-access-control-in-java-applications/</guid><description>&lt;p&gt;We often work with Java applications where security begins and ends with authentication. The JWT token is validated, Spring Security is integrated, and an identity provider is added, thinking that this type of configuration is sufficiently secure.&lt;/p&gt;
&lt;p&gt;The real problem is that authentication only answers one question: who are you? In real applications, we also have to answer another question, which is often more complex and more dangerous to get wrong: what are you allowed to do?&lt;/p&gt;</description></item><item><title>Data Enrichment in MongoDB</title><link>https://foojayio.github.io/website/today/data-enrichment-in-mongodb/</link><pubDate>Tue, 03 Mar 2026 16:10:36 +0000</pubDate><guid>https://foojayio.github.io/website/today/data-enrichment-in-mongodb/</guid><description>&lt;p&gt;In a recent design review, a customer was enriching new data as it came in. As the enrichment process was fairly complex, they ran into some issues with concurrency. To solve this, they decided that data should go into a staging collection rather than the main collection that held the data. This did nothing to help with concurrency issues and actually created more work on the database side of things when enrichment was complete.&lt;/p&gt;</description></item><item><title>How to Build a Search Service in Java with MongoDB</title><link>https://foojayio.github.io/website/today/how-to-build-a-search-service-in-java-with-mongodb/</link><pubDate>Fri, 27 Feb 2026 18:28:09 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-to-build-a-search-service-in-java-with-mongodb/</guid><description>&lt;p&gt;We need to code our way from the search box to our search index. Performing a search and rendering the results in a presentable fashion, itself, is not a tricky endeavor: Send the user&amp;rsquo;s query to the search server, and translate the response data into some user interface technology. However, there are some important issues that need to be addressed, such as security, error handling, performance, and other concerns that deserve isolation and control.&lt;/p&gt;</description></item><item><title>MongoDB and the Raft Algorithm</title><link>https://foojayio.github.io/website/today/mongodb-and-the-raft-algorithm/</link><pubDate>Tue, 24 Feb 2026 15:47:27 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-and-the-raft-algorithm/</guid><description>&lt;p&gt;&lt;a href="https://www.mongodb.com/docs/manual/replication/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=mongodb-raft-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&amp;rsquo;s replica&lt;/a&gt;
 set architecture uses distributed consensus to ensure consistency, availability, and fault tolerance across nodes. At the core of this architecture is the &lt;strong&gt;Raft consensus algorithm&lt;/strong&gt;, which breaks the complexities of distributed consensus into manageable operations: leader election, log replication, and commitment. This document explores how MongoDB integrates and optimizes Raft for its high-performance replication needs.{#1c95}&lt;br&gt;
&lt;img src="https://miro.medium.com/v2/resize:fit:700/0*CAtq0SjCCYL4gRBY.png" alt="" loading="lazy"&gt;
&lt;/p&gt;
&lt;h3 id="e650"&gt;Raft Roles and MongoDB&amp;rsquo;s Replica Set&lt;/h3&gt;
&lt;p&gt;In Raft, nodes can assume one of three roles: &lt;strong&gt;leader&lt;/strong&gt; , &lt;strong&gt;follower&lt;/strong&gt; , or &lt;strong&gt;candidate&lt;/strong&gt; . MongoDB maps these roles to its architecture seamlessly. The &lt;strong&gt;primary&lt;/strong&gt; node functions as the leader, handling all client write operations and coordinating replication. The &lt;strong&gt;secondaries&lt;/strong&gt; serve as followers, maintaining copies of the primary&amp;rsquo;s data. A node transitions to the &lt;strong&gt;candidate&lt;/strong&gt; role during an election, triggered by leader unavailability.{#5e79}&lt;/p&gt;</description></item><item><title>Ports and Adapters in Java: Keeping Your Core Clean</title><link>https://foojayio.github.io/website/today/ports-and-adapters-in-java-keeping-your-core-clean/</link><pubDate>Thu, 19 Feb 2026 16:13:59 +0000</pubDate><guid>https://foojayio.github.io/website/today/ports-and-adapters-in-java-keeping-your-core-clean/</guid><description>&lt;h2 id="h2-0-introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;If we want to evolve our Java system over time, architecture is more important than the choice of framework. Very often, teams realize too late that what was supposed to be a simple persistence layer at the beginning ended up influencing and overwhelming the entire application design. MongoDB annotations end up in domain models, repository abstractions mirror collections, and business logic becomes an integral part of the infrastructure.&lt;/p&gt;
&lt;p&gt;Hexagonal architecture, also known as Ports and Adapters, offers an architectural model that aims to avoid this problem. It involves the correct attribution of responsibilities to the various application layers. It encourages us to consider external systems (databases, message brokers, HTTP APIs, MCP servers) as details rather than pillars at the center of our design.&lt;/p&gt;</description></item><item><title>Optimizing the MongoDB Java Driver</title><link>https://foojayio.github.io/website/today/optimizing-the-mongodb-java-driver-how-minor-optimizations-led-to-macro-gains/</link><pubDate>Tue, 17 Feb 2026 15:33:56 +0000</pubDate><guid>https://foojayio.github.io/website/today/optimizing-the-mongodb-java-driver-how-minor-optimizations-led-to-macro-gains/</guid><description>&lt;p&gt;Co-authored by &lt;em&gt;Slav Babanin&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www-cs-faculty.stanford.edu/~knuth/" target="_blank" rel="noopener noreferrer"&gt;Donald Knuth&lt;/a&gt;
{#https://www-cs-faculty.stanford.edu/~knuth/}, widely recognized as the &amp;lsquo;father of the analysis of algorithms,&amp;rsquo; warned against premature optimization&amp;mdash;spending effort on code that appears inefficient but is not on the critical path. He observed that programmers often focus on the wrong 97% of the codebase. Real performance gains come from identifying and optimizing the critical 3%. But, how can you identify the critical 3%? Well, that&amp;rsquo;s where the philosophy of &amp;rsquo;never guess, always measure&amp;rsquo; comes in.&lt;/p&gt;</description></item><item><title>MongoDB Sharding: What to Know Before You Shard a Collection</title><link>https://foojayio.github.io/website/today/mongodb-sharding-what-to-know-before-you-shard/</link><pubDate>Thu, 12 Feb 2026 16:47:52 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-sharding-what-to-know-before-you-shard/</guid><description>&lt;p&gt;When we think about a system that operates at scale, we are usually talking about an application that needs to serve millions of users. This often happens when an application suddenly becomes popular and usage grows much faster than expected. As more people start using it, the system naturally begins to struggle to keep up with the load.&lt;/p&gt;
&lt;p&gt;More users mean more requests, more data being generated, and more pressure on the database. If nothing is done, bottlenecks start to appear and the overall performance of the system degrades. There are two traditional ways to deal with this problem: vertical scaling and horizontal scaling.&lt;/p&gt;</description></item><item><title>Reactive Java with Project Reactor</title><link>https://foojayio.github.io/website/today/reactive-java-with-project-reactor/</link><pubDate>Tue, 10 Feb 2026 14:32:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/reactive-java-with-project-reactor/</guid><description>&lt;p&gt;&lt;strong&gt;Introduction: Why Reactive Java Still Matters&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Over the past decade, the Java ecosystem has gradually abandoned the idea that increasing the number of threads is the scalable solution to growing load. Cloud-native implementations, containerized workloads, and high-I/O applications have highlighted the inefficiencies of the traditional synchronous thread-per-request model.&lt;/p&gt;
&lt;p&gt;Reactive programming is not a panacea, a miracle solution. Certainly, it does not make applications &amp;ldquo;faster&amp;rdquo; by default. What it offers, when applied correctly, is the ability to predict behavior under load, better resource utilization, and explicit control over data flow. For systems that handle high concurrency, streaming data, or variable traffic patterns, these characteristics are hugely relevant.&lt;/p&gt;</description></item><item><title>MongoDB 8.0 Migration Guide: What You Need to Know Before Upgrading</title><link>https://foojayio.github.io/website/today/mongodb-8-0-migration-guide-what-you-need-to-know-before-upgrading/</link><pubDate>Thu, 05 Feb 2026 14:56:13 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-8-0-migration-guide-what-you-need-to-know-before-upgrading/</guid><description>&lt;p&gt;Have you ever wondered why updates and upgrades are so essential for any system? Well, it&amp;rsquo;s no secret: They ensure that systems remain relevant and efficient. With MongoDB, it&amp;rsquo;s no different. Whenever we think about updating, we seek efficiency, security, performance, and other benefits that come with updated systems. However, every update introduces changes that need to be carefully managed. In this article, we will cover some of the new features of MongoDB version 8.0 and highlight the key considerations you should take into account before migrating to this new version.&lt;/p&gt;</description></item><item><title>GraphQL for Java Developers: Building a Flexible Data Layer</title><link>https://foojayio.github.io/website/today/graphql-for-java-developers-building-a-flexible-data-layer/</link><pubDate>Tue, 03 Feb 2026 15:43:07 +0000</pubDate><guid>https://foojayio.github.io/website/today/graphql-for-java-developers-building-a-flexible-data-layer/</guid><description>&lt;p&gt;For many years, REST has been the standard architectural style for creating APIs in the Java ecosystem. Frameworks such as Spring MVC and, more recently, Spring WebFlux make it easy to expose HTTP endpoints with the REST paradigm, supported by well-structured service layers. In many cases, this model works well and serves as the basis for numerous enterprise solutions.&lt;/p&gt;
&lt;p&gt;However, as applications grow and frontend requirements become more dynamic, REST-based APIs are beginning to show their limitations. Multiple endpoints that return rigid DTOs often lead to over-fetching, under-fetching, and a proliferation of specialised endpoints created to meet slightly different customer needs. Over time, APIs become more difficult to evolve without introducing radical changes.&lt;/p&gt;</description></item><item><title>Abstracting Data Access in Java With the DAO Pattern</title><link>https://foojayio.github.io/website/today/abstracting-data-access-in-java-with-the-dao-pattern/</link><pubDate>Thu, 29 Jan 2026 16:37:06 +0000</pubDate><guid>https://foojayio.github.io/website/today/abstracting-data-access-in-java-with-the-dao-pattern/</guid><description>&lt;p&gt;The Data Access Object (DAO) pattern is a structural pattern that isolates your application&amp;rsquo;s business logic from persistence operations. By using an abstract API, the DAO pattern hides all the complexity of performing CRUD operations against your database&amp;mdash;whether that&amp;rsquo;s MongoDB, a relational database, or any other storage mechanism.&lt;/p&gt;
&lt;p&gt;This separation is crucial: Your business logic shouldn&amp;rsquo;t care whether you&amp;rsquo;re using MongoDB&amp;rsquo;s flexible document model or a rigid SQL schema. The DAO pattern ensures both layers can evolve independently.&lt;/p&gt;</description></item><item><title>Introduction to Behavior Driving Development with Java and MongoDB</title><link>https://foojayio.github.io/website/today/introduction-to-behavior-driving-development-with-java-and-mongodb/</link><pubDate>Tue, 27 Jan 2026 16:35:53 +0000</pubDate><guid>https://foojayio.github.io/website/today/introduction-to-behavior-driving-development-with-java-and-mongodb/</guid><description>&lt;p&gt;When we face software development, the biggest mistake is about delivering what the client wants. It sounds like a cliché, but after decades, we are still facing this problem. One good way to solve it is to start the test focusing on what the business needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Behavior-driven development&lt;/strong&gt; (BDD) is a software development methodology where the focus is on behavior and the domain terminology or ubiquitous language. It utilizes a shared, natural language to define and test software behaviors from the user&amp;rsquo;s perspective. BDD builds upon test-driven development (TDD) by focusing on scenarios that are relevant to the business. These scenarios are written as plain-language specifications that can be automated as tests, simultaneously serving as living documentation.&lt;/p&gt;</description></item><item><title>MongoDB and WiredTiger: A Journey Through the Storage Engine</title><link>https://foojayio.github.io/website/today/mongodb-and-wiredtiger-a-journey-through-the-storage-engine/</link><pubDate>Thu, 18 Dec 2025 20:26:28 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-and-wiredtiger-a-journey-through-the-storage-engine/</guid><description>&lt;p&gt;Databases are the backbone of modern applications, and &lt;a href="https://www.mongodb.com/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=mongodb-wiredtiger-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 stands out with its flexibility and scalability. Central to its functionality is the WiredTiger storage engine. WiredTiger, as MongoDB&amp;rsquo;s default engine, seamlessly merges document-level concurrency for high throughput, advanced compression techniques for optimized storage, and an in-memory architecture for rapid data access.{#e668}&lt;/p&gt;
&lt;p&gt;With the addition of write-ahead logging for robust durability and the sophistication of MultiVersion Concurrency Control for snapshot-like data views, WiredTiger harmoniously orchestrates MongoDB&amp;rsquo;s data management.{#6fac}&lt;/p&gt;</description></item><item><title>Inside the Engine: Performance Relay of MongoDB 8.0</title><link>https://foojayio.github.io/website/today/inside-the-engine-the-sub-millisecond-performance-relay-of-mongodb-8-0/</link><pubDate>Tue, 16 Dec 2025 20:16:42 +0000</pubDate><guid>https://foojayio.github.io/website/today/inside-the-engine-the-sub-millisecond-performance-relay-of-mongodb-8-0/</guid><description>&lt;figure class="aligncenter size-full is-resized"&gt;
 &lt;img fetchpriority="high" decoding="async" width="720" height="720" src="1_rM-JIRWo49QIKv-vZ4taEQ.webp" alt="" class="wp-image-121981" style="width:308px;height:auto"&gt;
&lt;/figure&gt;
&lt;p&gt;In environments where microseconds dictate competitive advantage, &lt;a href="https://www.mongodb.com/products/updates/version-release/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=mongodb-engine-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB 8.0&lt;/a&gt;
 delivers a meticulously tuned execution pipeline that transforms raw network packets into sub-millisecond query responses at global scale.{#e2e4}&lt;/p&gt;
&lt;p&gt;This reference traces a single trade query through every internal boundary network ingress, scheduling, security, parsing, planning, execution, storage‐engine internals, indexing, replication, sharding, change streams, time‐series buckets, backup, and monitoring illustrating how MongoDB 8.0&amp;rsquo;s per-CPU allocators, active-work profiling, SIMD-vectorized execution, adaptive bucketization, compact resume tokens, and refined journaling coalesce into a seamless, predictable performance engine.{#e2e4}&lt;/p&gt;</description></item><item><title>Building Java Microservices with the Repository Pattern</title><link>https://foojayio.github.io/website/today/building-java-microservices-with-the-repository-pattern/</link><pubDate>Thu, 11 Dec 2025 23:19:10 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-java-microservices-with-the-repository-pattern/</guid><description>&lt;h3 id="h3-0-what-you-ll-learn"&gt;What you&amp;rsquo;ll learn&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;How the MongoDB Spring repository can be used to abstract MongoDB operations&lt;/li&gt;
&lt;li&gt;Ensuring data access is separate from core application logic&lt;/li&gt;
&lt;li&gt;Why you should avoid save() and saveAll() functions in Spring&lt;/li&gt;
&lt;li&gt;Why schema and index design still matters in this case&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The repository pattern is a design method that allows for abstraction between business logic and the data of an application. This allows for retrieving and saving/updating objects without exposing the technical details of how that data is stored in the main application. In this blog, we will use Spring Boot with MongoDB in order to create a repository pattern-based application.&lt;/p&gt;</description></item><item><title>Spring Boot 4 - OpenTelemetry Guide</title><link>https://foojayio.github.io/website/today/spring-boot-4-opentelemetry-explained/</link><pubDate>Wed, 10 Dec 2025 09:09:58 +0000</pubDate><guid>https://foojayio.github.io/website/today/spring-boot-4-opentelemetry-explained/</guid><description>&lt;p&gt;In my previous &lt;a href="https://foojayio.github.io/website/today/preparing-for-spring-framework-7-and-spring-boot-4/"&gt;article&lt;/a&gt;
, I outlined a comprehensive list of features introduced in Spring Framework 7 and Spring Boot 4.&lt;/p&gt;
&lt;p&gt;In this series of articles, we will explore these features in detail using a pragmatic approach. In this second article, I will dive deep into integration of Observability framework i.e., &lt;em&gt;&lt;strong&gt;OpenTelemetry with SpringBoot&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;As an architect and developer, when I engage in system design&amp;mdash;whether it involves monolithic architecture, microservices, or contemporary cloud-native applications&amp;mdash;I have made the integration of &lt;strong&gt;observability&lt;/strong&gt; patterns utilizing &lt;strong&gt;open-telemetry&lt;/strong&gt; tools a standard practice. Through observability, we can monitor application behavior via &lt;strong&gt;metrics, logs, and traces&lt;/strong&gt; that we trigger&lt;/p&gt;</description></item><item><title>Optimizing MongoDB Queries in Java Applications</title><link>https://foojayio.github.io/website/today/optimizing-mongodb-queries-in-java-applications/</link><pubDate>Tue, 09 Dec 2025 17:45:09 +0000</pubDate><guid>https://foojayio.github.io/website/today/optimizing-mongodb-queries-in-java-applications/</guid><description>&lt;p&gt;Modern Java applications often struggle with performance bottlenecks that have little to do with the JVM itself. In most cases, the culprit lies deeper in how the application interacts with its database. Slow queries, missing indexes, or inefficient access patterns can quietly degrade user experience, increase latency, and inflate infrastructure costs. MongoDB, known for its flexibility and document-oriented design, can deliver remarkable performance when used correctly. However, that performance can quickly diminish when queries and indexes are not aligned with real-world access patterns.&lt;/p&gt;</description></item><item><title>Building Systems That Know Why They Exist ~ When Data, Logic, and Intent Finally Align</title><link>https://foojayio.github.io/website/today/building-systems-that-know-why-they-exist-when-data-logic-and-intent-finally-align/</link><pubDate>Thu, 04 Dec 2025 19:06:35 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-systems-that-know-why-they-exist-when-data-logic-and-intent-finally-align/</guid><description>&lt;figure class="aligncenter size-medium"&gt;
 &lt;img fetchpriority="high" decoding="async" width="510" height="510" src="1_fKlXRaOCelfpXA_XhNaitA-510x510.webp" alt="" class="wp-image-121821"&gt;
&lt;/figure&gt;
&lt;p&gt;Every software system begins with intent. A human decision. A statement of what should exist, how it should behave, and why it matters. But somewhere along the way, that intent dies. It&amp;rsquo;s decomposed into documentation, user stories, and scattered logic. It becomes a shadow of itself fragmented across layers of code, processes, and people who no longer remember what it was meant to achieve.{#7cd1}&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;ve automated infrastructure. We&amp;rsquo;ve scripted configurations. We&amp;rsquo;ve even made AI write code for us. But we&amp;rsquo;ve never automated &lt;strong&gt;understanding&lt;/strong&gt; . Our systems execute brilliantly yet comprehend nothing. They operate without memory of purpose. They run, but they do not know &lt;em&gt;why&lt;/em&gt;.{#657d}&lt;/p&gt;</description></item><item><title>Atlas Searching with the Java Driver</title><link>https://foojayio.github.io/website/today/atlas-searching-with-the-java-driver/</link><pubDate>Tue, 02 Dec 2025 17:28:43 +0000</pubDate><guid>https://foojayio.github.io/website/today/atlas-searching-with-the-java-driver/</guid><description>&lt;p&gt;Dear fellow developer, welcome!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.mongodb.com/atlas/search/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=atlas-search-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;Atlas Search&lt;/a&gt;
 is a full-text search engine embedded in MongoDB Atlas that gives you a seamless, scalable experience for building relevance-based app features. Built on Apache Lucene, Atlas Search eliminates the need to run a separate search system alongside your database. The gateway to Atlas Search is the $search aggregation pipeline stage.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://www.mongodb.com/docs/atlas/atlas-search/query-syntax/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=atlas-search-foojay&amp;amp;utm_term=tony.kim#std-label-search-agg-pipeline" target="_blank" rel="noopener noreferrer"&gt;$search&lt;/a&gt;
 stage, as one of the newest members of the &lt;a href="https://www.mongodb.com/docs/manual/core/aggregation-pipeline/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=atlas-search-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB aggregation pipeline&lt;/a&gt;
 family, has gotten native, convenient support added to various language drivers. Driver support helps developers build concise and readable code. This article delves into using the Atlas Search support built into the MongoDB Java driver, where we&amp;rsquo;ll see how to use the driver, how to handle `$search` features that don&amp;rsquo;t yet have native driver convenience methods or have been released after the driver was released, and a glimpse into Atlas Search relevancy scoring. Let&amp;rsquo;s get started!&lt;/p&gt;</description></item><item><title>Navigating the Nuances of GraphRAG vs. RAG</title><link>https://foojayio.github.io/website/today/navigating-the-nuances-of-graphrag-vs-rag/</link><pubDate>Thu, 20 Nov 2025 21:28:52 +0000</pubDate><guid>https://foojayio.github.io/website/today/navigating-the-nuances-of-graphrag-vs-rag/</guid><description>&lt;p&gt;While large language models (LLMs) hold immense promise for building AI applications and agentic systems, ensuring they generate reliable and trustworthy outputs remains a persistent challenge. Effective data management&amp;mdash;particularly how data is stored, retrieved, and accessed&amp;mdash;is crucial to overcoming this issue. Retrieval-augmented generation (RAG) has emerged as a widely adopted strategy, grounding LLMs in external knowledge beyond their original training data.&lt;/p&gt;
&lt;p&gt;The standard, or baseline, implementation of RAG typically relies on a vector-based approach. While effective for retrieving contextually relevant documents and references, vector-based RAG faces limitations in other situations, particularly when applications require robust reasoning capabilities and the ability to understand complex relationships between diverse concepts spread across large knowledge bases. This can lead to outputs that disappoint or even mislead end-users.&lt;/p&gt;</description></item><item><title>Service Layer Pattern in Java With Spring Boot</title><link>https://foojayio.github.io/website/today/service-layer-pattern-in-java-with-spring-boot/</link><pubDate>Tue, 18 Nov 2025 14:40:26 +0000</pubDate><guid>https://foojayio.github.io/website/today/service-layer-pattern-in-java-with-spring-boot/</guid><description>&lt;p&gt;In modern software design, it is important to develop code that is clean and maintainable. One way developers do this is using the &lt;strong&gt;Service Layer pattern&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="h2-0-what-you-ll-learn"&gt;What you&amp;rsquo;ll learn&lt;/h2&gt;
&lt;p&gt;In this article, you&amp;rsquo;ll learn:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What the Service Layer pattern is and why it matters.&lt;/li&gt;
&lt;li&gt;How it fits with the MVC architecture.&lt;/li&gt;
&lt;li&gt;How to implement it in a real Spring Boot application.&lt;/li&gt;
&lt;li&gt;How to add MongoDB with minimal code.&lt;/li&gt;
&lt;li&gt;Best practices and common mistakes to avoid.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="h2-1-what-is-the-service-layer-pattern"&gt;What is the Service Layer pattern?&lt;/h2&gt;
&lt;p&gt;The Service Layer pattern is an architectural pattern that defines an application&amp;rsquo;s boundary with a layer of services that establishes a set of available operations and coordinates the application&amp;rsquo;s response in each operation.&lt;/p&gt;</description></item><item><title>Beyond Keywords: Hybrid Search With Atlas and Vector Search (Part 3)</title><link>https://foojayio.github.io/website/today/beyond-keywords-hybrid-search-with-atlas-and-vector-search-part-3/</link><pubDate>Thu, 13 Nov 2025 13:56:23 +0000</pubDate><guid>https://foojayio.github.io/website/today/beyond-keywords-hybrid-search-with-atlas-and-vector-search-part-3/</guid><description>&lt;p&gt;Bringing together semantic vectors and exact keyword matching with $rankFusion&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve been following along this series, you already know we started by giving our movie search app the ability to understand meaning&amp;mdash;not just keywords&amp;mdash;using semantic search, as discussed in &lt;a href="https://foojayio.github.io/website/today/beyond-keywords-implementing-semantic-search-in-java-with-spring-data-part-1/"&gt;&lt;em&gt;Part 1: Implementing Semantic Search in Java With Spring Data&lt;/em&gt;&lt;/a&gt;
. Then, we made it even smarter by adding filters and optimizing performance with embedding strategies in &lt;a href="https://foojayio.github.io/website/today/beyond-keywords-optimizing-vector-search-with-filters-and-caching-part-2/"&gt;&lt;em&gt;Part 2: Optimizing Vector Search With Filters and Caching&lt;/em&gt;&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>The Cost of Not Knowing MongoDB - Part 3: (appV6R0 to appV6R4)</title><link>https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-3-appv6r0-to-appv6r4/</link><pubDate>Tue, 11 Nov 2025 19:31:10 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-3-appv6r0-to-appv6r4/</guid><description>&lt;p&gt;Welcome to the third and final part of the series &amp;ldquo;The Cost of Not Knowing MongoDB.&amp;rdquo; Building upon the foundational optimizations explored in &lt;a href="https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-1-appv0-to-appv4/"&gt;Part 1&lt;/a&gt;
 and &lt;a href="https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-2-appv5r0-to-appv5r4/"&gt;Part 2&lt;/a&gt;
, this article delves into advanced MongoDB design patterns that can dramatically transform application performance.&lt;/p&gt;
&lt;p&gt;In &lt;a href="https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-1-appv0-to-appv4/"&gt;Part 1&lt;/a&gt;
, we improved application performance by concatenating fields, changing data types, and shortening field names. In &lt;a href="https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-2-appv5r0-to-appv5r4/"&gt;Part 2&lt;/a&gt;
, we implemented the Bucket Pattern and Computed Pattern and optimized the aggregation pipeline to achieve even better performance.&lt;/p&gt;</description></item><item><title>Modeling Relationships With Hibernate ORM and MongoDB</title><link>https://foojayio.github.io/website/today/modeling-relationships-with-hibernate-orm-and-mongodb/</link><pubDate>Tue, 04 Nov 2025 17:08:49 +0000</pubDate><guid>https://foojayio.github.io/website/today/modeling-relationships-with-hibernate-orm-and-mongodb/</guid><description>&lt;p&gt;In the&lt;a href="https://foojayio.github.io/website/today/getting-started-with-hibernate-orm-and-mongodb/"&gt;previous article&lt;/a&gt;
&amp;mdash;&lt;em&gt;Getting Started With Hibernate ORM and MongoDB&lt;/em&gt;&amp;mdash;we learned how to configure Hibernate to work with MongoDB, create an entity, and perform basic CRUD operations using the familiar Hibernate API.&lt;/p&gt;
&lt;p&gt;If you haven&amp;rsquo;t read that first part yet, I recommend starting there before continuing. It covers the project setup, dependencies, and the fundamentals that we&amp;rsquo;ll build upon here.&lt;/p&gt;
&lt;p&gt;In this second part, we&amp;rsquo;ll &lt;strong&gt;extend our application&lt;/strong&gt; to model relationships between entities&amp;mdash;introducing a Review entity and linking it to our existing Book class. This will allow us to explore more advanced capabilities of the MongoDB Hibernate integration, including:&lt;/p&gt;</description></item><item><title>Getting Started With Hibernate ORM and MongoDB</title><link>https://foojayio.github.io/website/today/getting-started-with-hibernate-orm-and-mongodb/</link><pubDate>Tue, 04 Nov 2025 17:06:26 +0000</pubDate><guid>https://foojayio.github.io/website/today/getting-started-with-hibernate-orm-and-mongodb/</guid><description>&lt;p&gt;For years, &lt;a href="https://hibernate.org/" target="_blank" rel="noopener noreferrer"&gt;Hibernate&lt;/a&gt;
 ORM has been one of the most popular frameworks in the Java ecosystem. It was built to simplify data persistence by letting developers work with Java objects instead of SQL statements, a technique known as &lt;em&gt;object-relational mapping (ORM)&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Traditionally, Hibernate ORM has been tightly associated with relational databases like PostgreSQL, MySQL, and Oracle. It manages connections, transactions, and entity state behind the scenes, and even provides &lt;strong&gt;Hibernate Query Language (HQL)&lt;/strong&gt; so you can query your data using Java entity names rather than table names.&lt;/p&gt;</description></item><item><title>The Pitfall of Increasing Read Capacity by Reading From Secondary Nodes in a MongoDB Replica Set</title><link>https://foojayio.github.io/website/today/the-pitfall-of-increasing-read-capacity-by-reading-from-secondary-nodes-in-a-mongodb-replica-set/</link><pubDate>Thu, 30 Oct 2025 15:23:31 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-pitfall-of-increasing-read-capacity-by-reading-from-secondary-nodes-in-a-mongodb-replica-set/</guid><description>&lt;h2 id="h2-0-the-scenario"&gt;The scenario&lt;/h2&gt;
&lt;p&gt;Imagine we are responsible for managing the MongoDB cluster that supports our country&amp;rsquo;s national financial payment system, similar to&lt;a href="https://en.wikipedia.org/wiki/Pix_%28payment_system%29" target="_blank" rel="noopener noreferrer"&gt;Pix&lt;/a&gt;
 in Brazil. Our application was designed to be read-heavy, with one write operation for every 20 read operations.&lt;/p&gt;
&lt;p&gt;With&lt;a href="https://en.wikipedia.org/wiki/Black_Friday_%28shopping%29" target="_blank" rel="noopener noreferrer"&gt;Black Friday&lt;/a&gt;
 approaching, a critical period for our national financial payment system, we have been entrusted with the crucial task of creating a scaling plan for our cluster to handle the increased demand during this shopping spree. Given that our system is read-heavy, we are exploring ways to enhance the read performance and capacity of our cluster.&lt;/p&gt;</description></item><item><title>How MongoDB Decides What to Forget?</title><link>https://foojayio.github.io/website/today/how-mongodb-decides-what-to-forget/</link><pubDate>Tue, 28 Oct 2025 14:00:39 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-mongodb-decides-what-to-forget/</guid><description>&lt;figure class="aligncenter size-full is-resized"&gt;
 &lt;img fetchpriority="high" decoding="async" width="720" height="720" src="1_2RyMETT6diUSVGKdJPoQgQ.webp" alt="" class="wp-image-121588" style="width:368px;height:auto"&gt;
&lt;/figure&gt;
&lt;p&gt;Inside MongoDB&amp;rsquo;s storage engine, &lt;a href="https://www.mongodb.com/docs/manual/core/wiredtiger/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=mongodb-forget-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;WiredTiger&lt;/a&gt;
, &lt;strong&gt;nothing happens by accident.&lt;/strong&gt;{#4cf7}&lt;/p&gt;
&lt;p&gt;Every page in &lt;a href="https://www.mongodb.com/docs/atlas/sizing-tier-selection/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=mongodb-forget-foojay&amp;amp;utm_term=tony.kim#memory" target="_blank" rel="noopener noreferrer"&gt;memory&lt;/a&gt;
 exists under policy &amp;mdash; governed, measured, and continuously evaluated against the limits of RAM, I/O bandwidth, and checkpoint cadence. Eviction is not cleanup. It&amp;rsquo;s &lt;strong&gt;runtime arbitration between volatility and durability&lt;/strong&gt;.{#ba51}&lt;/p&gt;
&lt;p&gt;When the process starts, WiredTiger allocates a fixed memory region known as the &lt;strong&gt;cache arena&lt;/strong&gt; typically 50% of physical RAM. Within that space live &lt;strong&gt;B-tree pages&lt;/strong&gt; : internal nodes, leaf nodes, and history-store entries. Each page carries operational metadata: &lt;strong&gt;dirty, clean, hazard-protected, in-use, last_access_time, and generation&lt;/strong&gt; . This metadata feeds into a &lt;strong&gt;per-page score&lt;/strong&gt;, which informs the eviction subsystem&amp;rsquo;s next decision.{#61cb}&lt;/p&gt;</description></item><item><title>Beyond Keywords: Optimizing Vector Search with Filters and Caching (Part 2)</title><link>https://foojayio.github.io/website/today/beyond-keywords-optimizing-vector-search-with-filters-and-caching-part-2/</link><pubDate>Thu, 23 Oct 2025 15:44:38 +0000</pubDate><guid>https://foojayio.github.io/website/today/beyond-keywords-optimizing-vector-search-with-filters-and-caching-part-2/</guid><description>&lt;p&gt;Enhancing precision with pre-filters and reducing costs with embedding caching&lt;/p&gt;
&lt;p&gt;Welcome back! If you landed here without reading &lt;a href="https://foojayio.github.io/website/today/beyond-keywords-implementing-semantic-search-in-java-with-spring-data-part-1/"&gt;&lt;em&gt;Part 1: Beyond Keywords: Implementing Semantic Search in Java With Spring Data&lt;/em&gt;&lt;/a&gt;
, I recommend going back and checking it first so the steps in this article make more sense in sequence.&lt;/p&gt;
&lt;p&gt;This is the second part of a &lt;strong&gt;three-part series&lt;/strong&gt; where we&amp;rsquo;re building a movie search application. So far, our app supports &lt;strong&gt;semantic search&lt;/strong&gt; using vector queries with Spring Data and Voyage AI. In this article, we&amp;rsquo;ll take things further:&lt;/p&gt;</description></item><item><title>The Cost of Not Knowing MongoDB - Part 2</title><link>https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-2-appv5r0-to-appv5r4/</link><pubDate>Tue, 21 Oct 2025 14:26:51 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-2-appv5r0-to-appv5r4/</guid><description>&lt;p&gt;This is the second part of the series &amp;ldquo;The Cost of Not Knowing MongoDB,&amp;rdquo; where we go through many ways we can model our MongoDB schemas for the same application and have different performances. In the &lt;a href="https://www.mongodb.com/developer/products/mongodb/cost-of-not-knowing-mongodb/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=cost-part2-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;first part&lt;/a&gt;
 of the series, we concatenated fields, changed data types, and short-handed field names to improve the application performance. In this second part, as discussed in the &lt;a href="https://www.mongodb.com/developer/products/mongodb/cost-of-not-knowing-mongodb/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=cost-part2-foojay&amp;amp;utm_term=tony.kim#issues-and-improvements:~:text=than%20appV3.-,Issues%20and%20improvements,-Enough%20of%20focusing" target="_blank" rel="noopener noreferrer"&gt;issues and improvement of appV4&lt;/a&gt;
, the performance gains will be achieved by analyzing the application behavior and how it stores and reads its data, leading us to the use of the &lt;a href="https://www.mongodb.com/blog/post/building-with-patterns-the-bucket-pattern/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=cost-part2-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;Bucket Pattern&lt;/a&gt;
 and the &lt;a href="https://www.mongodb.com/blog/post/building-with-patterns-the-computed-pattern/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=cost-part2-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;Computed Pattern&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Beyond Keywords: Implementing Semantic Search in Java With Spring Data (Part 1)</title><link>https://foojayio.github.io/website/today/beyond-keywords-implementing-semantic-search-in-java-with-spring-data-part-1/</link><pubDate>Thu, 16 Oct 2025 13:39:59 +0000</pubDate><guid>https://foojayio.github.io/website/today/beyond-keywords-implementing-semantic-search-in-java-with-spring-data-part-1/</guid><description>&lt;p&gt;Building a semantic movie search app with embeddings and vector queries&lt;/p&gt;
&lt;p&gt;Have you ever tried to search for something such as a product, a song, or a movie but couldn&amp;rsquo;t quite remember its exact name? Maybe you recall only a clue&amp;mdash;a desert pyramid, a short melody, or &amp;ldquo;that ship that hit an iceberg.&amp;rdquo; Keyword search struggles with that. Vector search doesn&amp;rsquo;t: It lets you search by meaning.&lt;/p&gt;
&lt;p&gt;It works by turning text into embeddings, vectors (arrays of numbers) that capture semantic similarity, so results are ranked by what they mean, not just what they say.&lt;/p&gt;</description></item><item><title>The Cost of Not Knowing MongoDB (Part 1)</title><link>https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-1-appv0-to-appv4/</link><pubDate>Tue, 14 Oct 2025 13:43:42 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-cost-of-not-knowing-mongodb-part-1-appv0-to-appv4/</guid><description>&lt;p&gt;The primary focus of this series is to show how much performance you can gain, and as a consequence, the cost you can save when using &lt;a href="https://www.mongodb.com/lp/cloud/atlas/try4-reg/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=cost-part1-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 properly, following the best practices, studying your application needs, and using it to model your data.&lt;/p&gt;
&lt;p&gt;To show these possible gains, a dummy application will be presented, and many possible implementations of it using MongoDB will be developed and load-tested. There will be implementations for all levels of MongoDB knowledge: beginner, intermediate, senior, and mind-blowing (🤯) .&lt;/p&gt;</description></item><item><title>Keywords Meet Vectors: Hybrid Search on MongoDB</title><link>https://foojayio.github.io/website/today/keywords-meet-vectors-hybrid-search-on-mongodb/</link><pubDate>Thu, 09 Oct 2025 14:49:49 +0000</pubDate><guid>https://foojayio.github.io/website/today/keywords-meet-vectors-hybrid-search-on-mongodb/</guid><description>&lt;p&gt;In the previous issues, I explained how to run a local &lt;a href="https://www.linkedin.com/company/mongodbinc/?lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3BnV1cKI74RDKmiAI4lr1TaA%3D%3D" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 Atlas cluster using &lt;a href="https://www.linkedin.com/pulse/run-local-atlas-cluster-minutes-locally-arek-borucki-mmiqf/?trackingId=M71jHZpGSQCdFygE5EgAOw%3D%3D" target="_blank" rel="noopener noreferrer"&gt;Atlas CLI&lt;/a&gt;
, what &lt;a href="https://www.linkedin.com/pulse/power-your-ai-application-vector-search-arek-borucki-sjw0f/?trackingId=vjRobV3lSdy1nc4SIgjM%2Fg%3D%3D" target="_blank" rel="noopener noreferrer"&gt;vector search&lt;/a&gt;
 is, and &lt;a href="https://www.linkedin.com/pulse/from-zero-vector-hero-locally-arek-borucki-w5otf/?trackingId=S%2FClUOdjSMGzvkR2ZLIS9Q%3D%3D" target="_blank" rel="noopener noreferrer"&gt;how to use it&lt;/a&gt;
. Now, let&amp;rsquo;s take a closer look at hybrid search.&lt;/p&gt;
&lt;p&gt;Reading time: 4&amp;ndash;5 min&lt;/p&gt;
&lt;h2 id="h2-0-what-is-hybrid-search"&gt;What is hybrid search?&lt;/h2&gt;
&lt;p&gt;Hybrid search in MongoDB brings together &lt;strong&gt;two complementary search techniques&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Full text search&lt;/strong&gt; (&lt;a href="https://en.wikipedia.org/wiki/Okapi_BM25" target="_blank" rel="noopener noreferrer"&gt;BM25&lt;/a&gt;
 via &lt;a href="https://www.mongodb.com/docs/atlas/atlas-search/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=hybrid-search-foojay&amp;amp;utm_term=megan.grant" target="_blank" rel="noopener noreferrer"&gt;Atlas Search&lt;/a&gt;
)&amp;mdash;optimized for exact keyword matches, powered by Lucene inside mongot. Perfect when users expect documents that literally contain their query terms.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vector search&lt;/strong&gt; (&lt;a href="https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm" target="_blank" rel="noopener noreferrer"&gt;kNN&lt;/a&gt;
 via &lt;a href="https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-overview/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=hybrid-search-foojay&amp;amp;utm_term=megan.grant" target="_blank" rel="noopener noreferrer"&gt;Atlas Vector Search&lt;/a&gt;
)&amp;mdash;optimized for semantic similarity. It uses dense embeddings from ML models to find conceptually related content, even when no keywords match.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On their own, each method has advantages and limitations. Text search misses context (&amp;ldquo;non-linear crime story&amp;rdquo; won&amp;rsquo;t return Memento). Pure semantic search may return results that are semantically aligned but sometimes not practically useful. Hybrid search combines the strengths of both, ensuring results are contextually relevant and precise.&lt;/p&gt;</description></item><item><title>Working with Geo Location Data in MongoDB</title><link>https://foojayio.github.io/website/today/working-with-geo-location-data/</link><pubDate>Tue, 07 Oct 2025 14:01:53 +0000</pubDate><guid>https://foojayio.github.io/website/today/working-with-geo-location-data/</guid><description>&lt;p&gt;&lt;a href="https://www.mongodb.com/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=geo-mongodb-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 makes it really easy to work with location data (sometimes called Geo Data) by simplifying how to store this type of data and streamlining how you query for it so you can easily create &amp;ldquo;find nearby&amp;rdquo; queries, or plot your location data with ease!&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s start with the basics: modeling your data, indexing it properly, running geo queries, and then displaying results on a map.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model Your Data with GeoJSON&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Agents Meet Databases: The Future of Agentic Architectures</title><link>https://foojayio.github.io/website/today/agents-meet-databases-the-future-of-agentic-architectures/</link><pubDate>Thu, 02 Oct 2025 15:01:49 +0000</pubDate><guid>https://foojayio.github.io/website/today/agents-meet-databases-the-future-of-agentic-architectures/</guid><description>&lt;p&gt;With 2025 hailed as &amp;ldquo;the year of agents&amp;rdquo; by &lt;a href="https://www.barrons.com/articles/nvidia-stock-ceo-ai-agents-8c20ddfb" target="_blank" rel="noopener noreferrer"&gt;NVIDIA CEO Jensen Huang&lt;/a&gt;
 and &lt;a href="https://www.axios.com/2025/01/23/davos-2025-ai-agents" target="_blank" rel="noopener noreferrer"&gt;OpenAI CPO Kevin Weil&lt;/a&gt;
, AI agents are increasingly of interest to organizations across industries. These autonomous systems will often need to interact with databases, where much of the world&amp;rsquo;s valuable data resides. According to &lt;a href="https://www.seagate.com/files/www-content/our-story/trends/files/Seagate-WP-DataAge2025-March-2017.pdf" target="_blank" rel="noopener noreferrer"&gt;IDC&amp;rsquo;s Data Age 2025 report&lt;/a&gt;
, enterprises will manage nearly 60% of the world&amp;rsquo;s data by 2025, most of it organized in databases. As a result, databases will be central to agentic architectures, and the success of agent deployments will depend on how well they connect and interact with them.&lt;/p&gt;</description></item><item><title>Building an AI Semantic Movie Recommender with Vector Search</title><link>https://foojayio.github.io/website/today/building-an-ai-semantic-movie-recommender-with-vector-search/</link><pubDate>Tue, 30 Sep 2025 13:23:18 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-an-ai-semantic-movie-recommender-with-vector-search/</guid><description>&lt;p&gt;Last time, we created a &lt;a href="https://www.linkedin.com/pulse/from-zero-vector-hero-locally-arek-borucki-w5otf/?trackingId=xNlcCImhQCC0HsnlThlQFg%3D%3D&amp;amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3B1MUlV%2B0kQm%2BvelL3UScxcA%3D%3D" target="_blank" rel="noopener noreferrer"&gt;vector search index&lt;/a&gt;
 in a &lt;a href="https://www.linkedin.com/pulse/run-local-atlas-cluster-minutes-locally-arek-borucki-mmiqf/?trackingId=ntYzEbTVSuauLVmp2Zbt4w%3D%3D&amp;amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3B1MUlV%2B0kQm%2BvelL3UScxcA%3D%3D" target="_blank" rel="noopener noreferrer"&gt;local MongoDB Atlas cluster&lt;/a&gt;
. Now, let&amp;rsquo;s put it to work with a real case: building an AI-powered movie recommender that suggests films similar to &lt;em&gt;The Matrix&lt;/em&gt;&amp;ndash;without any shared keywords.&lt;/p&gt;
&lt;p&gt;🕒 Reading time: 3-4 min&lt;/p&gt;
&lt;p&gt;🎯 The challenge&lt;/p&gt;
&lt;p&gt;This demo will be entirely based on the pre-generated vector embeddings already stored in the &lt;a href="https://www.mongodb.com/docs/atlas/sample-data/sample-mflix/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=semantic-foojay&amp;amp;utm_term=tony.kim#std-label-sample-mflix" target="_blank" rel="noopener noreferrer"&gt;sample_mflix&lt;/a&gt;
 dataset&amp;mdash;no API calls and no new model runs. Everything will remain local. If you haven&amp;rsquo;t done it yet, learn how in this article 👉 &lt;a href="https://www.linkedin.com/pulse/from-zero-vector-hero-locally-arek-borucki-w5otf/?trackingId=xNlcCImhQCC0HsnlThlQFg%3D%3D&amp;amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_pulse_read%3B1MUlV%2B0kQm%2BvelL3UScxcA%3D%3D" target="_blank" rel="noopener noreferrer"&gt;Loading embeddings into MongoDB&lt;/a&gt;
&lt;/p&gt;</description></item><item><title>Introduction to Data-Driven Testing with Java and MongoDB</title><link>https://foojayio.github.io/website/today/introduction-to-data-driven-testing-with-java-and-mongodb/</link><pubDate>Thu, 25 Sep 2025 13:53:57 +0000</pubDate><guid>https://foojayio.github.io/website/today/introduction-to-data-driven-testing-with-java-and-mongodb/</guid><description>&lt;p&gt;As applications expand, the complexity of the rules they enforce also increases. In many systems, these rules are embedded within the data, primarily in database queries that filter, join, or compute based on real-world conditions. However, the tests for these queries are often shallow, repetitive, or, worse yet, completely absent. When there is an error in the database logic, the application may still compile successfully, but the business can suffer significant consequences.&lt;/p&gt;</description></item><item><title>Power your AI application with Vector Search</title><link>https://foojayio.github.io/website/today/power-your-ai-application-with-vector-search/</link><pubDate>Tue, 23 Sep 2025 16:23:37 +0000</pubDate><guid>https://foojayio.github.io/website/today/power-your-ai-application-with-vector-search/</guid><description>&lt;p&gt;Most major database vendors, like &lt;a href="https://www.mongodb.com/lp/cloud/atlas/try4-reg/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=foojay-vector-search&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 , are adding vector search capabilities to their products. It&amp;rsquo;s becoming a standard feature as demand for AI-powered applications grows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;🕒 Reading time: 3-4 min&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;🧠 What is vector search needed for?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;MongoDB Vector Search enables semantic queries. For example, finding support tickets with similar meanings even if they use different words. It also powers hybrid search by combining exact keyword matches like &amp;ldquo;error 500&amp;rdquo; with semantically similar phrases like &amp;ldquo;server failure&amp;rdquo;. Another use case is personalization, such as recommending articles similar to those a user has read.&lt;/p&gt;</description></item><item><title>From Zero to Vector Hero - Locally! (Vector Search)</title><link>https://foojayio.github.io/website/today/from-zero-to-vector-hero-locally/</link><pubDate>Thu, 18 Sep 2025 15:25:23 +0000</pubDate><guid>https://foojayio.github.io/website/today/from-zero-to-vector-hero-locally/</guid><description>&lt;p&gt;In the previous issue, I explained how to run a local &lt;a href="https://www.mongodb.com/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=vector-search-3&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 Atlas cluster using Atlas CLI - no cloud account required. If you missed it, read it here 👉 Run an Atlas cluster locally in minutes. Now let&amp;rsquo;s see how to use Vector Search in that local environment.&lt;/p&gt;
&lt;p&gt;🕒 Reading time: 3-4 min&lt;/p&gt;
&lt;p&gt;🧠 Explaining the Embedding Workflow&lt;/p&gt;
&lt;p&gt;After launching your local MongoDB Atlas cluster and running the show dbs command in mongosh, you&amp;rsquo;ll see only the default system databases: admin, config, and local. These are used internally by MongoDB and contain no user data or vector embeddings at this point.&lt;/p&gt;</description></item><item><title>Best Practices for Deploying MongoDB in Kubernetes</title><link>https://foojayio.github.io/website/today/best-practices-for-deploying-mongodb-in-kubernetes/</link><pubDate>Tue, 16 Sep 2025 19:01:34 +0000</pubDate><guid>https://foojayio.github.io/website/today/best-practices-for-deploying-mongodb-in-kubernetes/</guid><description>&lt;p&gt;&lt;a href="https://kubernetes.io/" target="_blank" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt;
, also known as K8s, is an open-source system that simplifies the deployment, scaling, and management of containerized applications. You define your application&amp;rsquo;s desired state, such as the number of instances (&lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/" target="_blank" rel="noopener noreferrer"&gt;pods&lt;/a&gt;
) or how they communicate, and Kubernetes works continuously to ensure that state is met. It excels at running stateless workloads, where pods can be replaced at any time without impacting application state or user data. Think of web servers or REST APIs: If a pod crashes, Kubernetes simply spins up a replacement and everything continues as expected.&lt;/p&gt;</description></item><item><title>MongoDB Schemas in Java</title><link>https://foojayio.github.io/website/today/mongodb-schemas-in-java/</link><pubDate>Thu, 11 Sep 2025 13:15:02 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-schemas-in-java/</guid><description>&lt;p&gt;If (like me!) you prefer to read code rather than a long and boring article, jump straight to the example! TLDR; here&amp;rsquo;s the &lt;a href="https://github.com/luketn/mongodb-schemas-in-java" target="_blank" rel="noopener noreferrer"&gt;code&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;You can clone and run the tests like this:&lt;/p&gt;
&lt;pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""&gt;git clone https://github.com/luketn/mongodb-schemas-in-java&amp;nbsp;
cd mongodb-schemas-in-java&amp;nbsp;
mvn test&lt;/pre&gt;
&lt;p&gt;And if you want to play with the example API visually (like I do!) and you have a local Mongo or an Atlas Cluster with the &lt;a href="https://www.mongodb.com/docs/guides/atlas/sample-data/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=mongodb-schemas-java&amp;amp;utm_term=megan.grant" target="_blank" rel="noopener noreferrer"&gt;Weather Sample&lt;/a&gt;
 data, run:&lt;/p&gt;</description></item><item><title>Building REST APIs in Java with Spring Boot</title><link>https://foojayio.github.io/website/today/building-rest-apis-in-java-with-spring-boot/</link><pubDate>Tue, 09 Sep 2025 14:51:10 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-rest-apis-in-java-with-spring-boot/</guid><description>&lt;p&gt;REST has become the default choice for building web services, and for good reason. It&amp;rsquo;s straightforward to implement, easy for clients to consume, and built directly on top of the same principles of the web itself.&lt;/p&gt;
&lt;p&gt;HTTP already gives us well-defined methods (GET, POST, PUT, DELETE), built-in caching, redirect support, secure transport via TLS, and widespread tooling support across platforms. REST doesn&amp;rsquo;t reinvent the web&amp;mdash;it uses it.&lt;/p&gt;
&lt;p&gt;REST is not a protocol or a rigid standard. It&amp;rsquo;s a lightweight architectural approach that encourages scalable, evolvable, and interoperable services. Its creator, Roy Fielding, helped define many of the specs that underpin the web today.&lt;/p&gt;</description></item><item><title>MongoDB Aggregations: Organizing Recipes by Meal Type with $group</title><link>https://foojayio.github.io/website/today/mongodb-aggregations-organizing-recipes-by-meal-type-with-group/</link><pubDate>Thu, 04 Sep 2025 05:31:22 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-aggregations-organizing-recipes-by-meal-type-with-group/</guid><description>&lt;p&gt;In this series, we&amp;rsquo;re exploring different &lt;a href="https://www.mongodb.com/docs/manual/aggregation/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=recipe-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB aggregation operators&lt;/a&gt;
 by applying them to a recipe collection. I hope you&amp;rsquo;ll follow along with each post!&lt;/p&gt;
&lt;p&gt;MongoDB Aggregations Series&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learnmongo.com/mongodb-aggregations-finding-cooking-times-with-min-and-max/" target="_blank" rel="noopener noreferrer"&gt;MongoDB Aggregations: Finding Cooking Times with $min and $max&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MongoDB Aggregations: Organizing Recipes by Meal Type with $group&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As part of this series, we are imagining you&amp;rsquo;re building a recipe website. For this post, we are adding some new features to our site, including allowing users to browse recipes by meal type&amp;mdash;breakfast, lunch, dinner, etc.&lt;/p&gt;</description></item><item><title>Copy of Queryable Encryption with Spring Data MongoDB: How to Query Encrypted Fields</title><link>https://foojayio.github.io/website/today/queryable-encryption-with-spring-data-mongodb-how-to-query-encrypted-fields/</link><pubDate>Tue, 02 Sep 2025 19:00:24 +0000</pubDate><guid>https://foojayio.github.io/website/today/queryable-encryption-with-spring-data-mongodb-how-to-query-encrypted-fields/</guid><description>&lt;p&gt;Information is one of the most valuable assets in computing and keeping it protected is even more critical. When we talk about data protection, it&amp;rsquo;s not just about preventing breaches or leaks; it&amp;rsquo;s also about complying with privacy regulations and protecting user data.&lt;/p&gt;
&lt;p&gt;MongoDB provides strong encryption capabilities, including in transit, at rest, and in use. The Queryable Encryption feature falls into the &lt;em&gt;in use&lt;/em&gt; category. It allows data to be encrypted on the client side, so that even with access to the database and its credentials, no one can read the protected fields without the proper encryption key. At the same time, it supports querying over encrypted fields, making it possible to filter, match, or retrieve data without compromising confidentiality.&lt;/p&gt;</description></item><item><title>What happens when a Primary fails in a MongoDB replica set?</title><link>https://foojayio.github.io/website/today/what-happens-when-a-primary-fails-in-a-mongodb-replica-set-automatic-failovers/</link><pubDate>Tue, 26 Aug 2025 15:14:03 +0000</pubDate><guid>https://foojayio.github.io/website/today/what-happens-when-a-primary-fails-in-a-mongodb-replica-set-automatic-failovers/</guid><description>&lt;p&gt;In distributed systems, high availability is not a luxury&amp;mdash;it&amp;rsquo;s a necessity. And one of the very important parts of that is automatic failovers. What are automatic failovers and how do they work? Let&amp;rsquo;s see today!&lt;/p&gt;
&lt;p&gt;These concepts are actually similar in every database, but as &lt;a href="https://www.mongodb.com/cloud/atlas/register/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=shrey-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 is natively built for replica-sets, we will talk about that here, whereas other DB systems need 3rd-party or managed systems to implement the same.&lt;/p&gt;</description></item><item><title>Managing MongoDB Database Changes Using Liquibase Pro</title><link>https://foojayio.github.io/website/today/managing-mongodb-database-changes-using-liquibase-pro/</link><pubDate>Wed, 20 Aug 2025 14:21:51 +0000</pubDate><guid>https://foojayio.github.io/website/today/managing-mongodb-database-changes-using-liquibase-pro/</guid><description>&lt;p&gt;This article explores how Liquibase and MongoDB can be integrated with Git actions to implement source control for database changes.&lt;/p&gt;
&lt;h2 id="h2-0-what-is-liquibase"&gt;What is Liquibase?&lt;/h2&gt;
&lt;p&gt;Liquibase is an open-source tool designed to manage version control for database schema changes. It allows developers to simplify and automate the process of applying database updates across various database platforms.&lt;/p&gt;
&lt;p&gt;By using database-independent formats like XML, YAML, or JSON, Liquibase enables teams to define changes in a consistent and structured way. In a Java project, these updates are organized into files containing &lt;em&gt;changesets&lt;/em&gt;, which outline the specific instructions needed to modify or refactor the database schema.&lt;/p&gt;</description></item><item><title>Domain-Driven Design in Java: A Practical Guide</title><link>https://foojayio.github.io/website/today/domain-driven-design-in-java-a-practical-guide/</link><pubDate>Fri, 15 Aug 2025 09:30:31 +0000</pubDate><guid>https://foojayio.github.io/website/today/domain-driven-design-in-java-a-practical-guide/</guid><description>&lt;p&gt;While waiting for your flight in an airport, have you ever wondered how much behind-the-scenes planning it takes to keep an airport running smoothly? Every day, thousands of flights take off and land, passengers rush through terminals, and staff work tirelessly to make sure everything unfolds without a hitch. What looks like chaos on the surface is actually the result of a highly coordinated system&amp;mdash;a kind of &amp;ldquo;brain&amp;rdquo; that&amp;rsquo;s always working in the background to manage logistics, adapt to surprises, and keep the airport humming along.&lt;/p&gt;</description></item><item><title>Enforcing Governance in MongoDB Atlas with Resource Policies</title><link>https://foojayio.github.io/website/today/enforcing-governance-in-mongodb-atlas-with-resource-policies/</link><pubDate>Wed, 13 Aug 2025 12:52:05 +0000</pubDate><guid>https://foojayio.github.io/website/today/enforcing-governance-in-mongodb-atlas-with-resource-policies/</guid><description>&lt;p&gt;The growing adoption of &lt;a href="https://www.mongodb.com/lp/cloud/atlas/try4-reg/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=samuel-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB Atlas&lt;/a&gt;
 as a managed database platform increasingly demands mechanisms that align security, compliance, and governance. In April 2025, MongoDB introduced a critical feature for this purpose: &lt;a href="https://www.mongodb.com/en-us/docs/atlas/atlas-resource-policies/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=samuel-foojay&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;&lt;strong&gt;Resource Policies&lt;/strong&gt;&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;This article presents the concept and capabilities of Resource Policies, highlights their importance in enterprise environments, and demonstrates how to use them effectively via Terraform &amp;mdash; ensuring that essential configurations rely not only on best practices but also on enforceable and auditable constraints.&lt;/p&gt;</description></item><item><title>Run an Atlas cluster locally in minutes</title><link>https://foojayio.github.io/website/today/run-an-atlas-cluster-locally-in-minutes/</link><pubDate>Tue, 05 Aug 2025 07:33:47 +0000</pubDate><guid>https://foojayio.github.io/website/today/run-an-atlas-cluster-locally-in-minutes/</guid><description>&lt;p&gt;You no longer need a cloud account to try &lt;a href="https://www.mongodb.com/lp/cloud/atlas/try4-reg/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=foojay-blog-atlas&amp;amp;utm_term=tony.kim" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 Atlas features. Spin up a fully compatible local cluster in seconds, with no login, no credit card, and no friction.&lt;/p&gt;
&lt;p&gt;🕒 Reading time: 2-3 min&lt;/p&gt;
&lt;p&gt;🍃 What is the MongoDB Atlas Platform?&lt;/p&gt;
&lt;p&gt;MongoDB Atlas is a fully managed, multi-cloud data platform provided by MongoDB Inc. It allows you to deploy and run MongoDB clusters on Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure, with full support for replica sets (for high availability), sharding (for horizontal scalability), and multi-cloud deployments. Atlas handles infrastructure, backups, security, scaling, and monitoring out of the box. It also extends the core MongoDB server capabilities with a set of integrated features.&lt;/p&gt;</description></item><item><title>Why Mirroring Production in Dev Helps You Avoid Costly Mistakes</title><link>https://foojayio.github.io/website/today/why-mirroring-production-in-dev-helps-you-avoid-costly-mistakes/</link><pubDate>Mon, 28 Jul 2025 13:31:10 +0000</pubDate><guid>https://foojayio.github.io/website/today/why-mirroring-production-in-dev-helps-you-avoid-costly-mistakes/</guid><description>&lt;p&gt;&lt;strong&gt;Many developers start building their applications with MongoDB using a free M0 cluster or a local environment. While this is common and convenient, it can lead to issues that could easily be avoided by using a more robust setup, such as a development cluster that closely mirrors production. Problems like inefficient queries, missing indexes, or even costly mistakes often go unnoticed in limited environments like M0 or local setups.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this article, we&amp;rsquo;ll explore why your development environment should closely reflect your production environment, and how using an M10+ cluster with tools like Query Profiler and Performance Advisor can help you catch performance issues early and build with confidence.&lt;/p&gt;</description></item><item><title>MongoDB ACID Transactions With Java</title><link>https://foojayio.github.io/website/today/mongodb-acid-transactions-with-java/</link><pubDate>Wed, 23 Jul 2025 14:39:45 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-acid-transactions-with-java/</guid><description>&lt;p&gt;A database is constantly under pressure. Real-time applications, exponential growth of data, and multiple operations may hit the system at once. Without coordination, this can lead to race conditions, conflicts, and ultimately, the dreaded inconsistent data! To address this, MongoDB supports &lt;a href="https://learn.mongodb.com/courses/mongodb-transactions?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=java&amp;#43;acid&amp;amp;utm_term=tim.kelly" target="_blank" rel="noopener noreferrer"&gt;transactions&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;Transactions let us group multiple operations together so they either all succeed or none take effect, a concept known as &lt;a href="https://www.mongodb.com/docs/manual/reference/glossary/#std-term-atomic-operation?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=java&amp;#43;acid&amp;amp;utm_term=tim.kelly" target="_blank" rel="noopener noreferrer"&gt;atomicity&lt;/a&gt;
. MongoDB&amp;rsquo;s document model already provides atomicity at the single-document level, which covers a lot of use cases. But when you need atomicity across multiple documents or collections, transactions are the answer.&lt;/p&gt;</description></item><item><title>How to Make a RAG Application With LangChain4j</title><link>https://foojayio.github.io/website/today/how-to-make-a-rag-application-with-langchain4j/</link><pubDate>Thu, 17 Jul 2025 20:42:12 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-to-make-a-rag-application-with-langchain4j/</guid><description>&lt;p&gt;Retrieval-augmented generation, or RAG, introduces some serious capabilities to your large language models (LLMs). These applications can answer questions about your specific corpus of knowledge, while leveraging all the nuance and sophistication of a traditional LLM.&lt;/p&gt;
&lt;p&gt;This tutorial will take you through the ins and outs of creating a Q&amp;amp;A chatbot using RAG. The application will:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Retrieve data from a MongoDB Atlas database.&lt;/li&gt;
&lt;li&gt;Embed and store documents as vector embeddings.&lt;/li&gt;
&lt;li&gt;Use LangChain4J to query the database and augment LLM prompts with the retrieved data.&lt;/li&gt;
&lt;li&gt;Enable secure, scalable, and efficient AI-powered applications.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you want to see the completed application, it is available in the &lt;a href="https://github.com/mongodb-developer/langchainrag" target="_blank" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>The Great Data Reimagination: From Static to Agile in the AI Era</title><link>https://foojayio.github.io/website/today/the-great-data-reimagination-from-static-to-agile-in-the-ai-era/</link><pubDate>Tue, 15 Jul 2025 13:44:06 +0000</pubDate><guid>https://foojayio.github.io/website/today/the-great-data-reimagination-from-static-to-agile-in-the-ai-era/</guid><description>&lt;p&gt;&lt;strong&gt;We&amp;rsquo;re in the middle of a fundamental change in how enterprise software works. In the next decade, your database will become your AI.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just five years ago, choosing the right kind of database to support their applications presented complexity for many developers: relational or NoSQL? Structured or unstructured? Flexible or predictable? They didn&amp;rsquo;t know exactly what their data would look like in six months, but what they did know was that it was certain to change. This led many to make a rebel&amp;rsquo;s choice to reject the rigid structure of &lt;a href="https://thenewstack.io/introduction-to-databases/" target="_blank" rel="noopener noreferrer"&gt;SQL databases&lt;/a&gt;
 for something more fluid and adaptable.&lt;/p&gt;</description></item><item><title>Building a Spring Boot CRUD Application Using MongoDB’s Relational Migrator</title><link>https://foojayio.github.io/website/today/building-a-spring-boot-crud-application-using-mongodbs-relational-migrator/</link><pubDate>Tue, 08 Jul 2025 19:05:43 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-a-spring-boot-crud-application-using-mongodbs-relational-migrator/</guid><description>&lt;p&gt;Imagine this: You&amp;rsquo;re working with a relational database that&amp;rsquo;s served you well for years, but now your applications demand flexibility, scalability, and faster development cycles. Transitioning from structured tables to MongoDB&amp;rsquo;s dynamic, schema-less JSON documents might be daunting. That&amp;rsquo;s where MongoDB&amp;rsquo;s Relational Migrator becomes your secret weapon.&lt;/p&gt;
&lt;p&gt;The Relational Migrator tool built by MongoDB no longer only supports migrating data from relational databases to MongoDB. Rather, it supports features like code generation and also a query converter that converts a relational database, such as a Postgres query, or queries from views and stored procedures, into a MongoDB query.&lt;/p&gt;</description></item><item><title>Data Modeling for Java Developers: Structuring With PostgreSQL and MongoDB</title><link>https://foojayio.github.io/website/today/data-modeling-for-java-developers-structuring-with-postgresql-and-mongodb/</link><pubDate>Thu, 03 Jul 2025 21:02:16 +0000</pubDate><guid>https://foojayio.github.io/website/today/data-modeling-for-java-developers-structuring-with-postgresql-and-mongodb/</guid><description>&lt;p&gt;&lt;strong&gt;Application and system designs have always been considered the most essential step in application development. All the later steps and technologies to be used depend on how the system has been designed. If you are a Java developer, choosing the right approach can mean distinguishing between a rigid, complex schema and a nimble, scalable solution. If you are a Java developer who works with PostgreSQL or other relational databases, you understand the pain of representing the many-to-many relationships between the tables.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Java Virtual Threads in Action: Optimizing MongoDB Operation</title><link>https://foojayio.github.io/website/today/java-virtual-threads-in-action-optimizing-mongodb-operation/</link><pubDate>Tue, 01 Jul 2025 08:12:24 +0000</pubDate><guid>https://foojayio.github.io/website/today/java-virtual-threads-in-action-optimizing-mongodb-operation/</guid><description>&lt;p&gt;Virtual threads have become one of the most popular resources in Java and are trending inside the language. Indeed, this resource introduced a cheap way to create threads inside the JVM. In this tutorial, we will explain how to use it with MongoDB.&lt;/p&gt;
&lt;p&gt;You can find all the code presented in this tutorial in the &lt;a href="https://github.com/soujava/mongodb-virtual-threads" target="_blank" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;
:&lt;/p&gt;
&lt;pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""&gt;git clone &lt;a href="https://foojayio.github.io/website/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fe99978abe99978a968b9cd09d9193"&gt;[email&amp;nbsp;protected]&lt;/a&gt;:soujava/mongodb-virtual-threads.git
&lt;/pre&gt;
&lt;h2 id="h2-0-prerequisites"&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;For this tutorial, you&amp;rsquo;ll need:&lt;/p&gt;</description></item><item><title>How to Identify the Underlying Causes of Connection Timeout Errors for MongoDB With Java</title><link>https://foojayio.github.io/website/today/how-to-identify-the-underlying-causes-of-connection-timeout-errors-for-mongodb-with-java/</link><pubDate>Thu, 26 Jun 2025 12:13:44 +0000</pubDate><guid>https://foojayio.github.io/website/today/how-to-identify-the-underlying-causes-of-connection-timeout-errors-for-mongodb-with-java/</guid><description>&lt;p&gt;Java developers and &lt;a href="https://dzone.com/refcardz/mongodb" target="_blank" rel="noopener noreferrer"&gt;MongoDB&lt;/a&gt;
 are like Aladdin and the Genie from Arabian Nights. Developers rub the lamp with their wildest NoSQL wishes, and MongoDB swoops in, granting &lt;a href="https://dzone.com/refcardz/getting-started-with-spring-boot-and-microservices" target="_blank" rel="noopener noreferrer"&gt;Spring Boot microservices&lt;/a&gt;
 and REST APIs the magic they need to soar. But every so often, a Jafar-like menace swoops in, forcing our Aladdin (Java devs) to wrestle with sleepless nights. One such villainous foe is the connection timeout, locking APIs in a cave of wonders with no escape, leaving developers yearning for a magic carpet fix.&lt;/p&gt;</description></item><item><title>Clean and Modular Java: A Hexagonal Architecture Approach</title><link>https://foojayio.github.io/website/today/clean-and-modular-java-a-hexagonal-architecture-approach/</link><pubDate>Tue, 24 Jun 2025 08:03:50 +0000</pubDate><guid>https://foojayio.github.io/website/today/clean-and-modular-java-a-hexagonal-architecture-approach/</guid><description>&lt;p&gt;One of the discussions that always leaves me with both doubts and excitement is the one about system architecture. Ever since I started diving deeper into programming, I&amp;rsquo;ve encountered questions like how to separate packages and modules: is it really worth creating so many divisions? I must admit, it&amp;rsquo;s often complicated to understand or make decisions without being fully sure that I&amp;rsquo;m doing the right thing.&lt;/p&gt;
&lt;p&gt;Right from the start, I want to make it clear that this content will definitely spark a lot of discussion around best practices and whether what I&amp;rsquo;m doing is correct &amp;mdash; but, above all, I guarantee it will be fun!&lt;/p&gt;</description></item><item><title>Multi-cloud Strategies With MongoDB Atlas</title><link>https://foojayio.github.io/website/today/multi-cloud-strategies-with-mongodb-atlas/</link><pubDate>Thu, 19 Jun 2025 11:49:29 +0000</pubDate><guid>https://foojayio.github.io/website/today/multi-cloud-strategies-with-mongodb-atlas/</guid><description>&lt;p&gt;&lt;strong&gt;In the technological world, the cloud has become more prevalent. It brings many benefits, including flexibility, scalability, faster innovation, and collaboration. Plus, when it comes to data storage and access with databases, it allows data to be located closer to the user for lower latency and thus, faster performance.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most people have heard of the big cloud providers, such as Azure from Microsoft, Google Cloud, and Amazon Web Services (AWS). But when it comes to a business selecting a cloud provider, how do you choose?&lt;/p&gt;</description></item><item><title>Your Complete Guide to Diagnose Slow Queries in MongoDB</title><link>https://foojayio.github.io/website/today/your-complete-guide-to-diagnose-slow-queries-in-mongodb/</link><pubDate>Tue, 17 Jun 2025 04:06:04 +0000</pubDate><guid>https://foojayio.github.io/website/today/your-complete-guide-to-diagnose-slow-queries-in-mongodb/</guid><description>&lt;p&gt;MongoDB is built to be fast. The real win comes from knowing how to keep it that way, even as your app grows and your data gets more complex.&lt;/p&gt;
&lt;p&gt;This tutorial is for those developers and engineers who want to understand how MongoDB behaves when queries or writes slow down. We&amp;rsquo;re not here to hand you indexing tips or premature advice about schema design. We&amp;rsquo;re here to walk through the actual tools MongoDB gives you to observe, measure, and reason about query performance, before you start optimizing anything.&lt;/p&gt;</description></item><item><title>Java Concurrency Best Practices for MongoDB</title><link>https://foojayio.github.io/website/today/java-concurrency-best-practices-for-mongodb/</link><pubDate>Thu, 12 Jun 2025 15:30:29 +0000</pubDate><guid>https://foojayio.github.io/website/today/java-concurrency-best-practices-for-mongodb/</guid><description>&lt;p&gt;In a multi-threaded, distributed environment like MongoDB, when clients execute queries concurrently, operations interleave with one another if they are not isolated, whether those operations involve single-document or multi-document operations.&lt;/p&gt;
&lt;p&gt;For instance, Client C1&amp;rsquo;s read operation might observe the effects of a write performed by Client C2, even if that write has not yet been made durable. When at least one of the concurrent operations is a write and isolation is not enforced, this can lead to undesirable outcomes, such as:&lt;/p&gt;</description></item><item><title>MongoDB Aggregation Framework: A Beginner’s Guide</title><link>https://foojayio.github.io/website/today/mongodb-aggregation-framework-a-beginners-guide/</link><pubDate>Thu, 05 Jun 2025 06:20:02 +0000</pubDate><guid>https://foojayio.github.io/website/today/mongodb-aggregation-framework-a-beginners-guide/</guid><description>&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/CbYitR4mR6I?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;p&gt;Finding exactly the data we need isn&amp;rsquo;t always a simple task.&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ve probably faced situations where you needed to filter information, group it, and even perform calculations to produce a final result.&lt;/p&gt;
&lt;p&gt;And often, delivering this processed data to the client is essential for the application&amp;rsquo;s success. MongoDB offers two main ways to fetch data:&lt;/p&gt;</description></item><item><title>Testing MongoDB Atlas Search Java Apps Using TestContainers</title><link>https://foojayio.github.io/website/today/testing-mongodb-atlas-search-java-apps-using-testcontainers/</link><pubDate>Thu, 29 May 2025 18:07:27 +0000</pubDate><guid>https://foojayio.github.io/website/today/testing-mongodb-atlas-search-java-apps-using-testcontainers/</guid><description>&lt;p&gt;This will be an exploration of testing MongoDB Atlas Search solutions written in Java using TestContainers and JUnit5. We&amp;rsquo;ll start simple and build up to more advanced uses which load seed data and provide an environment for consistent and easy to maintain tests.&lt;/p&gt;
&lt;p&gt;TLDR; if (like me!) you want to get straight to the code rather than reading lots of tedious words:&lt;/p&gt;
&lt;pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""&gt;git clone https://github.com/luketn/mongodb-atlas-local-testcontainers.git
cd mongodb-atlas-local-testcontainers
mvn test&lt;/pre&gt;
&lt;h2 id="h2-0-what-is-mongodb-atlas-search-anyway"&gt;What is MongoDB Atlas Search, anyway?&lt;/h2&gt;
&lt;p&gt;MongoDB Atlas Search is an extension to the built-in indexing capabilities that are part of MongoDB itself, using the awesome open source indexing and query library &lt;a href="https://lucene.apache.org/" target="_blank" rel="noopener noreferrer"&gt;Lucene&lt;/a&gt;
. MongoDB has built a wrapper around Lucene called &lt;a href="https://www.mongodb.com/docs/atlas/atlas-search/?utm_campaign=devrel&amp;amp;utm_source=third-party-content&amp;amp;utm_medium=cta&amp;amp;utm_content=Testing&amp;#43;MongoDB&amp;#43;Atlas&amp;#43;Search&amp;#43;Java&amp;#43;Apps&amp;#43;Using&amp;#43;TestContainers&amp;amp;utm_term=megan.grant#fts-architecture/" target="_blank" rel="noopener noreferrer"&gt;mongot&lt;/a&gt;
.&lt;/p&gt;</description></item><item><title>Understanding BSON: A Beginner’s Guide to MongoDB’s Data Format</title><link>https://foojayio.github.io/website/today/understanding-bson-a-beginners-guide-to-mongodbs-data-format/</link><pubDate>Thu, 22 May 2025 08:05:06 +0000</pubDate><guid>https://foojayio.github.io/website/today/understanding-bson-a-beginners-guide-to-mongodbs-data-format/</guid><description>&lt;p&gt;&lt;strong&gt;When working with MongoDB, it&amp;rsquo;s easy to think you&amp;rsquo;re dealing with JSON. After all, the queries, documents, and API responses all look like JSON. But MongoDB is not storing JSON. It&amp;rsquo;s storing BSON&amp;mdash;a binary format designed for efficient storage and fast traversal.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;BSON (Binary JSON) is more than just a binary version of JSON. It introduces additional data types like ObjectId, Decimal128, and Timestamp, allowing MongoDB to handle more complex data structures and ensure data integrity. While we might rarely interact with raw BSON directly, understanding how MongoDB stores and processes BSON documents can help us write more efficient queries, handle data conversions properly, and debug unexpected behavior.&lt;/p&gt;</description></item><item><title>Building a Real-Time AI Fraud Detection System with Spring Kafka and MongoDB</title><link>https://foojayio.github.io/website/today/building-a-real-time-ai-fraud-detection-system-with-spring-kafka-and-mongodb/</link><pubDate>Wed, 14 May 2025 14:30:08 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-a-real-time-ai-fraud-detection-system-with-spring-kafka-and-mongodb/</guid><description>&lt;p&gt;In this tutorial, we&amp;rsquo;ll build a real-time fraud detection system using MongoDB Atlas Vector Search, Apache Kafka, and AI-generated embeddings. We&amp;rsquo;ll demonstrate how MongoDB Atlas Vector Search can be used to detect anomalies in a stream of financial transactions by analyzing a user&amp;rsquo;s transaction history and identifying suspicious behavior based on LLM-generated embeddings.&lt;/p&gt;
&lt;p&gt;Our solution will monitor MongoDB Change Streams using the Java synchronous driver, triggering vector searches on each new transaction to detect potential fraud. While this approach works well for our demo, and for many use cases, we&amp;rsquo;ll also discuss its limitations. Throughout the tutorial, I&amp;rsquo;ll cover alternative strategies to optimize performance, whether you need higher transaction throughput, faster fraud detection, or a more scalable architecture.&lt;/p&gt;</description></item></channel></rss>