These are chat archives for opal/opal

2nd
Mar 2018
Matias Forbord
@codeluggage
Mar 02 2018 00:13
Hi everyone! Looking for opinions on Serverless + Ruby. Do you think it is better to go the transpile route with Opal, or the Traveling Ruby route with MRI packaged for the container it runs in (i.e. AWS Lambda)?
Functions as a service don't support Ruby yet, but they support Node (and a few other languages depending on the cloud provider).
Simon George
@sfcgeorge
Mar 02 2018 09:14
@codeluggage Hehe, unusual request. I'd say it depends how much you want to do with Ruby in Lambda. For some small scripts I expect Opal would work fine. But Opal may not be as fast or compatible as MRI. Getting MRI running there may be harder, and will have slower boot time, but faster runtime and more compatibility with libraries like Rails... but you probably don't want big libraries like that if you're going serverless. I expect getting gems working on Lambda would be a pain too. So try precompiled Opal I guess!
Barrie Hadfield
@barriehadfield
Mar 02 2018 12:30
@elia is there a way of doing your opal-collapsed.js.erb trick with OpalSprockets (with Rack)?
Simon George
@sfcgeorge
Mar 02 2018 14:33
I couldn't figure out how to do it with however Hyperloop requires Opal but decided it's not such a big deal.
Matias Forbord
@codeluggage
Mar 02 2018 15:09

@sfcgeorge that's helpful, thank you! In my experiments so far, the startup time is what really kills the performance. Opal was faaaar superior in this regard - stellar performance (great job everyone). I'm inherently sceptical to running everything through Opal when it's already in a difficult-to-debug environment like Lambdas, though. Tracing errors seems like it would be a pain.

Running Ruby the other ways seemed to have comparable performance, so I guess it boils down to how standard I want the environment to be.