Published in Better Programming·Mar 2Validate Zero Enum Value in Protocol BufferHow to validate that a Protobuf message does not contain enum fields with zero value? Turns out that this isn’t supported directly by Protobuf! We need to look into how the package protojson is implemented. — More and more companies are adopting gRPC with Protobuf for communication between internal services. It has the benefits of high performance, supporting multiple programming languages, and being backed by Google with a great ecosystem around.Golang4 min read
Feb 22Eventual consistency and cacheWhat is it? Eventual consistency is a fancy name of doing something and only expecting the changed state after a while. And there is a guarantee that you will eventually get the expected state. Hence, consistency. But that won’t work well with caching. …Eventual Consistency2 min read
Published in Geek Culture·Feb 3, 2021Front-End Development Without node_modulesOnce upon a time, we could simply put an HTML and a script file into an FTP server, quickly have a working website and call it a day. Today, we have to jump through many hoops just to get the right things in the right places. Suppose Alice wants to…Java Script4 min read
Published in The Startup·Jan 8, 2021µjson — A Minimal JSON Parser and Transformer in Goµjson is a minimal JSON parser and transformer that works on unstructured (and trusted) JSON. It works by parsing input and calling the given callback function when encountering each item. Motivation Sometimes we just want to make some minimal changes to a JSON document or do some generic transformations without fully…Golang5 min read