An Odessey of Connecting to Amazon Redis Cluster
2022-06-03Nowadays, Redis is an indispensable middleware in building the backend service of an app. As an ambitious team, we bought a Redis cluster under Amazon ElastiCache with the following features:
- Clustered with several shards, and each shard owns 3 nodes (each shard performs primary-replica)
- Encryption in transit enabled (or TLS) to assure no man-in-the-middle attack
- Redis AUTH enabled (of course we do not want a door without a key)
So far so good, it seems that we can concentrate on developing our product now. But wait, as the title says, the way is too long to get there!
An Odyssey of Solving Online Database Problems
2022-04-10Since joining one of the most renowned technology companies in 2021, my journey has been a whirlwind of challenges and triumphs. While it’s an honor to work for such a prestigious organization, I soon discovered that it came with a price. In this article, I want to share with you the up and downs of my adventure.
PlantUML Workflow Hand by Hand
2021-09-27接触 PlantUML 好一阵子了,一直以来也经常向周围的朋友安利。每次都会丢出去一堆链接和教程,于是想着整理整理,这样下次再安利的时候就直接把博客甩出去就好,便有了这篇手摸手教程,讲一讲日常工作中使用 PlantUML 的方法。PlantUML 基础语法相关内容在本文中先按下不表,大家可以自行前往官网或者 REAL WORLD PlantUML 学习。
Spring Web Data Binding and Validation Corner Case
2021-08-02This Stackoverflow Topic
comes up with two questions.
- Q1: how to distinguish exceptions between
- data binding when conversion http request body to object
- customized validation defined as annotation on that object
- Q2: how to display valuable information when data binding fails
Tuning Development Process with Flyway
2020-11-18There are embarassing situations when developing a mono project with multiple environments.
Like git for code repository, flyway aims to take version control to database. This article introduces how to use flyway in a spring boot project environment with existing dataset.
Java 中的 volatile 和 synchronize 关键字解读
2019-11-17读 Concurrent Patterns and Best Practices,遇到两篇参考文章
- 写于 2001 年的 Double-checked locking: Clever, but broken,对 DCL 实现懒加载单例模式存在的问题进行了深刻的探讨,同时阐述了 synchronize 关键字的作用
- 写于 2018 年的博客 Java Volatile Keyword,详细阐述了 volatile 关键字的作用
一番阅读之后,撰写此文备忘。