SShortSingh.
Back to feed

How to Design Batch Operations That Survive Partial Failures Gracefully

0
·60 views

A conceptual design exercise explores how bulk-move actions in collection apps should handle partial failures transparently rather than showing vague error messages. The proposed approach assigns each item in a batch its own trackable state — such as pending, succeeded, conflict, or failed — so users can see exactly which records were moved and which need attention. Each batch operation receives a durable ID, allowing clients to retrieve its status even after a network interruption or page refresh. To prevent duplicate effects on retry, every item action is given a unique identity tied to the operation and edition ID, ensuring repeated requests return the same result rather than triggering another move. The design also addresses concurrent edits by comparing record versions before applying changes, surfacing conflicts instead of silently overwriting newer data.

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 ·

Managed database backups versus object storage for SaaS data recovery

An edtech SaaS storing lessons, grading exports, and archives can split backups between a managed database service and private object storage. Managed Postgres or MySQL backups suit point-in-time rollback, while dump files in object storage suit cheap long-term retention and inspectable restores. Object storage holds most of the bytes in large media packages, while the database dump identifies which tenant, course, and artifact belong together. Object-based restores require more manual steps such as locating prefixes, verifying checksums, and reconnecting references, which adds operational cost. The article recommends choosing the recovery primitive first, based on whether the requirement is point-in-time restoration or retrieving an archived training package.

0
ProgrammingDEV Community ·

Firefox Extensions Aim to Cut Browser Distraction and Support Digital Wellbeing

A DEV Community post argues that browsers are a major source of digital distraction, since news feeds, social media, and infinite scroll are built to hold attention rather than support productive work. It proposes Firefox extensions for a more intentional setup, such as a news widget that shows only user-chosen RSS feeds and a daily planner that replaces the default new tab. Other tools described include a habit tracker for monthly goals, NightOwl for automatic dark mode at sunset to ease evening screen exposure, and a Tab Manager that saves and closes tabs to reduce clutter. The author also suggests Voice Notes as a way to capture ideas on the computer instead of reaching for a phone.

0
ProgrammingDEV Community ·

Django 6.1's FETCH_PEERS recovers most lost queries but not all hand-tuned ones

A developer tested Django 6.1's FETCH_PEERS fetch mode on their football quiz site, ExtraTime, across 467 routes and 3,963 requests. Removing all select_related calls raised total queries from 59,198 to 76,144, and enabling FETCH_PEERS recovered about 69% of that increase. The mode helped most on endpoints loading many objects that share the same relations, such as one that gained a large speedup, yet it did nothing on 115 routes that handle single objects or use iterators. The admin's group page also showed no improvement, because form choice fields call iterator(), which turns the mode off in practice. The author concluded that FETCH_PEERS is useful but cannot fully replace explicit select_related and prefetch_related tuning.

0
ProgrammingDEV Community ·

Warning Signs That a Fintech Build Would Struggle Under an FCA Review

Fintech teams often discover too late that their software cannot answer a regulator's questions, with the warning signs appearing in early design choices that were never treated as compliance matters. Balances overwritten in place leave no way to trace how a figure was reached, and audit logging added near launch leaves months unrecorded. Business rules without versioning, and permissions enforced only through feature flags, make it hard to show past decisions or who authorised them. Scope set by customer requests rather than by what a review would need to verify tends to leave gaps that surface when little time remains. The article recommends settling authorisation and evidence requirements with a regulatory specialist before building begins.