By Ryan Blunden for the GopherCon Liveblog on August 29, 2018
Presenter: Kelsey Hightower
Liveblogger: Ryan Blunden
In this talk, Kelsey demonstrated what a simple Serverless application looks like, highlighted some best practices and inspired Go developers who haven't experimented with Serverless yet to give it a try. While he doesn't suggest we all rewrite our existing applications in individual functions, for evented workflows, serverless does offer some compelling use-cases.
Kelsey is comfortable with containers and Kubernetes as that's his world. Coming to Serverless from that world, it was an interesting experience.
What is "Serverless"? Pretty bad name as that describes a lot of stuff. Managed email, cloud blob storage, managed databases etc.
To set the context of Serverless for his talk, we're talking about a Go developer that wants to write functions that react to events and are hosted on a Cloud Function as a Service (FaaS) platform.
ANNOUNCEMENT: Native support for Google Cloud Functions in Go are in Alpha.
Some devs when coming to the Serverless world might say:
I don't want to give up control to this black box.
But you've already yielded a lot of that control to your language of choice, your framework etc.
What's important is making observability a priority. So while the function hosting environment remains a black box, how our code is running is not. Tools like Open Census are essential.
Kelsey breaks it down nicely.
Functions Programming logic written to perform a specific task.
Events A response to something that happens in the cloud. Can be a cloud trigger (file uploaded to blog storage), your own event, or a webhook that hits an API gateway that in turn, triggers a function.
Managed services Pay per use; fully managed.
Let's see what Stack Overflow says.
It seems Kelsey is going to keep contributing to that question.
Not a comprehensive list:
API Gateway: Map an HTTP endpoint to a function call. Logging: Feed your logs to a log aggregation service. Storage: Your function can be deleted at any time so not persistent storage. Managed databases, blob storage etc. Tracing: Kelsey used Open Census in his talk.
Tracing is vital as without it, it's almost impossible to debug issues.
Thanks to Kelsey for a great and entertaining talk!