I attended Serverless Days in Sydney Today. Overall it had a good sense of community, the venue and food was top notch. This is a community run conference and there’s always good representation from the main serverless cloud providers here. *Cough* Google/AWS/Microsoft *Cough*. Alibaba made an appearance too.
Ben Kehoe – a Cloud Robotics Research Scientist at @iRobot gave us lessons learned in applying this mindset to more than just web applications. He goes over how as engineers we need to shift our mindset to focus on delivering business value and not get caught up on feeling like the centre of the business. Any code your write is a liability. That’s why I advocate for lean test code that adds value.
On a side note, anyone who gets to work in robotics professionally is super cool in my books. My favourite presentation is one where I present Tappy McTapface – a robot for mobile app testing. You can watch a previous talk by Ben on a similar idea here:
Did you miss out on the action?
Some of the speakers have given their presentations at previous conferences/meetup groups. Like Jessica Flanagan at YOW! Data this year. And Denis Bauer at YOW! Perth last year.
I Previously live streamed the Serverless Sydney meetup group and the Node user group on twitch (however these video’s are only stored on twitch for up to 60 days post live stream).
Serverless Icon Showdown
Who has the best logo? There’s Google Cloud Functions, AWS Lambda Functions, Microsoft Azure Functions and Alibaba Cloud Function Compute. Handsdown I think Microsoft Azure functions is the best logo here.
Are you using Serverless in production yet? what are some of the challenges you are facing? How should testers get up to speed with this technology?
Have you heard of micro services? This is like that but even smaller. What’s the smallest service you could possible deploy? a single function. Server less still uses a server, but the infrastructure is abstracted away by your cloud provider of choice. If no one is hitting your API, there’s no server running and costing you money. Cloud providers spin up an instance when needed as soon as something calls your function.
1. Sign up for a google cloud trial
I used a test account; email@example.com to explore this for you and I collected screenshots along the way.
Save, the first time you save it will ask you to name your project
Run the onOpen function. The first time you run this app script it will ask you to set up permissions
Whew, done. Now if you navigate back to your spreadsheet you should see some added menu items:
What happens when you click on the Prepare sheet… function?
Then how about the Generate step-by-step function?
You don’t need to understand google’s code to explore this. I find it’s better to learn by starting from scratch. This code gives you a guideline for what you can achieve but you will have a better understanding of how app script works by building out your own.
3. Enable App Script APIs in your google cloud project
Replace the XXXXX string with your project id, you get this from your google cloud console
Replace the query with
'SELECT COUNT (DISTINCT id) FROM [bigquery-public-data:hacker_news.comments]'
Save and run the runQuery function. You will also need to set up permissions again the first time you run this.
Dam. I got another error message:
I went to the suggested URL and it turned out I need to enable another API somewhere else. That makes me thing I did it in the wrong spot in step 3, maybe that step wasn’t needed?
I wait a few moments and go back to my app script. I click on “Run Query”. No error messages this time. If you go to your drive folder you should see a new sheet called “Big Query Results” with one row of data:
You can test out this result is roughly correct by running the query directly in your google cloud query editor:
Now you are all set up with your API integrations. Next lesson will be building out your own dashboard that puts this set up into practice.