@app.callback improvements? (Trigger component, same Output multiple times, callback without Output, serverside store / callback cache)

Re ServerInput vs ServerStore

What I have been thinking that with concept of ServerInput and ServerOutput, it would be possible not to send anything to browser between cached callbacks. Currently the situation looks with (client-side) dcc.Store something like this:

image

By using a ServerStore component, and storing the ID to browser, this is how it looks:

image

But what if it would be possible to short-circuit server-side callbacks; callbacks that have only server-side inputs or outputs (ServerInput, ServerOutput):

image

You can imagine what kind of speed increase this would give, when there are chained callbacks and / or slow internet connection. This kind of change might need also changes to dash core.

What ifs

  • When callback has Input with ServerOutput: Take the session ID from a cookie to store something to server. Callback has no output back to client
  • When callback has ServerInput and Output (but no Input): That kind of callback makes sense only when chained with something that has Input with ServerOutput. (Not possible to trigger otherwise)

Re group keyword for Output?

What would be then difference of

@app.callback(Output('my-output', 'val'), Trigger('left', 'n_clicks'), group="agroup")
def left_click():
  # do something

@app.callback(Output('my-output', 'val'), Trigger('right', 'n_clicks'), group="agroup")
def right_click():
  # do something

and

@app.callback(Output('my-output', 'val'), Trigger('left', 'n_clicks'))
def left_click():
  # do something

@app.callback(Output('my-output', 'val'), Trigger('right', 'n_clicks'))
def right_click():
  # do something

? Could the first one be easier to implement? I assume in many cases the group would be common when there are same Output in the @app.callback, anyway?