Giter Club home page Giter Club logo

akka-microservices's Introduction

Akka Microservices

The aim of this project is to show how a microservices architecture can be laid out using the Akka stack as its foundation.

Warning:

This is a Work In Progress example. So far, the structure for a single microservice has been laid out together with a set of CRUD endpoints for an example entity. Interaction between two microservices will be added next.

Microservices platform structure

The repository consists of the following individual projects:

user-service

It contains all concrete code related to the User bounding context. That is all of the User domain operations as well as all of the necessary interfaces to interact with it.

Both common and testkit are dependencies of this project.

common

It contains all common abstractions which are not specific to any subdomain in particular. Those are for instance base and marker traits for domain objects and components such as Entities, Services and Repositories. It also houses any common and technical facilities which are wanted to be available across different subdomains.

This project should be autonomous and not depend on any other. No subdomain specific code should be included here.

testkit

It contains all common abstractations used for writing Unit and Integration specifications accross different microservices.

This project should depend only on common.

Hexagonal Architecture

An Hexagonal Architecture has been chosen to structure each microservice project. The Hexagonal Architecture reinforces the separation of business logic from technical concerns which is a key aspect in a microservices environment where different communication technologies and protocols may take place (such as REST, GraphQL, gRPC, messaging queues, etc).

The Hexagonal Architecture defines mainly two distinct layers: the inside and the outside. The former holds all of the domain objects and components while the latter houses all of the technical components which facilitate access from and to the inner layer. Those are named domain and infrastructure respectively in this project:

microservice
├── domain
│   ├── model
│   └── services
├── infrastrucuture
│   ├── rest
│   ├── grpc
│   ├── messaging
│   └── persistence
└── Main

Running locally

All microservices can be run individually in a local machine using sbt commands. In order to do so, common and testkit projects should be first published locally using below commands:

cd common/ | sbt publishLocal
cd testkit/ | sbt publishLocal

akka-microservices's People

Contributors

lregnier avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.