Dash Shared Callback Storage

Callbacks have no way to share state. A module-level global breaks as soon as the app runs more than one worker, since each process gets its own copy. Passing data between callbacks today means routing it through hidden components in a callback chain, and pushing a change from one callback to another — or out to other open browser tabs — means polling or standing up Redis.

Proposed solution: A key-value store and publish/subscribe channel built into Dash, visible to every worker process. Callbacks get and set shared values directly, and publish sends a value to every subscribed callback, so real-time updates across tabs become a couple of lines instead of a callback chain. Backends cover everything from local development to a multi-host deployment.

Please authenticate to join the conversation.

Upvoters
Status

In Progress

Board

Libraries

Date

About 1 hour ago

Author

Matthew Brown

Subscribe to post

Get notified by email when there are changes.