Table of Contents 1. MongoDB’s Query ProfilerWhat we’ll needWhat is MongoDB’s Profiler?MongoDB Atlas Query Profiler in the Atlas UIA few important considerationsMongoDB Database ProfilerLet’s make something slow on purpose2. Understanding execution plans with explain()What we’ll needWhat is explain()?Verbosity modesLet’s use …
-
Performance Best Practise No. 1: Optimize Database Operations
Table of Contents How GlassFish helps with improving database performanceConnection pool configurationJDBC batchingJakarta Persistence (JPA) batchingNext Steps Database operations are a very critical part of most applications in regards of performance. There are multiple reasons why database operations can significantly …
-
Intro to RAG: Foundations of Retrieval Augmented Generation, part 2
Table of Contents GenAI systems as layersVector RAGGraph RAGAI AgentsModel Context Protocol (MCP)What should you choose?Wrapping up!Resources In the last post, we discussed the basics of Retrieval Augmented Generation (RAG) and how it enhances the capabilities of Large Language Models …
-
MongoDB Aggregation Framework: A Beginner’s Guide
Table of Contents Aggregation pipelineAggregation stages$Match$Project$Unwind$Group$Sort$AddFieldsCombining stagesWrapping up Finding exactly the data we need isn’t always a simple task. You’ve probably faced situations where you needed to filter information, group it, and even perform calculations to produce a final result. …
-
Testing MongoDB Atlas Search Java Apps Using TestContainers
Table of Contents What is MongoDB Atlas Search, anyway?Local development and testing with MongoDB Atlas SearchWhat’s TestContainers?Let’s write some code!Simple CRUD data access and unit testsMongoDB Atlas Search with seed data and index waitAdvanced seed data loading: MongoDB Database ToolsLoading …
-
Intro to RAG: Foundations of Retrieval Augmented Generation, part 1
Table of Contents Why RAG?Large Language Models (LLMs)Vector embeddingsVectors applied to wordsVectors applied to dataSimilarity searchWrapping up!Resources Retrieval Augmented Generation (RAG) may sound complex, but it accurately represents the process of the system. RAG is a method that enhances the …
-
Understanding BSON: A Beginner’s Guide to MongoDB’s Data Format
Table of Contents What is BSON?Why not just JSON?BSON vs. JSONCommon BSON data types (and their Java equivalents)BSON and MongoDB internalsSetup and project structureBSON data types and document creationNested fields and arraysWhy use nested structures?Raw BSON manipulationQuerying with BSONAggregation with …
-
Building a Real-Time AI Fraud Detection System with Spring Kafka and MongoDB
Table of Contents What we are buildingPrerequisitesCreate our MongoDB databaseCreate a Vector Search indexCreate a Spring applicationSetting up configurationMongoDB configurationSpring AI configurationKafka configurationGenerate our synthetic customer profilesThe customer modelCustomer seedingHow the sample customers are structuredThe transaction modelGenerating random transactionsHow do …
-
GenAI blood, sweat, and tears: Loading data to Pinecone
Table of Contents Getting startedIssue #1: APIs, SDKs, and rapid changeIssue #2: ConfigIssue #3: JSON formatIssue #4: Loading data to Pinecone1. Metadata keysAlternative embeddings – Book descriptionsWrapping up!Resources As someone who is pretty familiar with relational and graph databases, I …
-
Semantic Search with Spring Boot & Redis
Table of Contents Redis as a Vector DatabaseRedis OM SpringDatasetBuilding the Application0. GitHub Repository1. Add the required dependencies2. Define the Movie entity3. Repository Interface4. Search Service5. Movie Service for Data Loading5. Search Controller6. Application Bootstrap7. Sample RequestsWrapping upMore AI ResourcesStay …
-
Breaktime Tech Talks (Ep39): Why embedding models should match + Advice for starting a blog
Table of Contents Why embedding models should matchDifferences in similarity searchAdvice for starting a blogWrapping up! This is episode 39 of the Breaktime Tech Talks podcast. I’m at a conference this week presenting on a variety of different topics, but …