Pragmatism in the real world

Error handling in OpenWhisk actions

With a standard OpenWhisk action, we return a dictionary of the data and let OpenWhisk deal with converting it to JSON etc. OpenWhisk will also set the correct 200 status code. How do we handle an error though? It turns out that if there is a key called "error" in our returned dictionary, then all the other data is ignored and an error is sent back. To show this, consider this action: func main(args: [String:Any])… continue reading.

OpenWhisk web actions

The first way that you learn to call your OpenWhisk action over HTTP is a POST request that is authenticated using your API key. This key allows all sorts of write access to your account, so you never release it. If you want to access the action over HTTP without the API key, you have two choices: Web Actions or API Gateway. This article discusses how to use Web Actions as they are very useful… continue reading.

Serverless Swift on OpenWhisk

I'm interested in serverless computing and as I write Swift, the OpenWhisk platform comes up high when you Google. This turns out to be a really good choice as OpenWhisk is Open Source so I can read the source code (and have done!). In principle, I can also run my own instance of it if I need to to for regulatory reasons, or just to avoid vendor lock-in. Commercially, the whole point of Serverless (aka… continue reading.