↓ Skip to main content

Posts

All posts: MCP servers, AI agents, open-source contributions, Python, trading bots and DevOps.

65 posts · RSS

2026

  1. Keploy Contribution: Go defer and HTTP Body Leaks

    Two merged PRs to Keploy: a function that read from a closed file and HTTP response bodies that were never closed. What they taught me about defer in Go.

    5 min read Open Source

2025

  1. Apache Kafka Event Streaming with KRaft and Python

    Event streaming on Kafka 4 without ZooKeeper (KRaft): partition sizing, a no-loss producer, offset commits and rebalance tuning, with confluent-kafka in Python.

    8 min read Backend

  2. Git Branching Strategies: GitFlow vs Trunk-Based

    Git branching strategies compared: GitFlow, trunk-based development, merge queues, squash merges, Conventional Commits, pre-commit hooks and git bisect.

    7 min read DevOps

  3. gRPC High-Performance APIs with Python asyncio

    Service-to-service APIs with gRPC and Protobuf: grpcio asyncio server and client, streaming, deadlines, interceptors, schema evolution, HTTP/2 load balancing.

    7 min read Backend

  4. Advanced pytest: Fixtures, Mocking and Hypothesis

    Advanced testing with pytest 8: fixture scopes, parametrize, mocking with mocker and respx, async tests, Hypothesis property tests, snapshots and CI settings.

    8 min read Python

  5. Real-Time WebSockets with FastAPI and Redis

    Build a FastAPI WebSocket server, scale it across instances with Redis Pub/Sub, and handle pings, auth, Nginx proxying and client reconnects with backoff.

    7 min read Backend

  6. Elasticsearch Full-Text Search in Production

    Full-text search with Elasticsearch 8/9 and the Python client: strict mappings, language analyzers, zero-downtime reindexing with aliases, shards, pagination.

    8 min read Backend

  7. Python Image Processing: Pillow or OpenCV?

    Image processing in Python with Pillow 11+ and OpenCV 4.x: safe uploads, EXIF rotation, WebP, headless OpenCV in Docker and a background processing pipeline.

    8 min read Python

  8. Python Logging Best Practices with structlog

    Python logging best practices: stdlib logging rules, JSON logs with structlog, request IDs, redacting secrets, OpenTelemetry trace IDs, common mistakes.

    7 min read Python

  9. Celery vs Arq: Async Task Queues in Python

    Celery vs Arq for Python task queues: safe Celery settings, an async Arq worker, idempotency, visibility timeouts, retries and Arq's maintenance mode.

    8 min read Backend

  10. Building a Reliable Webhook Handler in Python

    A reliable webhook handler in Python and FastAPI: HMAC signature checks, replay protection, a durable inbox table, idempotent processing and event fan-out.

    8 min read Backend

2024

  1. Redis Caching and Session Management in Python

    Redis caching and session management with redis-py asyncio: cache-aside with stampede protection, server-side sessions, Streams, locks and eviction policies.

    8 min read Backend