Happy to see such a strong turnout for the OpenFn presentation at Dakar Ruby Conf. You can find all the materials to the talk in this Github repo. I’ll reply on this thread with the official video link when it’s published.
In the meantime, some fantastic questions came up during the event, and I’ve got a list here… thought it would be useful to post this publicly!
What is an adaptor and how different is it to core ?
An adaptor is a wrapper for some target application’s API — it includes functions like “createPatient” which serve some special purpose in the “OpenMRS” application, for example. Core is the program which is used to execute jobs on OpenFn… given a job expression (some instructions), an adaptor, and an initial “state” (some data/configuration) core is able to execute the operations defined in that expression.
How do we handle runtime errors (infinite loops or very complex code) ?
Assuming that this question is about the hosted platform, we control the execution of OpenFn jobs by handling a special isolated Node virtual machine from Elixir. Our Elixir application starts up this VM, runs a client’s jobs, and then decides how and when to kill this VM if it’s taking too much time, using too many resources, etc. If you’re running your own stuff locally, you might consider changing the resource limits for your own NodeVM. See Limits | OpenFn/docs
How do we make sure people don’t execute malicious code on Platform ?
See above! In a funny sense, OpenFn offers “code injection attacks as a service!”
We’re specifically telling customers that we’re happy to execute their code on our systems. With that in mind, most of the interesting design behind the OpenFn hosted solution is related to how we create completely isolated “sandboxed runtimes” to execute a customer’s code with only the data/access required for that specific customer’s job. In fact, we decide which standard NodeJS objects are available in that sandbox and specifically pass them in.
How do we write a job that integrates two different systems ?
We covered this later in the talk, but on the OpenFn iPaaS you can chain together as many jobs as you’d like in a flow. See how state is passed between jobs on the platform here: Initial and final state for runs | OpenFn/docs
Why don’t we allow people to import adaptor helper functions directly in the job expression code instead of passing the adaptor to core at execution time?
It’s a great question, and we’re considering the implications of allowing imports in the upcoming version of our DSL! Stuart Corbishley, care to chime in on the history and roadmap here ?!