Skip to content

hageshtrem/shipping

Repository files navigation

Shipping

This is an example of real world production ready application consisting of multiple microservices written in different programming languages.

The implementation is based on the container shipping domain from the Domain Driven Design book by Eric Evans, which was originally implemented in Java but has since been ported to Go. The original Go application is maintained separately and comes with a mock routing service.

Motivation

This project aims to demonstrate a possible way to split a monolithic application into microservices and organize synchronous and asynchronous communication between them. This project is not a DDD development best practice or idiomatic way of developing in Go and Rust.

Architecture Overview

The application consists of four application services and several other services for communication and maintenance. Protobuf is chosen as the IDL for synchronous communication between services via gRPC and as the data format for asynchronous communication via RabbitMQ.

App features

  • booking - used by the shipping company to book and route cargos.
  • handling - used by our staff around the world to register whenever the cargo has been received, loaded etc.
  • tracking - used by the customer to track the cargo along the route.

App implementation

  • proto is a folder contains API definitions of all services and describes the data format for RabbitMQ messages.
  • booking is a booking service written in Go.
  • pathfinder is a mock routing service wrapped in gRPC and used by booking service.
  • handling is a handling service written in Rust.
  • tracking is a tracking service written in Go.
  • apigateway is an Envoy that is used to transcode gRPC-JSON to provide API for browser clients.
  • frontend is a use case written in Rust with Seed.
  • elk is an ELK stack for centralized logging and maintenance.

Running the application

Make sure you have installed docker, docker-compose, make, protoc and Go plugins for protoc. After that, you can run the below command from the project directory.

$ make run

After everything has bootstrapped, navigate to http://localhost/. You can watch the original video with use cases.

About

DDD shipping application based on microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published