Cloud Service

Implementation of Google Cloud Pub/Sub Push Subscription

Learn how to implement Google Cloud Pub/Sub Subscriber in Golang

ta-ching chen

3 minute read



Cloud Pub/Sub supports push and pull message delivery. In this post, we would dive into Push Subscrption.

Implementation of Google Cloud Pub/Sub Publisher

Learn how to implement Google Cloud Pub/Sub Publisher in Golang

ta-ching chen

2 minute read



Clone Repo

Now lets get into the hands-on!

# Clone repo and restore dependencies
$ git clone \

restore dependencies with godep

$ go get -u
$ cd $GOPATH/src/ && godep restore

Introduction to Google Cloud Pub/Sub

Basic introduction of Google Cloud Pub/Sub

ta-ching chen

2 minute read


Google Cloud Pub/Sub is a messaging service which lets independent applicaitons exchange messages with Publish/Subscribe model with others. There are pros and cons when using message servcie as a messaging middleware:


  • reduce coupling between applications
  • use message queue as buffer to hanlde large message request
  • publish/subscribe to different topic depending on the situation


  • the instantaneity, ordering and duplication of message are not guaranteed
  • understand how the message is being delivered to avoid unexpected behavior of applicaitons.

Here are couple things that we may consider before choosing which message service to use:

  • performance of message delivery
  • scalability, reliability and availability

When Hugo Meets OpenShift

Learn how to run Hugo on OpenShift DIY cartridge

ta-ching chen

3 minute read

Hexo is good, but generating speed I used Hexo, which is written in Node.js, to generate static web files and used OpenShift Node.js cartridge to host the files. It took almost 10 sec to generate for just 5 posts. On the contrary, Hugo, written in Go, generates all static files within 1 sec. That’s 10x fast than Hexo! In the following paragraph, we’ll go through the steps to create our own OpenShift DIY cartridge and run Hugo on it!