Skip to content

osxhacker/demo-microsite

Repository files navigation

demo-microsite

An exploration of microsite/microservice concepts.

Overview

The purpose of this project is to explore concepts, tools, and techniques related to implementing and operating both microservices and microsites using Scala and off-the-shelf components, such as:

Concepts explored include, but are not limited to:

  • Microsites
  • Microservices
  • Generative Programming
  • Autonomous Production Support
  • JSON Hypertext Application Language
  • Using cats.effect.IO to define microservices
  • Abstracting logic via containers (F[_]) and implicit type classes
  • Using RAML to define API-first contracts
  • Inferring domain events with the Open/Closed principle
  • Defining inter-microsite contracts with RAML
  • Defining integration event representations with RAML
  • Defining persistent store representations with RAML
  • Using Kafka as a distributed, durable event bus
  • Reference object expansion
  • Pure Scala AOP
  • Using Kamon + Prometheus + pure Scala AOP
  • Logback + Logstash + Logstash-Logback-Encoder configuration and use
  • Inferring significant persistent store changes to report
  • Identifying and reporting individual slow invocations
  • Using Camel to define frontend services without custom components
  • Using APISIX as an application gateway
  • Using Giter8 to generate skeletal microservices

Quickstart

Here is how to build and run all services locally. Note that sbt must be installed and available in order to begin.

First, clone this repository locally.

Next, build and run the unit tests from the top-level directory:

sbt recompile-all test

Then follow the instructions detailed in the docker compose deployment documentation.

Roadmap

demo-microsite
├── api
├── deployment
│   └── docker
├── documentation
│   └── adr
├── frontends
│   ├── company
│   └── site
├── gatling
├── scripts
└── services
    ├── chassis
    ├── company
    ├── inventory
    ├── purchase-order
    ├── storage-facility
    └── template.g8
---
title: System Architecture
---
graph TD

gateway[Gateway] <--> site[Web Site]
gateway <--> company-site[Company Site]
gateway <--> storage-facility-site[Storage Facility Site]
gateway --> company-server[Company Server]
gateway --> storage-facility-server[Storage Facility Server]

company-site -- through gateway --> company-server
storage-facility-site -- through gateway --> storage-facility-server

company-server <--> kafka[(Kafka)]
storage-facility-server <--> kafka
storage-facility-server --> postgres[(PostgreSQL)]
company-server -- kafka --> storage-facility-server
Loading

api

This is where all RAML public API contracts are defined.

deployment

Here is where deployment artifacts are defined.

documentation

Project documentation source beyond READMEs and Scaladoc can be found here.

This project uses adr-tools to manage the ADR definitions.

frontends

Subprojects which provide UI/UX functionality are located here.

gatling

This subproject defines both end-to-end "feature simulations" as well as "load test simulations." Of note is that, while defined as a sbt aggregate, it does not link to any frontends or services. Only the public api is used.

services

All microservices are located here.

Further Reading

About

An exploration of microsite/microservice concepts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages