SShortSingh.

Programming

0
ProgrammingDEV Community ·

wsqlite brings async/await SQLite support with connection pooling for FastAPI

Synchronous SQLite queries can block FastAPI's event loop, degrading web concurrency and performance. The wsqlite library addresses this by offering full async/await support along with a dedicated connection pool from the start. It allows developers to define database tables using standard Pydantic v2 models, with automatic column synchronization on startup and no manual migrations required. The library uses WAL mode by default, enabling over 5,000 inserts per second, and supports both synchronous and asynchronous operations. wsqlite is available as an open-source project on GitHub.

0
ProgrammingDEV Community ·

wsqlite Brings Async SQLite CRUD and Connection Pooling to FastAPI

A new Python library called wsqlite enables fully asynchronous SQLite database operations using async/await syntax, designed to prevent blocking FastAPI's event loop during database queries. The library integrates with Pydantic v2 models to define database schemas and automatically synchronizes columns on startup, eliminating the need for manual migrations. It features thread-safe connection pooling with Write-Ahead Logging (WAL) mode enabled by default, reportedly achieving over 5,000 inserts per second. wsqlite supports both synchronous and asynchronous CRUD operations, making it suitable for high-throughput production environments. The project is open source and available on GitHub.

0
ProgrammingDEV Community ·

WKafka brings async request-response pattern to Apache Kafka for Python devs

WKafka, an open-source Python library, implements a request-response pattern over Apache Kafka to replace synchronous HTTP calls in distributed systems. The library addresses common pain points such as HTTP 504 timeout errors, tight coupling between APIs and workers, and lost notifications during heavy processing tasks. It uses correlation IDs via message keys to match requests with responses, and allows workers to scale horizontally without any client-side changes. WKafka supports Python versions 3.9 through 3.14 with strict mypy typing and has been tested against real Apache Kafka clusters. The project is available on GitHub and PyPI as part of an ongoing technical series called WKafka Open Source.

0
ProgrammingDEV Community ·

WKafka Library Brings Request-Response Pattern to Apache Kafka for Python Devs

WKafka, an open-source Python library, addresses the lack of a native request-response pattern in Apache Kafka by enabling decoupled, asynchronous task processing. The library allows worker nodes to consume tasks from one Kafka topic and publish results to another, using message keys as correlation IDs to match requests with responses. This approach eliminates common pain points such as HTTP 504 timeouts, tight coupling between APIs and background workers, and lost task notifications during worker crashes. WKafka supports Python versions 3.9 through 3.14 with strict typing and has been tested against real Apache Kafka broker clusters. The project is available on both GitHub and PyPI as part of an ongoing open-source engineering series.

0
ProgrammingDEV Community ·

wredis library tackles cold-start latency with cache warming and built-in telemetry

Cache stampedes occur when newly deployed microservice instances simultaneously query the database, spiking latency and overwhelming connections. The open-source Python library wredis addresses this by pre-loading critical data into Redis before production traffic is routed to new instances. Using its cache decorator alongside the CacheMetrics collector, developers can implement cache warming in just a few lines of code. The built-in telemetry tracks cache hits, misses, and hit-rate percentages without requiring external monitoring tools. wredis supports both synchronous and asynchronous workflows, making it compatible with frameworks like FastAPI.

0
ProgrammingDEV Community ·

wredis library tackles cache cold-start latency with warming patterns and telemetry

Deploying microservices or auto-scaling containers can trigger a cache stampede, where multiple instances simultaneously hit cold database queries and spike latency. The open-source Python library wredis addresses this by pre-populating critical Redis keys before production traffic is routed to a new instance. It pairs cache warming with a built-in CacheMetrics collector that provides real-time visibility into hit and miss rates. Developers can implement the pattern in a few lines of code, covering both synchronous and asynchronous pipelines. The library is available on GitHub and PyPI under the project name wredis.

0
ProgrammingDEV Community ·

Oracle SQL Statement Types Explained: DML, DDL, DCL, and TCL Defined

Oracle SQL statements are grouped into four main categories based on their function in database operations. Data Manipulation Language (DML) handles data retrieval and modification using commands like SELECT, INSERT, UPDATE, and DELETE, while Data Definition Language (DDL) manages database structures with commands such as CREATE, ALTER, and DROP. A key distinction is that DDL statements automatically trigger an implicit COMMIT and cannot be rolled back, unlike DML changes. Data Control Language (DCL) governs user access permissions through GRANT and REVOKE, while Transaction Control Language (TCL) manages DML transactions using COMMIT, ROLLBACK, and SAVEPOINT. Beyond classifications, core SQL SELECT capabilities include projection for choosing columns, selection for filtering rows, and joining for combining data across multiple tables.

