Use results of server side action in client side actions

I’m currently exploring bubble plugin builder. I have a question. Is it possible to use the returned value of a server side action within client side code?

Best, Evans.

Only if you save the returned value in your database, so it will become visible in client side…

1 Like

Not quite correct. You can call a server-side function from any workflow, including client-side workflows. Which means you can use the output of the server-side function on the client-side. That said there is a substantial two fold performance hit:

  1. On the first call the JIT AWS Lambda has to “warm up”, that is compile before making the call.
  2. Even once “hot” the function still has a network latency penalty as the client waits for the server to return.

I recommend restricting this design pattern to only “must have” authentication processes where some form of token has to be generated on the Bubble Server to be passed to a tertiary service, e.g. signed authentication tokens passed to AWS IVS.

2 Likes

You are absolutely right. I didn’t explain myself clearly. I was thinking in workflows that runs (server-side) when user is not logged in. Don’t know why I responded that…

1 Like