Is there documentation on how callbacks work from a server --> client perspective?
I’m a bit confused on the interaction between the server and how it sends data to the client in callbacks. Any help would be appreciated.
Is there documentation on how callbacks work from a server --> client perspective?
I’m a bit confused on the interaction between the server and how it sends data to the client in callbacks. Any help would be appreciated.
Hi @dashfan48 did you read the chapter on callbacks in the Dash documentation (Dash Callbacks in the sidebar menu) ? In a nutshell, the callback code is Python code which runs in the browser, but its inputs and outputs are properties of Javascript components (with a Python interface of course), which live in the browser (the client). Therefore, when a callback is executed, one must transfer the properties of the inputs to the server, run the Python code of the callback on the server, and then ship the output back to the client. The situation is different for clientside callbacks, for which everything is done in the client, hence in Javascript since the code runs in the browser. I hope this makes sense!
Thanks for the response!
I guess I’m just struggling to fully understand as there isn’t clear documentation for what happens client-side and what happens server-side. My concerns are security-based in nature.
I.e. if code is executed inside of a callback is it always server-side no matter what? How does data flow work?
Sorry if these are dumb questions, just want to make sure I completely understand before I choose Dash for a project with some security concerns.
As noted by @Emmanuelle, the callback will be executed serverside (in Python) unless it is a clientside callback (in JavaScript), in which case it will be executed clientside.
What are your security concerns?