GithubHelp home page GithubHelp logo

neirth / nestedapi Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 564 KB

My personal sandbox experiment for microservices. Transforming RESTful endpoints into purpose-built components. Not for production.

License: MIT License

Dockerfile 2.09% Kotlin 96.95% HTML 0.96%
amqp rabbitmq jwt-token microservices infrastructure backend-services oauth2 quarkus maven mongodb openid-connect api-gateway azure-sql bson jakartaee nginx-proxy

nestedapi's Introduction

About the Project

NestedAPI is a microservices-based framework designed for creating backend services that cater to real-world needs. Please note that this project is purely experimental and meant for personal exploration. It is not intended for commercial or production use. For production use, please, use Hasura project.

Why I Started This Project

I embarked on this journey to streamline the development cycle and enhance collaboration within my team. The goal is to focus solely on essential components during development. While the core of this project is built using Kotlin, I encourage the freedom to introduce modules in different programming languages as long as they integrate seamlessly with existing technologies. I'm committed to refining these modules to ensure they fulfill their respective purposes effectively.

How the project is structured

NestedAPI transforms RESTful API endpoints into specialized components, enabling scalable architecture to handle substantial workloads. Let me illustrate the project's composition:

graph LR
A((Client Device)) <--> | HTTP/HTTPS Request | B(API Gateway)

K(Message Broker) --- C
K(Message Broker) --- E
K(Message Broker) --- G

subgraph "Endpoint Containers"
    B --> C(/auth)
    B --> E(/users)
    B --> G(/invoices)
end

subgraph "Per-service Databases"
    C <--> F([Auth Database])
    E <--> H([Users Database])
    G <--> T([Store Database])
end 

L(Cache Service) --- C
L(Cache Service) --- E
L(Cache Service) --- G
Loading

The diagram showcases the service structure. Each service can have replicas that collaborate harmoniously. This synergy is facilitated by the API gateway, serving as both a load balancer and a messaging service that relies on RabbitMQ's pub/sub model. Modules are dedicated to specific tasks, and if one module requires access to another's information, it produces a message consumed by the relevant service.

As for the database, each module only interacts with the tables pertinent to its tasks, maintaining data isolation. This ensures that information is solely managed by the responsible module.

Getting Started

If you're interested in exploring and experimenting with this project on your local machine, follow these steps. Remember, this project is not intended for deployment in live systems.

Prerequisites

You'll need a Linux host with Docker support, along with the docker-compose utility to deploy project containers.

Installation

Deploy the project using Docker Compose:

[dummy@dummy-world NestedApi]$ docker-compose -f docker-compose.yml up -d

Technologies Utilized

  • BSON Encoding - Serialization of RPC requests in binary format.
  • RabbitMQ - Internal bus for RPC communication between services.
  • Docker - Containerization of project and dependencies.
  • JWT Parser - Generation and validation of stateless user tokens.
  • H2 Database - Embedded SQL database for testing entity operations.
  • Microsoft SQL - High-performance database supporting all modules.
  • Hibernate & JPA - Persistence of entities in the database without hardcoded SQL.
  • Quarkus Framework - Execution of code and native builds for module projects.

License

This project is licensed under the MIT License. For more information, view the LICENSE file.

nestedapi's People

Contributors

neirth avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.