I created a simple app that renders a Blender 3D scene in the cloud: users can customize the displayed message by changing an URL parameter, and the app will return the 3D rendered image. Give it a try here.
The code is a very simple Python function that invokes the Blender open source software. It uses the Blender API in order to dynamically change the value of a Text object. The function is then simply wrapped in a basic Flask application in order to respond to HTTP requests. Because Blender needs to be installed, I am using a Dockerfile that runs “apt-get install blender”.
This app was created to showcase the upcoming “serverless containers” product of the Google Cloud Platform. It allows to run any container “in a serverless way”: developers are able to deploy and run any language or library they want, and only pay for actual resources used when it receives requests. I demoed the feature during the Cloud Next 2018 keynote and othersessions. sign up for early access at g.co/serverlesscontainers
My goal was to capture any Java exception in my production application and report it to Stackdriver Error Reporting for automatic exception monitoring and alerting.
I use the very simple Stackdriver Error Reporting report API: just send error stack traces using an HTTP POST request and an API key.
After creating a project and getting an API key in the Google Cloud Console, I instrumented my Play Framework application to catch all exceptions, format them in the expected structure and POST them to Stackdriver. (make sure you are using at least JDK v1.7)
Here is the code I added to my main application controller:
A short amount of time after deploying this code, I started receiving alerts that new errors were occurring in my production application:
I was not aware of these application errors, now I have better visibility into their impact and will be able to prioritize what to fix.
My website (Cadeaux entre nous, to organize Secret Santas), has been running on Heroku for years and has huge usage spikes around christmas. This will help me make it more stable.
Disclaimer: I am a Product Manager at Google, working on Stackdriver