Closed oesah closed 1 year ago
I never thought about using this to run Shiny, but I'd be keen to know if you can get it to work!
When R has finished running its calculations, the lambdr
package _serialise_s the results into something that can be returned to the user. By default, it attempts to convert the result to JSON. You can read more about this and how to control the serialisation strategy in the lambda_config
documentation.
This works just fine if you're returning a vector, list, or data frame. But in your case, the "result" of the function is an entire Shiny application. R has no idea how to convert this to a JSON, and so you get that error.
You need to think about what is being returned to the user when they invoke the Lambda. I'm not the most knowledgeable about Shiny's inner workings, but I believe that Lambda supports websockets, which Shiny requires.
It will not work, Shiny is highly stateful so Lambda won't work well.
Hey everyone, first of all, thanks for this lib, it's awesome :)
We are currently trying to get R Shiny working with this lib. Unfortunately, we are stuck at
No method asJSON S3 class: shiny.appobj
.Here is our
runtime.R
:Dockerfile
:Anyone an idea how to get this working?