Deep dive into Cloud Workflows
Google Cloud Developer Advocates, Guillaume Laforge [Website] and Mete Atamel [Website] have done a fantastic job over the last several months to inspire developers and get them started with various Google Cloud Serverless App Development/Deployment architectures and services.
This guide serves to list down a set of public resources made available by Guillaume and Mete to help you understand Cloud Workflows, a service that allows you to “Orchestrate and automate Google Cloud and HTTP-based API services with Serverless workflows.” The document contains references to content (workshops, codelabs, source code, videos and more) that Guillaume and Mete have created and which I am aggregating here in this document for your ready reference.
The flow suggested below can help you understand step by step as we lead into a deep dive on Cloud Workflows.
Introduction to Cloud Workflows
Start off with this video that gives you a high level overview of the product:
Choreography v/s Orchestration
But, wait a minute … I can string together a business process by connecting to multiple events and writing event handlers. Is that not a workflow too? You could call that, if you’d like but it’s a good time to look into what the terms Choreography and Orchestration mean?
You should take a look at the following 2 videos, one that explains Choreography and the other that dives into Orchestration. It is important to understand them, so that you can understand the ways in which you can put together a medium to complex architecture for an application that talks across various services. Do pay attention to Pros and Cons in the videos so that you can better understand the tradeoffs when you make a choice between the two.
Guillaume and Mete have multiple presentations on this topic at various developer conferences. A strong suggestion is to watch one of their latest talks on this topic, it’s about an hour long but a solid presentation on the topic.
Check out this blog post too, that highlights choosing the right orchestrator in Google Cloud.
Google Cloud Serverless Portfolio
If you have been through the above presentation, you will notice that various Google Cloud Serverless Products find a mention. These include : Cloud Functions, Cloud Run, Eventarc and more. While this document is specifically for workflows, it helps to understand this Serverless landscape, so that we are all set to dive into more. Here is a suggested flow:
- Mete has published a great set of presentations on his SpeakerDeck site. The specific one that you could look at to understand the Serverless on Google Cloud is this one : https://speakerdeck.com/meteatamel/serverless-landscape-in-google-cloud
- Guillaume and Mete have designed and run the Pic-a-daily Serverless Workshop that guides you through building a Photo sharing application that is powered by key Serverless options like Cloud Functions, App Engine, Cloud Run, Eventarc and more. You can find the Github page over here and the codelabs here.
3. The interesting part here is that you get to see both Choreography and Orchestration in action.
4. You should learn about Eventarc. This service lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. It is fully managed and was recently moved to General Availability (GA). Check out the following blog posts:
- Eventarc : A unified eventing experience in Google Cloud
- Presentation on Eventarc
- Eventarc Samples Github Repo
- List of Blog posts on official Google Cloud Blog around Eventarc.
At this point, you have got a flavour of the Serverless landscape, key concepts of Choreography and Orchestration and possibly, you even went through parts of the Pic-a-Daily workshop to appreciate the various services in action.
The next set of references in no specific order can help you dive into Cloud Workflows. Remember that Cloud Workflows will orchestrate together various Google Cloud Services, so it is important that you understand some of the earlier services.
Getting Started with Cloud Workflows Tutorial Series
Guillaume has a long-running tutorial series on Workflows. If you are working with Workflows, you should bookmark this series and go through each of the tutorials step by step. The series is available here and currently it is running into 20 parts!
Google Cloud Official Blog — Workflows
There are several blog posts on Workflows in the official Google Cloud Blog and here are a few that you should definitely check out:
- Implementing the saga pattern in Workflows
- Long-running containers with Workflows and Compute Engine
- Analyzing Twitter Sentiment with Workflows
Smarter Application with Document AI, Workflows and Cloud Functions
This is a great example of how you can combine multiple Google Cloud services via a workflow and build a real-world application around Expense Reporting.
The architecture is shown below:
Cloud Workflows Samples
There is a collection of Workflows samples available on Github.