Skip to content

0.Introduction to NovelNest project

Preface

  • In this series, I aim to build an example web app as close as real-world scenario as possible and then set up the necessary infrastructure for it from scratch.

  • NovelNest is a specialized bookshop whose mission is to spread knowledge and information. The organization behind NovelNest - has decided to start selling its book online.

NovelNest system requirements

  • Books will be available for sale through the application: when a customer purchases a book, they should be able to check on the status of their order. Two categories of people will use the NovelNest application:
    • Customers can browser books in the catalog, buy some, and check their orders.
    • Employees can manage books, update existing ones, and add new items to the catalog.

NovelNest Architecture

NovelNest Architecture

Patterns and Technologies used in NovelNest project

Web and interactions

  • NovelNest comprises of several services that will have to communicate with each other to provide their functionality. We’ll build RESTful services that interact synchronously over HTTP, both in a blocking way and non-blocking ways (reactive-programming). Spring MVC and Spring WebFlux will be our main tools for accomplishing such a result.

Data

  • We’ll use PostgreSQL database to permanently store the data processed by the application.
  • Spring Data JDBC, Spring Data R2DBC (reactive)
  • Manage schema migrations with Flyway
  • Event-driven programming patterns: Spring AMQP and RabbitMQ
  • Session storage: Redis

Routing

  • Spring Cloud Gateway: a service that will act as an API Gateway to shield the outside from any internal API changes. It will also be an edge that we’ll use to address cross-cutting concerns, like security and resilience in one place. This service will be the entry point to the NovelNest app, and it will have to be highly available, performant and fault-tolerant.

Observability

  • The services in the NovelNest system should be observable.
  • Spring Boot Actuator
  • Prometheus, Grafana
  • Distributed tracing with OpenTelemetry
  • Logging: Fluentbit, Loki

Resilience

  • Spring Cloud Circuit Breaker, Resilience4j to implement circuit breakers, retries, timeouts and other patterns

Security:

  • Authentication, Authorization functionality
  • Secure communication between services, between users and applications.
  • Oauth 2.1 and OpenID connect.
  • Spring security
  • Keycload for indentity and access control management

Testing

  • Automated testing: JUnit5

Build and Deployment

  • Docker, Kubernetes
  • Spring Native and GraalVM
  • CI/CD: Jenkins, GitOps with ArgoCD

UI

  • Angular Framework