SShortSingh.
Back to feed

Deterministic Host Leases for FastAPI Live Polls Prevent Split-Brain Reassignment

0
·9 views

The article describes a split-brain problem in live polls where two browser clients may both believe they are the host after a disconnect. It proposes a server-side host lease with a monotonically increasing epoch so that only the current epoch can issue authority-changing commands. Host candidates are chosen from an ordered, eligibility-checked set, and reassignments are committed atomically so every worker contends on one authoritative record. Clients treat broadcasts as views of committed state rather than grants, and reconnects restore sessions without restoring authority from local state. The approach is designed to keep reassignment deterministic even when WebRTC messages arrive late, duplicated, or out of order.

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 ·

Free FMCSA census query surfaces newly registered trucking companies

A developer shared a method for pulling newly registered trucking companies from the FMCSA carrier census, which is published as open data on data.transportation.gov. The approach uses a SoQL query over plain HTTP, filtering active records by registration date and state, and requires no API key for light use. The author notes that the raw dataset lacks built-in deduplication, operating authority status, and normalized fields, which must be handled separately. To address these gaps, the author built a paid Apify actor that joins authority data, applies filters, avoids repeat deliveries, and exports results in JSON, CSV, or Excel. The article notes the author's bias, since they built the tool they promote.

0
ProgrammingDEV Community ·

Expo Router navigation slows past 40 nested routes, with fixes for layout re-renders and focus

A team migrating a multi-tenant dashboard from React Navigation to Expo Router found a performance drop at around 42 nested routes, with animations falling from 60fps to 38fps and memory rising 140MB on Android mid-range devices. Benchmarks on a Pixel 5 and iPhone 12 using Expo SDK 52 and React Native 0.76 showed navigation time and frame drops rising sharply as route depth increased. The team attributed the problem to re-renders of the layout tree on navigation events, compounded by runtime TailwindCSS class recalculation in nested layouts. Replacing dynamic class props with static StyleSheet references cut navigation time at 50 routes from 187ms to 94ms and reduced frame drops per transition from 9 to 3. The team also found that modal routes overlaying tab navigators broke screen reader focus, which they addressed by wrapping the modal in a container with accessibilityViewIsModal.

0
ProgrammingDEV Community ·

Plex Media Server flaw CVE-2026-96655 can be checked in logs for prior exploitation

Patching Plex Media Server to 1.43.3.10861 closes the SSRF in CVE-2026-96655, but it does not reveal whether the flaw was already abused. The bug allows an authenticated user to make the server fetch an attacker-chosen target via the universal transcoder endpoint. Investigators are advised to compare endpoint activity against a baseline of normal household use and to look for internal network connections from the Plex host that it would not normally make. Failed transcode sessions can serve as a weak triage signal but are not conclusive evidence. If compromise is suspected, logs and connection records should be preserved, the involved account disabled, and any exposed credentials rotated before patching.

0
ProgrammingDEV Community ·

Video generation models still face a wide gap between demos and production use

Video models can produce impressive short clips in marketing demos, but production pipelines run into latency problems, weak frame-to-frame consistency, limited camera control, and mandatory brand-safety review. Treating video generation as simply a longer form of image generation tends to underestimate costs and iteration cycles. Teams that successfully ship multimodal features usually begin with narrower tasks such as understanding clips, captioning meetings, or extracting frames for search. Assisted editing, storyboards, and animatics are also more practical than generating final pixels for regulated brands. The article notes that legal and brand review often takes more time than GPU inference, and it recommends tools with controllable parameters and evaluation methods for temporal artifacts.