Computer Science

Computer Science

In this section, we explore the world of programming, algorithms, networks, and infrastructure

ProgrammingAlgorithmsComputer NetworksTechnologyInfrastructureSoftware EngineeringHardware Engineering

Related Categories

Featured Articles

Node.js Cluster Module: Scaling Applications with Workers

The Cluster module in Node.js enables running multiple Node.js processes that share server ports and distribute workloads across CPU cores. This is especially useful for scaling applications on multi-core systems. Each worker is an independent process, while the primary process manages workers and distributes incoming connections.

/article/nodejs-cluster-module-scaling-applications-with-workers

Node.js Command-line API: Options and Permissions

Node.js provides a rich set of command-line options that allow developers to configure runtime behavior, enable debugging, manage permissions, and control how scripts are executed. These options are critical for secure and flexible application deployment.

/article/nodejs-command-line-api-options-and-permissions

Node.js Crypto Module: Certificates, Encryption, and Key Exchange

The node:crypto module in Node.js provides cryptographic functionality including hashing, HMAC, encryption/decryption, signing, and verifying. It acts as a wrapper around OpenSSL and offers classes such as Certificate, Cipheriv, Decipheriv, and DiffieHellman for secure data handling and key exchange.

/article/nodejs-crypto-module-certificates-encryption-and-key-exchange

Debugger in Node.js: Command-Line Debugging Utility

Node.js includes a simple command-line debugger that allows stepping through code, inspecting variables, setting breakpoints, and evaluating expressions. While it is not a full-featured debugger, it provides essential functionality for quick debugging. For advanced usage, Node.js integrates with the V8 Inspector, enabling Chrome DevTools for profiling and step-by-step debugging.

/article/debugger-in-nodejs-command-line-debugging-utility

Deprecated APIs in Node.js: Reasons, Types, and Examples

In Node.js, certain APIs are deprecated for reasons such as being unsafe, having better alternatives, or planned breaking changes in future releases. Deprecations are categorized into four types:

/article/deprecated-apis-in-nodejs-reasons-types-and-examples

Diagnostics Channel in Node.js: Managing Diagnostic Messages and Tracing

The node:diagnostics_channel module provides an API for creating named channels to publish diagnostic messages. These channels allow developers to trace application flow, monitor events, and share structured diagnostic data across modules. With support for synchronous and asynchronous tracing, as well as integration with AsyncLocalStorage, Diagnostics Channel is a powerful tool for observability in Node.js applications.

/article/diagnostics-channel-in-nodejs-managing-diagnostic-messages-and-tracing

DNS Module in Node.js: Name Resolution and Networking

The node:dns module provides name resolution capabilities in Node.js. . It allows developers to look up IP addresses for hostnames and perform DNS queries. While dns.lookup() uses the operating system’s facilities (and may not involve actual DNS protocol communication), other functions such as dns.resolve4() or dns.reverse() directly query DNS servers. The module also provides the dns.Resolver class for creating independent resolvers with custom server configurations.

/article/dns-module-in-nodejs-name-resolution-and-networking

Domain Module in Node.js: Error and Event Management

The node:domain module provides a way to handle multiple I/O operations as a single group, routing errors and uncaught exceptions to a domain object instead of crashing the process. However, this module is deprecated and should not be used in new applications. Developers who rely on it must plan to migrate to safer alternatives such as async_hooks or structured error handling.

/article/domain-module-in-nodejs-error-and-event-management

Environment Variables in Node.js

Environment variables are values associated with the environment in which a Node.js process runs. They can be used to configure application behavior, manage secrets, and define runtime options. Node.js provides built-in APIs for interacting with environment variables, and .env files are commonly used to manage them in a structured way.

/article/environment-variables-in-nodejs

مدیریت خطاها در Node.js

برنامه‌های نوشته‌شده با Node.js در طول اجرا با انواع مختلف خطاها مواجه می‌شوند؛ از خطاهای استاندارد جاوااسکریپت گرفته تا خطاهای سیستم‌عامل و خطاهای تعریف‌شده توسط کاربر. Node.js مکانیزم‌های مختلفی برای انتشار و مدیریت این خطاها ارائه می‌دهد. شناخت این مکانیزم‌ها برای نوشتن برنامه‌های پایدار و مقاوم ضروری است.

/article/error-handling-in-nodejs-fa

Events Module in Node.js: Event-Driven Architecture

Much of the Node.js core API is built around an asynchronous, event-driven architecture. In this model, certain objects called emitters generate named events, and functions called listeners respond to those events. This design makes it easier to handle I/O operations, streams, and asynchronous workflows in a clean and efficient way.

/article/events-module-in-nodejs-event-driven-architecture

File System Module in Node.js: Managing Files and Streams

The node:fs module allows interaction with the file system using APIs modeled on standard POSIX functions. Node.js provides three forms of file system operations: Promise-based, Callback-based, and Synchronous. Each form has its own use cases depending on performance needs and application design

/article/file-system-module-in-nodejs-managing-files-and-streams
Computer Science | Dr. Shahin Siami