0
ProgrammingDEV Community ·

Oracle SQL Environment Commands Every Developer Should Know for Interviews

Oracle SQL*Plus and SQL Developer offer several environment control commands that shape how scripts execute and how output is displayed. Commands like SET DEFINE OFF prevent the ampersand character from being misread as a substitution variable prefix, which is critical in automated deployment pipelines handling URLs or company names such as AT&T. Performance-related commands such as SET TIMING ON and SET FEEDBACK help developers benchmark queries and monitor result counts directly from the command line. Display commands including SET LINESIZE, SET PAGESIZE, and SET LONG control output formatting and the handling of large data types like CLOBs and XMLType. A key distinction for interviews is that these SET commands are client-side parameters and do not influence server-side execution plans, unlike bind variables which promote plan reuse in the database's Shared Pool.

0
ProgrammingDEV Community ·

Silent pg_restore Bug Can Lose Entire Tables When Restoring Supabase Backups

A developer discovered that restoring a Supabase database backup using standard pg_restore can silently drop entire tables without raising a fatal error. The issue occurs because Supabase-specific functions like auth.uid(), commonly used as column defaults, fail when restored into a plain PostgreSQL environment that lacks the auth schema. By default, pg_restore logs these errors but continues execution, leaving the affected tables and their data absent from the restored database. The bug is particularly dangerous because developers testing Supabase backups are already conditioned to ignore auth-related errors, making missing tables easy to overlook. The fix involves creating stub roles and a minimal auth schema in the target database before running pg_restore, ensuring dependent objects resolve correctly during restoration.

0
ProgrammingDEV Community ·

Dokwise Processes PDFs Entirely In-Browser, With CSP to Prove No Data Leaves

A developer has built Dokwise, a free browser-based toolkit offering 16 PDF and image processing tools — including merge, split, OCR, compress, and e-signature — that require no account and no server. All file processing runs locally using JavaScript libraries such as pdf-lib, tesseract.js, and native browser APIs, meaning files never leave the user's device. The site enforces a strict Content Security Policy (CSP) that blocks any network requests to unlisted hosts, preventing both first-party and third-party code from silently transmitting data. The developer acknowledged that tesseract.js originally fetched worker and language files from an external CDN, which was resolved by bundling all assets locally. The only external connections permitted are to Google Analytics for anonymous page-view tracking, which is disclosed in the site's privacy policy and visible in the CSP header.

0
ProgrammingDEV Community ·

VirgoFash: A Zero-Dependency Async Python Library for Search and RAG Pipelines

Developer Abdullah Jahangir has released VirgoFash, a lightweight, asynchronous search and retrieval-augmented generation (RAG) engine written in pure Python. The library was created to address the common trade-off between heavy scraping frameworks and brittle custom HTTP code in AI application development. VirgoFash relies only on asyncio and httpx, avoiding dependencies like Selenium or Playwright, which keeps environments lean and install times fast. It features deterministic relevance scoring for consistent pipeline behavior and is designed to integrate easily with async backends such as FastAPI. The library is available on PyPI and GitHub, and can be combined with Anthropic's Claude API to build AI-powered search assistants with minimal code.

0
ProgrammingDEV Community ·

Developer Uses Claude AI to Automate Flutter Regression Tests Overnight

A Vietnamese mobile developer at an outsourcing firm built an automated regression testing suite for a Flutter app after noticing that AI-assisted 'vibe coding' was overwhelming the QA team with each new release. Using Maestro's MCP and CLI tools, the developer prompted Claude agents to loop through existing QA test cases, explore the app's codebase, and generate corresponding Maestro test flows autonomously. The process took roughly one month of weekend sessions, consuming available AI tokens to map UI components and build test coverage for each feature. The resulting system now lets the team run full regression checks after any coding sprint, with agents also monitoring app performance via logs during test runs. The developer acknowledged the approach is not entirely novel but shared it to help other app and web teams reduce manual code review burdens, while noting that security and environment configurations still require human oversight.

0
ProgrammingDEV Community ·

How Laravel Apps Can Survive Redis Outages Using Circuit Breaker Pattern

A Redis cache outage caused a Laravel application to crash with 500 errors during a server migration, exposing how the framework assumes cache availability by default. A basic try-catch workaround can prevent crashes but still forces requests to wait for Redis connection timeouts, adding noticeable latency. The Circuit Breaker pattern offers a cleaner solution by tracking failure rates and automatically bypassing the cache once a failure threshold is reached, routing requests directly to the database instead. The open-source PHP library Ganesha, using an APCu adapter to avoid circular dependency, can implement this pattern without custom logic. After a cooldown period, the circuit enters a half-open state to test Redis recovery before resuming normal cache operations.

0
ProgrammingDEV Community ·

