Pages

Tuesday, October 30, 2018

GDG Devfest 2018 Hyderabad

It was the 7th year in a row Google Developers Group hosted their flagship event devfest in Hyderabad. This time it was big because it was not only a 2-day event with dedicated days for sessions and codelab/workshops, but also it accommodated more than 600 developers including professionals and students.

Workshop - Google Cloud Functions with Node.js (No, I am not playing Guitar here :) )

Lately, I have been working on Google Cloud Functions at work as it went GA during the GCP Next'18 earlier this year. I decided to submit a proposal around the same for this event. Slides and Code Lab instructions. 

While the proposal was accepted by the committee, it was moved to code lab instead of a session as it was more of a hands-on session and not much advanced for someone not who have not done cloud functions earlier.  While I was preparing the steps which I will ask participants to follow during the workshop, I realized there was a big problem in terms of GCP projects. Cloud Functions requires a GCP project which is billing enabled although it is free up to a few millions of invocation and enabling billing for GCP projects needs a credit card. I could not really expect participants to punch in their credit card number for the project they were supposed to create to deploy their functions along with me.

I realised from Stackoverflow that Firebase functions have a tier in which it is free and you don't need a billing account for Firebase project. Firebase functions and Google Cloud Functions are similar except some differences in the syntax how you define the function. Both run  Node.js and confirm to ExpressJS request-response interfaces. It looked like I could not demo Firebase functions instead of Google Cloud Functions. While doing the POC I very soon realised that Firebase functions did not have the same tools for deploying locally or debugging that Google Cloud Functions. My main agenda was to demonstrate the full work flow including local testing, debugging, writing tests, deploying to cloud and debugging in the cloud. Some of these were not possible with Firebase Functions. I could not even use the emulator to deploy locally. Firebase has its own way of serving locally and it has an interactive shell instead of letting you put breakpoints like traditional debugging. That was a turn-off.

At this time I was determined there has to be a way to demo Google Cloud Functions and still let the audience deploy their code. It occurred to me that I could let people deploy their functions in my project itself exactly like what we do at work. We just give "Editor" role to the team members to various GCP projects so that they can view and edit resources. Also instead of giving every Google account/Gmail id, I decided to create a Google Group where people can just join and get access to my demo GCP project once I approve. I just had to add the Google Group Id to the project as "Editor" instead of adding individual ids which had to be sent by the user one by one.

Problem solved ! (Well, as long as no one abuses and my card gets charged ;) )

Now I could just focus on the content. So the idea was to write a simple node.js function which can be deployed to functions emulator locally and tested. This could also be debugged locally using VS Code or Chrome's Dev tools. Finally, it was supposed to be deployed in the cloud. Even in cloud stackdriver's debug snapshot could be used to inspect variables and log points could be used to add logs on the fly instead of having to re-deploy every time we try to debug an issue in production which is not reproducible locally. If this was not enough content I also had a plan to demo Google text to Speech api integration with it where one can provide the text, language and gender as the parameter to the HTTP endpoint and it could stream/download the audio file back.

The workshop finally went well, I was glad to see many people deploying their functions even before I did :). This was almost a miracle that more than 25 users signed up even after almost everyone missed the pre-requisite instructions that I had mentioned before the event. This has been a trend for all workshop that happened, participants did not go through the pre-requisite for none of them. It's very difficult to conduct code lab if the majority of the time goes on setting up!

Ok, enough about me. This time I also got an opportunity to contribute to the organizing team of the event. I was overwhelmed by the energy and passion that I saw in other organizers and volunteers (some of them were just new faces and contributing for the first time). The team really pulled off some amazing sponsorship and pretty much everything went as per plan if not better.

One challenge that has been always there is the fact that not all registrations could not be accomodated in the event. More than 1800 registrations were received but only 600 could be acceopted due to space contraint. It could really be unfortunate for people who wanted to be part of the event and community in general. But this event is not everything what GDG Hdyerabad community is all about. I really encourage people to watch out for GDG and GCDC meetups that happens all through the year.  Also subscribe to GDG and GCDC facebook and GDG, GCDC twitter handles for any related announcements and collaberate and network with other developers. See you next time.