Pinned Repositories
data-oriented-slim-deque
A slim and efficient in-memory Deque (doubly-ended queue) for Node.js projects, designed with Data-Oriented Design principles and implemented using a cyclic buffer to optimize memory layout through sequential item allocation. A notable real-world use case is maintaining the minimum or maximum item in a data stream.
data-oriented-slim-queue
A slim and efficient in-memory queue with a basic API for Node.js projects. The implementation employs Data-Oriented Design using a cyclic buffer, optimizing memory layout through sequential item allocation.
delayed-async-task
A modern `setTimeout` substitute tailored for asynchronous tasks, designed to schedule a single delayed execution. Features status getters to communicate the execution status, the ability to abort a pending execution, and the option to gracefully await the completion of an ongoing execution.
delayed-async-tasks-manager
A scheduler for one-time (non-periodic) asynchronous tasks, designed to manage delayed executions. It features status getters to communicate the execution state, a robust error handling mechanism for capturing uncaught errors, the ability to abort pending executions, and gracefully await the completion of ongoing tasks.
fifo-ttl-cache
An efficient in-memory FIFO cache with a fixed TTL for Node.js projects, designed to automatically remove outdated records. Unlike widely used LRU caches, FIFO caches do not prioritize retaining popular keys for extended durations. This simplified approach reduces overhead and typically delivers faster response times.
non-overlapping-periodic-job-scheduler
Periodic job scheduler for Node.js projects, ensuring non-overlapping executions and deterministic termination. Features a dynamically chosen interval between executions, determined by a user-injected calculator function, which can take into account the duration of the last execution and any error it may have thrown.
non-overlapping-recurring-task
A modern `setInterval` substitute tailored for asynchronous tasks, ensuring non-overlapping executions by skipping attempts if a previous execution is still in progress. Features graceful teardown (ideal for production apps demanding smooth resource cleanup), execution status getters, and a fixed delay between runs.
non-replacement-random-item-sampler
An efficient random item sampler that ensures O(1) sampling complexity, and equal selection probability for all items across cycles. Each cycle ensures unique, non-repeating item selections, with each item sampled only once per cycle. Upon cycle completion, the sampler automatically refreshes, initiating a new cycle to repeat the process.
non-replacement-weighted-random-item-sampler
A weighted random item sampler (selector), where the probability of selecting an item is proportional to its weight, and every item is sampled exactly once (without repetition or replacement). The sampling method utilizes a binary-search optimization, making it suitable for performance-demanding applications where the set of items is large.
zero-backpressure-semaphore-typescript
Promise Semaphore for Node.js projects, inspired by the RAII idiom. Offering backpressure control for enhanced efficiency, utilizing a communicative API that signals availability. Additionally, it features a modern API and incorporates mechanisms for graceful termination and error handling.
ori88c's Repositories
ori88c/delayed-async-tasks-manager
A scheduler for one-time (non-periodic) asynchronous tasks, designed to manage delayed executions. It features status getters to communicate the execution state, a robust error handling mechanism for capturing uncaught errors, the ability to abort pending executions, and gracefully await the completion of ongoing tasks.
ori88c/zero-backpressure-semaphore-typescript
Promise Semaphore for Node.js projects, inspired by the RAII idiom. Offering backpressure control for enhanced efficiency, utilizing a communicative API that signals availability. Additionally, it features a modern API and incorporates mechanisms for graceful termination and error handling.
ori88c/data-oriented-slim-deque
A slim and efficient in-memory Deque (doubly-ended queue) for Node.js projects, designed with Data-Oriented Design principles and implemented using a cyclic buffer to optimize memory layout through sequential item allocation. A notable real-world use case is maintaining the minimum or maximum item in a data stream.
ori88c/data-oriented-slim-queue
A slim and efficient in-memory queue with a basic API for Node.js projects. The implementation employs Data-Oriented Design using a cyclic buffer, optimizing memory layout through sequential item allocation.
ori88c/delayed-async-task
A modern `setTimeout` substitute tailored for asynchronous tasks, designed to schedule a single delayed execution. Features status getters to communicate the execution status, the ability to abort a pending execution, and the option to gracefully await the completion of an ongoing execution.
ori88c/fifo-ttl-cache
An efficient in-memory FIFO cache with a fixed TTL for Node.js projects, designed to automatically remove outdated records. Unlike widely used LRU caches, FIFO caches do not prioritize retaining popular keys for extended durations. This simplified approach reduces overhead and typically delivers faster response times.
ori88c/non-overlapping-periodic-job-scheduler
Periodic job scheduler for Node.js projects, ensuring non-overlapping executions and deterministic termination. Features a dynamically chosen interval between executions, determined by a user-injected calculator function, which can take into account the duration of the last execution and any error it may have thrown.
ori88c/non-overlapping-recurring-task
A modern `setInterval` substitute tailored for asynchronous tasks, ensuring non-overlapping executions by skipping attempts if a previous execution is still in progress. Features graceful teardown (ideal for production apps demanding smooth resource cleanup), execution status getters, and a fixed delay between runs.
ori88c/non-replacement-random-item-sampler
An efficient random item sampler that ensures O(1) sampling complexity, and equal selection probability for all items across cycles. Each cycle ensures unique, non-repeating item selections, with each item sampled only once per cycle. Upon cycle completion, the sampler automatically refreshes, initiating a new cycle to repeat the process.
ori88c/non-replacement-weighted-random-item-sampler
A weighted random item sampler (selector), where the probability of selecting an item is proportional to its weight, and every item is sampled exactly once (without repetition or replacement). The sampling method utilizes a binary-search optimization, making it suitable for performance-demanding applications where the set of items is large.
ori88c/starvation-free-priority-queue
An in-memory priority queue that prevents starvation by balancing priority and arrival time. Items are greedily prioritized within each batch of the longest-waiting items, ensuring fairness alongside prioritization and bounded delays for low-priority tasks.
ori88c/weighted-random-item-sampler
A weighted random item sampler (selector), where the probability of selecting an item is proportional to its weight. The sampling method utilizes a binary search optimization, making it suitable for performance-demanding applications where the set of items is large and the sampling frequency is high.
ori88c/zero-backpressure-fixed-window-promise-rate-limiter
A modern Promise rate-limiter for Node.js projects, implementing a fixed-window throttling policy. It restricts the number of tasks that can start execution within distinct, non-overlapping time windows. The API provides backpressure control by signaling availability, for enhanced efficiency.
ori88c/zero-backpressure-weighted-promise-semaphore
A modern weighted promise semaphore for Node.js projects, ideal for managing workloads with varying processing requirements. It allows limiting the total weight of concurrently executing jobs, ensuring efficient resource utilization. Offering backpressure control for enhanced efficiency, utilizing a communicative API that signals availability.
ori88c/zero-overhead-keyed-promise-lock
An efficient keyed Promise lock for Node.js projects, ensuring the mutually exclusive execution of tasks associated with the same key. Key features include active key metrics and the ability to gracefully await the completion of all currently executing or pending tasks, making it ideal for robust production applications requiring smooth teardown.
ori88c/zero-overhead-promise-lock
An efficient Promise lock for Node.js projects, ensuring mutually exclusive execution of asynchronous tasks. Key features include a backpressure indicator and the ability to gracefully await the completion of all currently executing or pending tasks, making it ideal for robust production applications requiring smooth teardown.