Developer Ditches autofs for fstab to Fix Samba Race Condition on Raspberry Pi

A developer running a Samba-based home network storage server on a Raspberry Pi 4B with Fedora Server 38 encountered a recurring path error that prevented the shared drive from being accessed. The root cause was a race condition where the Samba service started before autofs could finish unlocking and mounting the BTRFS-formatted, passphrase-encrypted external drive. The original autofs and crypttab setup had worked reliably for weeks before this timing conflict surfaced. Switching to fstab — a built-in Linux utility — resolved the issue by ensuring the encrypted drive is fully mounted at boot time, before Samba initialises. The fix required removing the autofs configuration and adding a dedicated entry in fstab to handle both decryption and mounting automatically.

0
ProgrammingDEV Community ·

How to Run Uptime Kuma on Fedora Using Podman Quadlet and systemd

A developer set up Uptime Kuma, an open-source monitoring tool, on a Fedora mini-server to track work services and receive Slack alerts during outages. The setup used Podman Quadlet, a method of managing containers through declarative YAML files that automatically generate systemd services, ensuring apps start on boot. SELinux permissions were configured manually using chcon to allow the container write access to local storage, since Fedora enforces strict security policies. A Kubernetes-style YAML file defined the pod and container, while a .kube Quadlet file instructed systemd to manage the deployment automatically. Lingering was enabled via loginctl so the service continues running on the server even without an active user session.

0
ProgrammingDEV Community ·

How faketime Lets Developers Test Scheduled Jobs Without Changing System Clock

A developer investigating a defect in scheduled export jobs turned to a tool called faketime to simulate different dates inside a container without altering the actual system time. Faketime works by intercepting system calls related to date and time, letting programs run as though it were a different moment entirely. The approach required confirming the faketime library was present in the container image, then invoking it via environment variables like LD_PRELOAD and FAKETIME alongside the target command. By adjusting the date string passed to FAKETIME, the developer could replicate daily, monthly, and yearly export scenarios with minimal effort. The technique proved to be a practical and flexible solution for testing time-dependent scheduled tasks in containerized environments.

0
ProgrammingDEV Community ·

Linux Trick: Suspend, Background, and Disown a Running Process Without nohup

A developer running long scripts on a mini-server for a media-crawling hobby project needed a way to push already-started processes into the background without restarting them. Instead of relying on the usual nohup or tmux tools, they rediscovered a lesser-known Linux shell technique. The method involves pressing CTRL+Z to suspend a running process, typing 'bg' to resume it in the background, and then using 'disown -h %1' to detach it from the current shell session. Unlike nohup, which must be invoked before a process starts, this approach works on processes that are already running. The author notes it is particularly handy on servers where tmux is unavailable and cannot be installed.

0
ProgrammingDEV Community ·

PostgreSQL Generated Columns vs Triggers: When to Use Each for Derived Data

In PostgreSQL, derived column values can be maintained either through generated columns or triggers, and the right choice depends on what data the value needs to access. Generated columns work best when the value depends only on other columns in the same row using immutable functions, as the database enforces correctness and blocks manual overwrites. Triggers are necessary when the derived value requires data from other tables, the current timestamp, or non-immutable functions. Performance testing on PostgreSQL 18 showed that a row-level PL/pgSQL trigger added roughly 72% overhead to bulk inserts compared to a plain table, while a stored generated column added about 16% and a virtual generated column added none. Beyond performance, generated columns also improve schema clarity since their logic is visible directly in the table definition, unlike trigger-maintained columns which appear as ordinary writable columns.

0
ProgrammingHacker News ·

Developer Launches Trail, a New Browser-Based Logic Puzzle Game

A developer has released Trail, a new logic game available to play online. The project was shared on Hacker News under the 'Show HN' category, which highlights community-built projects. The game is hosted at trail.franzai.com and appears to be an independent creation. At the time of posting, it had received 6 points and 1 comment on Hacker News. Further details about the game's mechanics were not provided in the submission.

0
ProgrammingDEV Community ·

Prometiam API Offers Single-Call Access to Irish CRO Company Data

Developer and Prometiam founder Matías Maquieira has introduced a REST API that serves Ireland's Companies Registration Office register as JSON in a single call. The API draws from the CRO Open Data Portal, which is licensed under CC BY 4.0, and supports search by company name or CRO number. Each record includes the legal name, company number, legal form, status, registered address, Eircode, and key filing dates such as last annual return and next accounts due. The tool is positioned as a lightweight alternative to scraping the CRO website or subscribing to enterprise KYB platforms. A free 14-day trial offering 1,000 API calls without requiring a credit card is available at prometiam.com, though the API does not include directors, officers, or beneficial ownership data.

← NewerPage 876 of 3176Older →