SShortSingh.
Back to feed

Developer shares hard lessons building a Slack deploy queue bot with NestJS and Redis

0
·2 views

A software developer documented the technical challenges of building a Slack bot to manage deployment queues across multiple teams and environments, sharing lessons learned in production. The project used NestJS, PostgreSQL via Prisma, Redis with BullMQ for background jobs, and Slack's Bolt SDK for integration. One key challenge involved Slack's Block Kit lacking native support for dependent dropdowns, which was solved by dynamically updating modals and changing block IDs to bypass Slack's internal state cache. Timeout logic for queue entries was made restart-safe by storing scheduled jobs in Redis via BullMQ with deterministic job IDs, rather than relying on in-memory setTimeout calls. The developer also replaced a stored queue-position column with a runtime-computed SQL query to avoid race conditions and data corruption when users leave the queue mid-process.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Why AI Agent Pull Requests Fail and How Repo Contracts Can Fix It

Developer Bobai Kato published an article on DEV Community on July 16 exploring why pull requests submitted by AI agents frequently get rejected. The piece examines the concept of 'repo contracts' as a structured solution to improve AI agent reliability in code repositories. Kato argues that clear repository-level agreements or specifications can help AI agents better understand project standards before submitting changes. The article is tagged under topics including AI agents, repo readiness, verification, and agent safety, and is estimated to be a five-minute read.

0
ProgrammingDEV Community ·

Why One Developer Ditched Node.js and Switched to Deno for New Projects

A software developer has shared their experience moving away from Node.js to Deno for new projects, citing frustration with the heavy configuration overhead that comes with modern Node.js development. The author notes that starting a typical Node.js project requires setting up ESLint, Prettier, TypeScript configs, and a test runner before writing any business logic. After briefly trying Deno in 2021 and finding its ecosystem immature, the developer returned to it later and found that TypeScript runs out of the box with no installation or configuration needed. Built-in formatting, linting, and testing tools, along with a permission-based security model, made the experience significantly leaner. The developer now recommends Deno as the default choice for greenfield JavaScript and TypeScript projects.

0
ProgrammingDEV Community ·

How the A* Algorithm Stops Video Game Characters from Walking into Walls

The A* (A-Star) algorithm is a pathfinding method used in video games to help characters navigate complex environments with obstacles like walls and doorways. Unlike simpler approaches that only move a character toward the nearest point of a destination, A* balances two factors: the actual movement cost from the starting point and the estimated distance remaining to the goal. This dual-metric approach prevents characters from taking unnatural paths, such as walking straight into a wall and sliding along it until they find a doorway. Instead, A* evaluates surrounding grid nodes and backtracks to identify the most efficient overall route, such as a diagonal path to an off-center door. The result is smoother, more realistic in-game navigation that responds naturally to player input.

0
ProgrammingDEV Community ·

How Good System Designs Slowly Decay: Key Anti-Patterns in Domain Modeling

Well-designed software systems rarely fail all at once — they degrade gradually through small, repeated modeling mistakes accumulated over time. Common anti-patterns include bloated service classes that absorb unrelated logic, entities reduced to passive data holders with no embedded business rules, and business invariants scattered across controllers, services, and helpers instead of being centrally owned. Mixing aggregates such as Cart, Order, and Payment into shared state, or over-splitting logic into too many micro-services, further fragments responsibility and makes systems harder to debug. Ignoring value objects, skipping explicit state machines, and adding unnecessary abstraction layers before understanding the domain also accelerate this decay. The core principle is that clear ownership of business behavior — through well-defined aggregates, bounded contexts, and centralized invariants — is what keeps systems maintainable as code evolves and requirements grow.