Tuesday, June 7, 2022

Use event subscriptions for scheduled scale up and down of your IBM Cloud Code Engine apps

Few lines of scripting
Over the past months, I wrote several blog posts related to IBM Cloud Code Engine. Code Engine is a managed, serverless platform for containerized workloads. You can run (web) apps and (batch) jobs, both types can receive events. Code Engine apps have settings for minimum and maximum scaling and have assigned compute resources within these boundaries. A "scale to zero" is possible, i.e., there isn't any app instance running and, because it is pay per use, nothing is charged during that time. Which brings up the question, how can I schedule different min / max scale values, e.g., scale down to zero over night, but have some higher minimums during the day? 

I heard that built-in support is on the roadmap. For now, I am using a Code Engine cron subscription for the job...

Thursday, June 2, 2022

Create a REST API with OpenAPI spec for your database objects

Swagger UI for my events API
Recently, I wanted to create REST API for data managed in a Db2 on Cloud database. It was needed for a chatbot project using Watson Assistant. After looking into my options, I settled on APIFlask. In this blog, I am going to share my experiences and some resources for creating a REST API with an OpenAPI specification for database objects.