I write code, I productize technology.

Truth can only be found in one place: the code. ― Robert C. Martin

gRPC - TL;DR

gRPC TL;DR gRPC system initially developed at Google in 2015 for internal use. It is open-sourced in 2016. gRPC is an open-source remote procedure call (RPC) framework. gRPC is used for a server to server or client to server communication. gRPC is preferred when you need low latency, highly scalable and distributed system. Most common use case of gRPC is to communication between microservices. It can also use in mobile and desktop application to communicate with Server.

Read more →

ProtocolBuffers - TL;DR

ProtocolBuffer TL;DR Protocol buffers are a language-neutral, platform-neutral extensible mechanism for serializing structured data. Protocol buffers are also known as protobuf Protocol buffers are developed by Google for internal use. It is available for the public in 2008. Protobuf is binary serialize protocol, unlike JSON and XML which are text-based human-readable protocol. It’s non-human-readable because of binary serialize. Apache Thrift, Ion, Fast Buffers, FlatBuffers, Cap’n Proto, SBE (Simple Binary Encoding) are some of the alternatives of Protocol Buffers.

Read more →

GraphQL - TL;DR

GraphQL — TL;DR Facebook develops GraphQL in 2015. On 7 November 2018, the GraphQL project was moved from Facebook to the newly-established GraphQL Foundation. Lee Byron https://leebyron.com/ is co-creator of GraphQL at Facebook GraphQL is a data query and manipulation language for APIs. It can be alternative to REST API or co-exist with REST API GraphQL is not a query language of GraphDB but you can use GraphDB with GraphQL.

Read more →

Microservice Architecture: The Real Challenge

Microservice Architecture: The Real Challenge Microservice is a buzzword among the developer community. In this article, we will explore the most important points about Microservice architecture that are seldom addressed elsewhere. We will try to cover all the practical problems of moving to microservice architecture. Let’s start with some advantages of microservice architecture. Following are three major advantage for which you may consider moving to microservice architecture. Engineering flexibility: Each service team can choose a different programming language or framework.

Read more →

RFC 8259 --- The JavaScript Object Notation (JSON) Data Interchange Format

RFC 8259 — The JavaScript Object Notation (JSON) Data Interchange Format ![source: https://www.json.org/] JSON has become defacto data exchange format for REST API. It is so common that developers consider JSON as a default protocol for communication until specified otherwise. In this article, I will try to cover the history of JSON along with RFC and IETF. “JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.

Read more →

Golang: Find the type of the variable

Golang: Find the type of the variable The Go reflection package has methods for inspecting the type of variables. The following snippet will print out the reflection type of a string, integer and float. Document https://golang.org/pkg/reflect/#Type package main import ( "fmt" "reflect" ) func main() { b := true s := "" n := 1 f := 1.0 a := []string{"foo", "bar", "baz"} fmt.Println(reflect.TypeOf(b)) fmt.Println(reflect.TypeOf(s)) fmt.Println(reflect.TypeOf(n)) fmt.Println(reflect.TypeOf(f)) fmt.Println(reflect.TypeOf(a)) } How to print variable type The Printf is capable of print exactly variable type using %T formatting

Read more →

My Personal Technology Radar for 2018

My Personal Technology Radar for 2018 Technology radar is published by ThoughtWorks. It publishes insights into the technology and trends which may shape the future. It also maintains position of existing tools and technologies. I am writing my personal technology radar in this article. I will explain tools, technologies and frameworks which I will keep an eye on for this year. Software industry is moving too fast these days. The main problem for every one is to predict which technology will grow and become mainstream and which one are just buzz words.

Read more →

Golang: Generate fixed size random string

Golang: Generate fixed size random string There are many ways you can generate random string, In this article I will explore fastest method to generate fixed size random string Generate Random String using rand.Intn() This is most simplest way to generate random string but not slowest (ASCII table http://www.asciitable.com/) //RandomString - Generate a random string of A-Z chars with len = l func RandomString(len int) string { bytes := make([]byte, len) for i := 0; i < len; i++ { bytes[i] = byte(65 + rand.

Read more →

Golang: parse and format unix timestamp

1. If you have unix timestamp in String The time.Parse function does not do Unix timestamps. Instead you can use strconv.ParseIntto parse the string to int64 and create the timestamp with time.Unix: package main import ( "fmt" "time" "strconv" ) func main() { i, err := strconv.ParseInt("1518328047", 10, 64) if err != nil { panic(err) } tm := time.Unix(i, 0) fmt.Println(tm) } 2. If you have unix timestamp in int The time.

Read more →

Golang: Serialize struct using gob: Part 2

[Golang: Serialize struct using gob — Part 2 In this article we will explore following functions of gob func (dec \*Decoder) Decode(e interface{}) error func (enc \*Encoder) Encode(e interface{}) error Encode and Decode functions are helpful when you want to write network application. Example 1: Simple encoding and decoding student structure package main import ( "fmt" "encoding/gob" "bytes" ) type Student struct { Name string Age int32 } func main() { fmt.

Read more →