Photo by Glen Carrie on Unsplash

It’s been a while since lab one, this time I am going to cover how I finished the lab two Raft implementation. If you are interested in lab one, check this out

Raft Overview

First, let’s have an overview of Raft. Raft is a consensus algorithm for managing a replicated log. The core idea of Raft from my understanding is:

Photo by Vishnu Mohanan on Unsplash

Running an Azure/AWS/GCP managed k8s cluster can be costly if you are simply playing with it for dev/test purpose. However, if you happen to have a Raspberry Pi, you can run a k8s cluster on it.

If you google “running k8s on raspberry pi”, there are many available Kubernetes distributions, in this post, I will briefly try some popular distributions, namely MicroK8s/k3s/kind/k3d/k0s and provide my two cents that which one is best fit for your Raspberry Pi.

In this post, I am using a single Raspberry Pi Model 4B 4G Ram model with 32GB storage card running Raspberry Pi OS…

Photo by Nick Morrison on Unsplash

The motivation

Early this year I was randomly browsing our company’s discussion group, and the MIT online course MIT 6.824 Distributed System happened to come across to me. After I did a quick look at the course syllabus, I was immediately intrigued by it and decided to follow this course as much as I can.

I was having a tough time with my daily work dealing with a complex and highly distributed system at that time, and I hoped I could get some inspiration from this course as well as systematic understanding of distributed system rather than several fragmented online articles…

Write your blog posts like contributing to a GitHub repo.

There are plenty ways to build your personal blog, but with Gatsby and GitHub, you can build a blog where you can easily set up but you still have the full control of your website layout at no cost.

Using Gatsby to build your blog site

Gatsby is a React-based open source framework for creating websites and apps. Let’s use it to build our blog site in a few minutes.

Gatsby supports many starters to let you build your websites faster and easier. Your website can achieve this out of box:

Recently my work requires me to implement the encryption of the credentials entered by the customer from the browser and the decryption at server side, in a secure and compliance manner.

The first thought came to my mind was the RSA public key/private key encryption algorism, which is straightforward.

Code is also straightforward:

This worked fine until I learned asymmetric encryption can only encrypt small amount of data which is up to the length of key size modulus minus a small number depending on padding mode.

After some research, it’s usually recommended to use symmetric encryption like AES to…

Qingping Meng

Someone who is obsessed to build things

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store