Go

Function Memorization in Go

Memoization is an optimization technique used to increase performance by storing the results of expensive function calls and returning the cached result when the same input occurs again. In this post I show how function memoization can be implemented in Go, in a pure functional manner. Based on wikipedia definition, a function may be considered a pure function if both of the following statements about the function hold: 1. The function always evaluates the same result value given the same argument value(s).

Docker Swarm (Part 2)

Introduction In the previous post, we ‘ve learned how to create a cluster of machines using Docker Swarm, and how to ask Swarm to run 2 instances of Nginx on those machines.In this post, we will learn how to run our custom applications on the cluster. We ‘re going to implement two services using Go, one of them is fontend service and the other is backend service. The user can interact only with frontend service.

Say Hello to Docker Swarm

Say Hello to Docker Swarm (part 1) In this tuturial I want to show you, how you can create cluster of machines using Docker Swarm and how to run your services on docker swarm.I assume you have basic knowledge of Docker.On part 2, we will implement our services on Golang, and will run them on docker swarm, so stay tuned. Install Docker Machine In this tutorial I use docker-machine to simulate physical machines.