Full Blog TOC

Full Blog Table Of Content with Keywords Available HERE

Monday, August 7, 2023

Simplifying creation of Go applications on Google Cloud - Post Review


TL;DR

Google seems to stop having new ideas, so it just publishes nonsense as if it was news


Once in a while I read the blogs for some frameworks such as GCP, AWS, and K8s.

Some of the updates are marketing posts, but among them we can find some interesting news. Lat week, checkin gthe GCP blog, I've found the post Simplifying creation of Go applications on Google Cloud. This post seems promising, as a framework for Go applications is something that takes time to build, and I thought I might find interesting ideas there.

The post includes 4 templates:


"

  • httpfn: A basic HTTP handler (Cloud Function)

  • pubsubfn: A function that is subscribed to a PubSub topic handling a Cloud Event (Cloud Function)

  • microservice: An HTTP server that can can be deployed to a serverless runtime (Cloud Run)

  • taskhandler: An basic app that handles tasks from requests (App Engine)

"


So I've checked the templates, and was very disappointed. Most of the templates include less than 10 lines of banal code. It seems that someone in google thought that adding sample code that does almost nothing is good enough to be published in the GCP blog.


The question asked here is: what are the expectations from such a post?


The answer is framework and standards!


Instead of a naive example for HTTP server handler function, add a framework to wrap the HTTP handler, add error handling and logging as part of the HTTP wrapper, add some built-in handlers to the HTTP server, such as pprof profiling capabilities, and setup standards for code design and style.

Most of the projects I've been part of have a major part of the code in the "common" libraries. These common libraries provide a real template for new applications, making them more robust, simple to create, and set code and design standards to the application using the libraries.

A partial list of such libraries is:

  • Logging, log level, logger handler
  • Error handling (panic, recover)
  • HTTP web server wrapper
  • Scheduler wrapper
  • Extend core functionality for: io, slices, strings, parallelism, time
  • Testing wrapper

While adding usage such set of libraries to existing application is almost impossible, this can set a standard to new applications, and this is what I expect from Google - to setup standards. I hope next post would be more in this direction...







No comments:

Post a Comment