Table of Contents A story about legacyEvaluating SpEL expressionsImplementing the audit adviceTesting the audit aspectImprovementsFootnotes In this article, we’ll implement a declarative API to perform tasks belonging to cross-cutting concerns, using auditing as an example. We’ll see how SpEL and …
-
Sliding Window Log Rate Limiter (Redis & Java)
Table of Contents IndexHow It Works1. Define a Time Window2. Track Requests3. Remove Expired Entries4. Rate Limit CheckHow to Implement It with Redis and Java1. Log Each Request (If Allowed)2. Remove Expired Entries3. Count Requests in the Time WindowImplementing it …
-
My first steps with Playwright
Table of Contents The contextGetting my feet wetStoring cookiesAdapting to realityConclusion In my previous company, I developed a batch job that tracked metrics across social media, such as Twitter, LinkedIn, Mastodon, Bluesky, Reddit, etc. Then I realized I could duplicate …
-
Project Loom: Structured Concurrency – Java
Table of Contents What is Structured Concurrency?How Structured Concurrency Works?Benefits of Strutured ConcurrencyConclusionReferences In today’s era of cloud computing, where high-performance infrastructure is readily available, developers face a complex challenge in achieving efficient concurrency. While modern technological advancements have brought …
-
Make the Life of your Developer Client’s Easier with Smart Object Builders
Table of Contents The scenario: The complex objectThe traditional approach: Telescoping constructorsFavor Static Factory Methods over Class ConstructorsMany parameters? Use the Builder patternRestricts the order of method calls in the Builder patternConclusionKey TakeawaysFinal Thoughts We often hear the phrase: “Make …
-
AI-powered Chat Application using IBM watsonx.ai and Spring AI
Table of Contents PricingIBM watsonx.aiCreating IBM watsonx.ai Chat-based ApplicationPrerequisitesConfigurationsChatbotChat ApplicationBasic ChatStreaming Chat Generative Artificial Intelligence (Gen AI) disrupted enterprises with the introduction of GPT-4 foundation model by Open AI in the late 2022 to early 2023 triggering big tech to …
-
Front End Debugging Part 2: Console.log() to the Max
Table of Contents Understanding Front-End Logging vs. Back-End LoggingLeveraging Console Log LevelsCustomizing Console Output with CSSStack Tracing with console.trace()Assertions for Design-by-ContractPrinting Tables for Clearer Data VisualizationCopying Objects to the ClipboardInspecting with console.dir() and dirxml()Counting Function CallsOrganizing Logs with GroupsChrome-Specific Debugging …
-
strace Revisited: Simple is Beautiful
Table of Contents In the realm of system debugging, particularly on Linux platforms, strace stands out as a powerful and indispensable tool. Its simplicity and efficacy make it the go-to solution for diagnosing and understanding system-level operations, especially when working …
-
Langchain4J Musings
Table of Contents Choosing a LLMQuick introduction to LangChain4J and OllamaGetting our feet wetThe LangChain4j appThe Ollama infrastructureEnhancing with streamingRemembering historyAdding Retrieval-Augmented GenerationConclusion I’m coming relatively late to the LLM party, but I rarely come very early in the hype …
-
Spring Boot: Java Template Engine (JTE)
Table of Contents Hello to all Java and Spring enthusiasts. I am the Java Template Engine, a fresh newcomer to the Spring Initializer Ecosystem. Hello to all Java and Spring enthusiasts. I am the Java Template Engine, a fresh newcomer …
-
Front End Debugging Part 1: Not just Console Log
Table of Contents Instant Debugging with the debugger KeywordTriggering Debugging from the ConsoleDOM Breakpoints: Monitoring DOM ChangesXHR Breakpoints: Uncovering Hidden Network CallsSimulating Environments for DebuggingDebugging Layout and Style IssuesFinal Word Instant Debugging with the debugger Keyword Triggering Debugging from the …