1

In my specific case I am looking to have zeromq (https://zeromq.org) messages trigger a callback in dash (and the dash callback be able to trigger sending messages similarly). Generically this is having dash triggered by external input; is there anything like this or similar that works in dash?

Helios
  • 675
  • 4
  • 13

1 Answers1

0

Talking from experience, I have used a dash-django-redis-celery hybrid setup. In summary, we had celery run jobs periodically, these jobs would in turn update the database, and then in dash having a dcc.interval component to update the dashboard and if the data has been changed, this would trigger a callback of some kind that is dependent on the data. So yes, I imagine this could be possible with zeroMQ with a similar approach, but you'll need to use a backend framework like django to coordinate and wrap this all up which I can't say for sure is.

If you are not too eager on using ZeroMQ, then redis+celery is great with Django, and there is a nice package for building django-dash applications which is actively updated.

Daniel Al Mouiee
  • 1,111
  • 8
  • 11
  • 1
    This is essentially a two level operation with a poll in both directions (write to db -> pull from db), instead of a single eventloop call (zmq or dash). I had already considered this option as I have a db in the stack but it does not seem like a nice solution at all and probably a bit of an anti pattern - what if the DB is not up for example? – Helios Jan 29 '22 at 16:32