The post Worth Reading: Navigating EU safe harbor appeared first on 'net work.
Further explore the HPE, Intel & 6WIND's high performance vADC demo. Read the Q&A
In this post, I’ll outline the program I’ll be using to demonstrate how microservices work. It’s written in go but it’s pretty straightforward. At the end of the series of posts I will upload all of these examples to github as well, in case anybody wants to poke at them.
For demonstration purposes, I’ll be discussing a very simple program that is currently implemented in a monolithic fashion. I’ve called it squariply
for reasons that will momentarily become obvious.
Squariply accepts two integers on the command line, calculates the product (i.e. multiplies the two numbers), then squares the resulting number before printing the final result out. Mathematically speaking, if the integers provided on the command line are a and b, the output will be equivalent to (a * b) ^ 2.
My extremely amateur go code looks like this:
package main import ( "fmt" "os" "strconv" ) func main() { str_a := os.Args[1] str_b := os.Args[2] int_a, _ := strconv.Atoi(str_a) int_b, _ := strconv.Atoi(str_b) multiplyResult := int_a * int_b squareResult := multiplyResult * multiplyResult fmt.Printf("Result is %d\n", squareResult) }
For the purposes of clarity, Continue reading