Redis has become an essential component in distributed microservice application domain due to its simplicity, performance, and clean set of features. This article is about building a task scheduling system using some of the Redis features. The requirement is selected as below for the sake of defining the boundary and way of explaining.



JSON Web Token (JWT pronounced as ‘jot’) is the IETF standard for transmitting JSON format claims between interested parties in a secure and compactable way. JWT has become the open standard for token-based authorization.

JSON Web Token (JWT) is a compact, URL-safe means of representing
claims to be transferred between two parties. …

The composite design pattern is a common structural design pattern that composes objects in a tree structure and provides an interface to work with them as they were individual objects. This pattern creates a tree structure with objects inherited from the same base and provides a nice abstraction over the structure.

Apply this design pattern when:


Real word examples:

Popular use case of this pattern is Directory/Folder structure, HTML…

The builder design pattern is a simple but powerful creational pattern which decouples object construction from implementation by encapsulating complex object construction logic and delegate the construction responsibility to separate classes. The pattern is suitable for building multiple representations from the same object.

Builder pattern builds a complex object using simple objects and using a step by step approach. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. [by tutorialspoint]

Apply builder design pattern based on Code Smells:

Sukitha Jayasinghe

Software Architect with 10+ years experience designing and developing enterprise and cloud applications

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