Skip to main content

Lightweight Django Channels layer backed by SQLite database

Project description

channels_db

Django Channels layer backed by SQLite database.

TODO

High Priority (Robustness)

  • Replace bare except: clauses with specific exception handling (ChannelEmpty, OperationalError, etc.)
  • Replace print statements with proper logging (use logging module)
  • Add retry logic for database OperationalError (lock timeouts)
  • Implement receive cancellation handling to prevent message loss
  • Add buffer size limits to prevent unbounded memory growth
  • Implement periodic VACUUM for database maintenance (reclaim space from deleted messages)

Documentation Needed

  • Document SQLite WAL mode requirement for better concurrency
    • Users must configure: PRAGMA journal_mode=WAL
    • Recommended settings: PRAGMA synchronous=NORMAL, PRAGMA busy_timeout=5000
  • Document Django database configuration requirements
  • Add usage examples and setup guide
  • Document limitations vs Redis layer

Future Enhancements

  • Create advanced layer using aiosqlite + aiosqlitepool for better async support
    • Direct connection pooling
    • Better concurrent write handling
    • More control over SQLite pragmas
  • Consider adding encryption support for sensitive messages
  • Add health check endpoint for monitoring
  • Add metrics/instrumentation for observability

Performance Optimizations

  • Profile and optimize hot paths (send/receive loops)
  • Consider batch operations for group_send
  • Evaluate index optimization for Event and GroupMembership tables
  • Benchmark against Redis layer for common workloads

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

channels_lite-0.1.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

channels_lite-0.1.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file channels_lite-0.1.4.tar.gz.

File metadata

  • Download URL: channels_lite-0.1.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for channels_lite-0.1.4.tar.gz
Algorithm Hash digest
SHA256 bbe28dc8e1af06718d16dc6bfc5234f09ce813a8f1aaf75829441b1c14c6ea1f
MD5 beb34d4be1ebc0c82d7dde786ec2d51e
BLAKE2b-256 7f527fc0c6ea14d8a1e54e816a88a0741d68bde5f73a0f249a8de0256bb62bf0

See more details on using hashes here.

Provenance

The following attestation bundles were made for channels_lite-0.1.4.tar.gz:

Publisher: publish.yml on Tobi-De/channels-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file channels_lite-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: channels_lite-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for channels_lite-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 376798057346b9f03f85e61ec1669d2e9f928e6832798f59b539e1858ac57abb
MD5 649a2c79e02d828e98a97a0f3a4544f8
BLAKE2b-256 0a0c31d43c757c658e792f2239d97e0edfa6d27d82893ed8ebc1f8dbb3a33661

See more details on using hashes here.

Provenance

The following attestation bundles were made for channels_lite-0.1.4-py3-none-any.whl:

Publisher: publish.yml on Tobi-De/channels-lite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page