Though I am a software engineer, I always dream about opening a coffee shop one day. A while ago, I wrote about compilation from the perspective of two people ordering poutines. Today, let’s talked about system design from the perspective of a coffee shop owner, Joe.
We’ll cover these system design topics:
Sublime Text is a clean, fast, and lightweight text editor. Its rich support for plugins also makes it extendable and powerful. In today’s tutorial, we’ll look into how to create a plugin of our own.
Imagine we have a logger that logs all the API requests and responses. And here is an example request:
PurchaseRequest(itemId: 375, name: "Spook", price: Amount(value: 100, currency: 'USD'), insurancePolicies=[20931, 12035])
It tells us that we are purchasing a
id of the item is
375, and there are also two insurance attached, with their policy number being
Google APIs are a huge umbrella. Check out the almost 200 entries from the Google API explorer. Among all these APIs, some of popular ones include: Google Drive, Gmail, Cloud Datastore, Google Cloud Storage, etc. Today, let’s take a look at what it takes to integrate the Google Drive API into a Flutter app.
There are many interesting aspect of Google Drive API. But one of the most interesting ones that I find are that it gives cloud storage for your user data without having to actually build, maintain, and pay for cloud storage. …
There are plenty of beginner tutorials about building TODO apps, recipe apps, habit tracker apps, etc. Most of them focus on building UI, which undoubtedly is one of the most important topics for a mobile application. However, nowadays, most interesting apps also contain a server-side component.
UIStackView is one of the most important and powerful
UIKit components introduced in iOS 9. It is so powerful and elegant that it really speeds up a lot of us pushing to drop support for iOS 8.
For people that work with Auto Layout a lot, you will know that it is not particularly fun and easy to create
NSLayoutConstraints. Since each view on a 2D screen has four degrees of freedom, it means that, in general, we would have to create at least four constraints for each view.
So, back to the introduction of stack view, was it that…
Python is known to be good for data visualization. There are many tools in Python enabling it to do so: matplotlib, pygal, Seaborn, Plotly, etc. Among these, matplotlib is probably the most widely used one. On one hand, it offers a lot more flexibility; on the other hand, it is also very low-level and may not the most straightforward to use. There are a lot of articles explaining how to do 2d plotting with matplotlib already. In this post, we will focus more on plotting in 3d.
You can simply read through this as it. But to get the most…
In this block post, we’ll package applications with Docker containers, and then deploy them with Kubernete in a local minikube cluster. We’ll cover some Kubernete concepts such as Pod, Deployment, Service, etc. Source code is published here.
This is a semi-rerun of an older blog Developing Microservices with minikube. If you are into Typescript and want some step-by-step level of details, check that out instead. We focus more on Kubenetes and Docker instead of building applications here.
There are 3 apps: auth, gateway, and books. They are implemented in 3 different ways.
This is a follow up for DNS configurations for dev environment (Part 1), with some useful troubleshooting tips and tricks here.
View the DNS configuration used by this system. It is expected to see the following.
$ scutil --dns...
domain : local.zone
nameserver : 127.0.0.1
flags : Request A records, Request AAAA records
reach : 0x00030002 (Reachable,Local Address,Directly Reachable Address)
Check the system log for errors. In this case,
dnsmasq is in a reboot loop.
$ tail -f /var/log/system.logMay 19 22:06:51 L10019 com.apple.xpc.launchd (homebrew.mxcl.dnsmasq): Service exited with abnormal code: 3
May 19 22:06:51 L10019 com.apple.xpc.launchd (homebrew.mxcl.dnsmasq): Service…
The goal of this blog post is to forward requests to
127.0.0.1 for local development purposes.
local.zone can be any domain in general.
A simple solution is to add entries in
/etc/hosts. This file overwrites the DNS resolving. Whatever is specified in this file, it will be automatically redirected to the corresponding IP address. For example, this is a default
In this case,
localhost will be redirected to
127.0.0.1. The only problem with this approach is that it doesn’t support wildcard matching. …
Within the last 5 years, Kubernetes has received 2k+ contributors and 50k+ stars on Github 🌟⭐.
This blog post will go through some of the basics behind managing micro-services using Kubernetes. We’ll be using minikube, which allows us to run Kubernetes locally.
For the purpose of this blog, we’ll only create 3 services: auth_svc, gateway_svc, books_svc.
A user will make a request (with a book_id) to gateway_svc, which will then check the forward the auth token from the request to auth_svc…