Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Week 9 of #100DaysOfCode: A Week of Deep Spring Learning

Introduction This week, I decided to slow down and go deeper into the Spring Framework . Instead of focusing heavily on building new features, I spent most of my time understanding what happens behind the scenes in the framework I use to build backend applications. I explored concepts around Spring AOP, JDBC, Caching, Reactive Programming, and Concurrency , learning not just how to use these…

Week 9 of #100DaysOfCode: A Week of Deep Spring Learning

Introduction

Last week, I took a step back to gain a deeper understanding of the Spring Framework. Instead of focusing on building new features, I spent most of my time exploring the underlying mechanisms of the framework used for building backend applications. I delved into topics such as Spring AOP, JDBC, Caching, Reactive Programming, and Concurrency, not just learning how to use these features but also understanding the problems they aim to solve.

While applying for backend engineering opportunities and preparing for technical interviews, I maintained my consistency with the #100DaysOfCode challenge.

Day 52: Understanding Spring Caching

Today, I began learning about Spring Caching and its role in improving application performance. My key takeaways include:

- The concept of caching and where it can be utilized

- How Spring's Cache Abstraction functions

- The roles of Cache and CacheManager

- Different cache providers available

- How caching can minimize repeated executions and avoid unnecessary database calls

- The Proxy Pattern used by Spring to apply caching behavior

- Various caching annotations, including @Cacheable, @CachePut, @CacheEvict, @Caching, and @CacheConfig

- How Spring uses AOP and Around Advice to implement caching

One significant insight was that caching is an example of how Spring applies AOP to separate cross-cutting concerns from business logic. Instead of incorporating caching logic directly into business methods, Spring can apply it around those methods through proxies. Additionally, I began to understand that caching is not merely about storing data; the application must decide what should be cached, how the cache should be configured, and when cached data should be updated or removed.

Day 53: Complete reading Spring Caching

Today, I continued learning about Spring Caching, building upon the knowledge acquired the previous day. My understanding deepened on these aspects:

- Enabling Spring's caching abstraction using @EnableCaching

- Roles of @Cacheable, @CachePut, and @CacheEvict annotations

- Configuring cache storage

- Caching best practices

- How Spring employs AOP and Around Advice to apply caching behavior

This reinforced my understanding of how Spring manages caching behind the scenes, distinct from adding caching logic directly into business methods. Spring utilizes AOP to apply caching behavior via proxies, connecting with the concepts of cross-cutting concerns and Spring AOP previously learned.

Day 54: Getting Started with Reactive Design Patterns

I embarked on learning Reactive Design Patterns in Spring, focusing on the importance of reactive programming for modern applications. Key insights included:

- The need for reactive programming due to modern applications needing to handle large-scale concurrency

- Differences between blocking and non-blocking calls

- Principles of reactive systems, including responsiveness, resilience, scalability, and message-driven architecture

- How reactive systems are designed to handle high traffic and concurrency

This introduction to reactive programming provided a foundation for understanding how Spring supports reactive applications.

Day 55: Understanding Reactive Streams and Spring Web Reactive

Today, I delved deeper into Reactive Programming with Spring, focusing on the handling of asynchronous data and concurrent requests. Key learnings included:

- What Reactive Streams are

- The concept of back-pressure in reactive systems

- The Reactor framework

- The four Reactive Streams interfaces: Publisher, Subscriber, Subscription, and Processor

- Differences between Spring MVC and Spring Web Reactive

- How blocking and non-blocking request handling differ

A crucial insight was the concept of back-pressure, which enables a consumer to control how much data it can handle from a producer, preventing system overload. Additionally, I learned that Spring Web Reactive is designed for non-blocking request processing, making it suitable for applications requiring efficient handling of concurrent operations.

Day 56: Completing Reactive Design Patterns

Today marked the completion of the Reactive Design Patterns chapter, further solidifying my understanding of how Spring builds reactive web applications. Key learnings included:

- The functional programming model for reactive applications

- RouterFunction and HandlerFunction

- Working with Mono and Flux

- Creating reactive servers using Reactor and Tomcat

- Using Spring WebClient for reactive client-side communication

- Reactive request and response body conversion using Encoder and Decoder

- How Spring supports both annotation-based and functional programming models for reactive applications

- Handling data using non-blocking streams in reactive applications

Completing this chapter connected various concepts learned in recent days, from reactive systems and back-pressure to Reactive Streams, Reactor, and Spring Web Reactive. Although an unfamiliar area, I now have a better understanding of how Spring approaches asynchronous and non-blocking programming.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Raku: a language that counts to infinity (Part 1)

We've already seen that Raku understands characters like ∞ , and it would be logically that you can use them with ease, similar to any other constructs of the language.

  • Raku language handles infinite sequences using symbols like infinity (∞)
  • Infinite sequences can be defined with patterns and filtered by conditions
  • Lazy computations in Raku only calculate values as needed

Your dog walker says they went. This makes the walk say so too.

This is a submission for Weekend Challenge: Dog Days Edition TL;DR — A walker records the walk on their phone, the route is hashed in the browser, and a 147-byte attestation signed by the walker's own…

  • Dog walker records and hashes walk route on Solana devnet
  • Owner verifies walk trace by comparing computed hash with attestation
  • Verification process requires only two clicks without wallets or SOL

Count the Resolver, Not the Query, to Catch a GraphQL N+1

You will catch a GraphQL N+1 much earlier by counting how many times your batch loader is called against a temporary mock server than by measuring response time, because latency tests hide the problem…

  • Count batch loader calls, not response time, to detect GraphQL N+1 issues
  • Create mock server to log batch sizes per batch loader function call
  • Assert largest batch size matches unique keys in response output

AIOps Is More Than Just a Chatbot

It started with a Discord bot React ChatBotify is an open-source project I maintain, and part of that meant looking after its websites and servers.

  • AcornOps began as a Discord chatbot called React ChatBotify.
  • Ning suggested expanding the chatbot into a full-fledged AIOps platform.
  • AcornOps has evolved significantly since its inception.

Fixing Low USB-C Audio on Fedora Linux: My Battle with the Razer Leviathan

TL;DR: If you have a Razer Leviathan connected via USB-C on Linux and the volume is incredibly quiet even at 100%, PipeWire is likely crushing your ALSA hardware baseline on boot.

  • Fedora Linux user faced low audio volume on Razer Leviathan USB-C speaker
  • PipeWire session manager compressed hardware volume limits during boot
  • Bash script automatically adjusts audio settings upon login to restore full volume

More from Sunday 16 August →