Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/l33t-c0d3r-66/stocks-aggregator-service

An Aggregator Service for Stocks Customer and Stocks API
https://github.com/l33t-c0d3r-66/stocks-aggregator-service

html5 reactive-programming spring-boot springwebflux stream

Last synced: about 2 months ago
JSON representation

An Aggregator Service for Stocks Customer and Stocks API

Awesome Lists containing this project

README

        

## Introduction
The Aggregator Service acts as the central hub for the Spring WebFlux project. It connects the frontend with the Stock Service and the Customer Service, aggregating data from these sources to provide comprehensive information about stocks and customer portfolios. It also manages the buying and selling of stocks based on the latest prices.

## What is Reactive Programming?
Reactive Programming is a programming model focused on data streams and the propagation of changes. It is particularly suited for applications that need to process a large number of events asynchronously and handle high throughput.

## What is Spring Boot?
Spring Boot simplifies the development of Spring-based applications by providing default configurations and tools to create production-ready applications with minimal setup.

## What is Spring WebFlux?
Spring WebFlux is a fully non-blocking, reactive web framework that supports asynchronous processing and backpressure. It is ideal for building applications that need to scale and handle a large number of concurrent requests.

## Advantages of Spring WebFlux
Scalability: Efficiently manages a large number of concurrent users.

Reactive Streams Support: Ensures that the system remains responsive under load by handling backpressure.

Improved Resource Utilization: Uses fewer threads to handle more requests, reducing resource consumption.

## Communication with Other Services
The Aggregator Service communicates with:

Stock Service: Queries the Stock Service for real-time stock price updates.

Customer Service: Retrieves customer portfolio information, including account balance and owned stocks.

Stock Transactions: When buying or selling stocks, the Aggregator Service first queries the Stock Service for the current price, then updates the Customer Service with the new portfolio details.

```
+----------+ +-------------------+ +---------------+
| Frontend | <------> | Aggregator Service| <------> | Stock Service |
+----------+ +-------------------+ +---------------+
|
|
v
+-------------------+
| Customer Service |
+-------------------+
```

## Demo
You can find a video in the demo folder.