Go Concurrency Patterns(Worker Pools Pattern)

Overview

The Worker Pools pattern maintains a fixed number of workers that process jobs from a shared queue. This pattern is essential for controlling resource usage, handling bursty workloads, and providing predictable performance in concurrent systems.

NOTE: For other posts on concurrency patterns, check out the index post to this series of concurrency patterns.

Implementation Details

Continue reading “Go Concurrency Patterns(Worker Pools Pattern)”

Go Concurrency Patterns(Fan-out/Fan-in Pattern)

Overview

The Fan-out/Fan-in pattern is a concurrency pattern that distributes work across multiple workers (fan-out) and then collects results from all workers (fan-in). This pattern is essential for parallel processing of independent tasks, load balancing, and improving throughput for CPU-intensive operations.

NOTE: For other posts on concurrency patterns, check out the index post to this series of concurrency patterns.

Implementation Details

Continue reading “Go Concurrency Patterns(Fan-out/Fan-in Pattern)”

Go Concurrency Patterns(Pipeline Pattern)

Overview

The Pipeline pattern is a fundamental concurrency pattern that connects multiple stages of processing where each stage processes data and passes it to the next stage. This pattern is particularly useful for data transformation workflows, stream processing, and multi-step computations.

NOTE: For other posts on concurrency patterns, check out the index post to this series of concurrency patterns.

Implementation Details

Continue reading “Go Concurrency Patterns(Pipeline Pattern)”

Implementing Datadog in iOS: A SwiftUI vs UIKit Perspective

I’ve been diving deep into implementing Datadog in iOS applications and wanted to share my experience with both SwiftUI and UIKit approaches and the related elements of the work. Let’s break this down into what works, what doesn’t, and why you might choose various options when using Datadog (or deciding not to use Datadog).

The Setup

First things first, you’ll need these Datadog SDK packages:

dependencies: [
    .package(url: "https://github.com/DataDog/dd-sdk-ios", from: "2.27.0")
]
Continue reading “Implementing Datadog in iOS: A SwiftUI vs UIKit Perspective”

Generating Realistic Humidity Data for TimeScale DB with Data Diluvium

For next steps of why I set up TimeScale DB up for local dev, and being able to just do things, I need two new data generators over on Data Diluvium. One for humidity, which will be this post, and one for temperature, which will be next.

Why Humidity Data?

When working with TimeScale DB for time-series data, having realistic environmental data is crucial. I’ve found that humidity is a particularly important parameter that affects everything from agriculture to HVAC systems. Having realistic humidity data is essential for:

  • Testing environmental monitoring systems
  • Simulating weather conditions
  • Developing IoT applications
  • Training machine learning models for climate prediction

The Implementation

I created a humidity generator that produces realistic values based on typical Earth conditions. Here’s what I considered:

  • Average humidity ranges (typically 30-70% for most inhabited areas)
  • Daily variations (higher in the morning, lower in the afternoon)
  • Seasonal patterns
  • Geographic influences
Continue reading “Generating Realistic Humidity Data for TimeScale DB with Data Diluvium”