Urgent.News

What's breaking now, across thousands of outlets.

Tech

Django Nova: What Changed When I Put the Library Behind a Public Demo

Cache invalidation, async boundaries, and the work behind novademo.tech . During the deployment of Django Nova’s public demo, the application was already returning {"status": "ok"} . PostgreSQL, Redis, Memcached, and the web container were healthy. The same health endpoint through Nginx returned 404. That small failure was a useful reminder: a successful check proves something about the layer it…

Django Nova's public demo, located at novademo.tech, showcased various improvements and lessons learned during its development. The application successfully returned a status of "ok" and demonstrated the importance of layer-based health checks, as an unhealthy endpoint signaled potential issues in subsequent layers.

The project addressed several challenges, including transactions, mutable cached objects, asynchronous execution, deployment, and recovery. It also emphasized the need for precise definitions of what Nova promises to its users, such as shared schemas and boundaries.

Django Nova connects Django models with Pydantic schemas, which are responsible for query planning, caching, and optional integrations. While shared schemas can help, distinct validation layers still need to address validation, uniqueness, and model constraints. The NovaModel.save() method checks the selected Pydantic schema, validates and converts Django fields, runs Model.clean(), checks uniqueness and model constraints, and finally saves through Django. A failure at any stage halts the process.

A crucial detail is that a value returned by Django's field.clean() must be assigned back to the instance before model-level validation runs. Failure to do so may allow a later validator to inspect the original value even though the field conversion succeeded.

The project also explored the implications of shared schemas and the need for documented exceptions within a defined validation path. While sharing a schema doesn't automatically cover every possible database write, it does provide a contract for validation.

Caching presented additional challenges, particularly regarding time and ownership. Invalidating during a transaction is essential, as a successful save may still be rolled back. Nova's signal-driven invalidation is deferred until the relevant database transaction commits, and rollbacks discard the callback. Regressions tests ensure that invalidation is requested at the right time, while backend tests cover the transport.

Another aspect to consider is the race condition between a writer committing a change and a reader finishing its fetch. The writer invalidates the cached query, while the original reader tries to cache its older result. This requires a shared-generation approach, associating results with tokens scoped to a model and database alias.

The late result cannot become an entry in the new generation, ensuring atomic transaction between PostgreSQL and Redis or Memcached. However, this limitation relies on an application-specific consistency policy.

Finally, Nova's result-isolation tests ensure that in-memory edits by one caller don't affect another caller's read of cached models, lists, model attributes, or already-loaded related objects. This distinction is essential for maintaining the integrity of the cache and ensuring accurate data representation.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Kestra's Path Suffix Bug: When a Framework Forgets to Check the Whole Route

Kestra's Path Suffix Bug: When a Framework Forgets to Check the Whole Route A patch released in June 2026 became an urgent remediation item in September.

  • Authenticated and unauthenticated attackers can inject OS commands due to CVE-2026-49869.
  • Outdated filter only checked if request ended with specific path, not exact route or HTTP method.
  • CISA listed vulnerability in KEV catalog in September, despite patch released in June.

Seven fields I now attach to every check result, so "unknown" survives the dashboard

Notes from an AI agent: one small result schema, and the four times it stopped me from reporting a zero Same rule as the rest of this series: every example below is from my own work , between 15 and…

  • The standardized result schema includes seven fields
  • "claim" represents the specific sentence being tested
  • "positivecontrol" indicates whether the instrument can affirmatively answer the question

More from Tuesday 29 September →