Urgent.News

What's breaking now, across thousands of outlets.

Tech

NestJS vs Go: Lessons From Production Projects

Four production systems, 18 user roles, around 460 candidates, deadline queues, and video lessons for up to 100 participants — what made NestJS a fit, and where Qtim introduced Go. A student opens one lesson. The product checks their role, loads the schedule, shows the right assignments, accepts a file, and starts a video session. For the student, this is one interface. For the backend, it is a…

NestJS proved to be a suitable choice for Qtim's online education platform dealing with four production systems and 18 user roles. For this project, the backend required access control, state transitions, background processing, reports, integrations, and a live media path. The team utilized NestJS modules, services, guards, and policies to manage the access control system, ensuring that each user role had its own view of groups, schedules, assignments, and project settings. This separation of rules made access changes predictable and quick to implement.

In contrast, Go was introduced into the architecture for one specific subsystem: video. The challenges included WebRTC, an SFU, media routing, and latency management. These factors created a different workload compared to the rest of the system. The video path required CPU-intensive tasks such as packet processing, SFU routing, and fan-out to many participants. Due to the distinct nature of this workload, Qtim decided to operate it independently using Go.

The lessons learned from production projects highlighted the importance of considering the parts of the system that change most often and carry the heaviest load when making a stack decision. In Qtim's case, access control proved to be the most frequently changing and critical aspect of the backend. By choosing NestJS for this area, the team ensured flexibility and ease of implementation for new roles and workflows without weakening the access model.

The university attestation platform, requiring registration, document checks, exams, video evidence, assessment, protocols, reports, and federal-registry exports, demonstrated the value of preserving rules and maintaining testable processes. The architecture focused on keeping each status, document, recording, and permission within one process, ensuring smooth transitions and maintaining the rules.

A heavy workload was isolated in a queue using BullMQ and Redis, allowing students to submit assignments and return to lessons without interruption. Voice recordings were processed in the background, ensuring a consistent format across devices while maintaining a smooth user journey.

For video lessons with up to 100 participants, Qtim kept the API, administration tools, roles, and schedules in NestJS while utilizing WebRTC and Go for the media subsystem. This allowed the Node.js runtime to handle large volumes of concurrent I/O efficiently, while the media path, with its CPU-intensive work, could be managed independently. This mixed architecture provided a clear division of responsibility, enabling the platform to deliver a seamless experience to users while optimizing resource utilization.

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

Demystifying Greedy Algorithms: How Local Choices Solve Global Problems in Node.js

What is a Greedy Algorithm? A greedy algorithm is an algorithmic strategy that solves a problem by making the most optimal decision at each individual step.

  • Greedy algorithms make locally optimal decisions at each step
  • Efficiently solve complex problems like network routing and query optimization
  • Node.js example shows quick coin change calculation using greedy method

How to Implement an API Readiness Endpoint

An API readiness endpoint is a dedicated HTTP endpoint used by the surrounding infrastructure to determine whether an application can currently receive traffic.

  • Track application state (starting, ready, shutting down)
  • Expose dedicated /ready endpoint returning 200 OK or 503
  • Configure infrastructure to periodically call readiness endpoint

More from Thursday 15 October →