Sign in

What is Metadata ?
Metadata is simply data about data. It means it is a description and context of the data. It helps to organize, find and understand data.

Here are a few real world examples of metadata:

Typical metadata
Those are some typical metadata elements:
1. Title and description.
2. Tags and categories.
3. Who created and when.
4. Who last modified and when.
5. Who can access or update.

A photo
Every time you take a photo with today’s cameras a bunch of metadata is gathered and saved with it:
date and time,
camera settings,


An enum is a special “class” that represents a group of constants (unchangeable variables, like final variables).
To create an enum, use the enum keyword (instead of class or interface), and separate the constants with a comma. Note that they should be in uppercase letters:


enum Level {

You can access enum constants with the dot syntax:
Level myVar = Level.MEDIUM;

Enum Fields
You can add fields to a Java enum.
Thus, each constant enum value gets these fields.
The field values must be supplied to the constructor of the enum when defining the constants. Here’s an…

Below two github repos contain my examples of use of OpenApi codegen:
This is a Spring Boot web application that uses openapi-codegen maven plugin to generate example PetApi interface for spring boot controller to implement. The auto-generated java classes are generated from “petstore.yaml” openapi spec file.
This is a Java application that uses openapi-codegen maven plugin to generate exaxmple client code that can call the petstore Web APIs, the API which we wrote in above “spring boot” web app.
It’s a great example of use of auto-generated openapi client class : “ApiClient”.

below is the link for official openapi-generator maven plugin:

Run this command to start Vault server locally

vault server --dev

this command will start a dev mode vault server locally and give you the vault server url & vault token which you can export in terminal.

Store secrets in Vault
Vault is a secret management system allowing you to store sensitive data which is encrypted at rest. It’s ideal to store sensitive configuration details such as passwords, encryption keys, API keys.

Launch another console window to store application configuration in Vault using the Vault command line. …

Vault comes with various pluggable components called secrets engines and authentication methods allowing you to integrate with external systems.

The purpose of those components is to manage and protect your secrets in dynamic infrastructure (e.g. database credentials, passwords, API keys).

One of the core features of vault is the ability to read and write arbitrary secrets securely. Secrets written to vault are encrypted and then written to backend.

The path prefix tells Vault which secrets engine to which it should route traffic. When a request comes to Vault, it matches the initial path part using a longest prefix match and…

Let’s talk about everything about Redis Cache.

High level Architecture
The basic idea of rate limiting algorithms is simple. At the high-level, we need a counter to keep track of how many requests are sent from the same user, IP address, etc. If the counter is larger than the limit, the request is disallowed.

Where shall we store counters ? Using the database is not a good idea due to the slowness of disk access. In-memory cache is chosen because it is fast and supports time-based expiration strategy. For instance, Redis is a popular option to implement rate limiting. It is an in-memory store that offers two…

For learning





就比如你去面试国足你说你踢了10年球了, 人家先测你个百米速度你跑了半分钟, 那你踢几年球有意义吗只能说明你在低水平球队混了10年而已.
但一旦你刷题这关过了, all of sudden your experience starts to matter! …


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