Giter VIP home page Giter VIP logo

bloop-it's Introduction

Bloop-it

Overview

This Spring Boot microservices application consists of the following services:

  • API Gateway: Acts as a single entry point for external and internal users.

  • Client Request Service: Handles external user requests to process a string of text.

  • Discovery Server: Manages service registration and discovery.

  • Sensitive Words Service: Allows internal users to perform CRUD operations on sensitive words. The application is load balanced to ensure high availability and reliability.

Services

API Gateway

  • Description: Acts as the gateway for all external and internal requests. Routes requests to the appropriate microservice.
  • Technologies: Spring Cloud Gateway, Eureka Client

Client Request Service

  • Description: Accepts a string of text from external users and processes it.
  • Endpoints: POST /bloop: Accepts a JSON payload containing a string of text to process.
  • Technologies: Spring Boot, Eureka Client

Discovery Server

  • Description: Manages the service registry, allowing microservices to discover each other.
  • Technologies: Spring Cloud Netflix Eureka Server

Sensitive Words Service

  • Description: Provides CRUD operations for managing sensitive words. Accessible to internal users.

  • Endpoints:

    • GET /api/v2/sensitveWords/words: Retrieve all sensitive words.
    • GET /api/v2/sensitveWords/word/search: Retrieve a sensitive word by searching the word.
    • POST /api/v2/sensitveWords/words: Add sensitive words from the .txt file.
    • POST /api/v2/sensitveWords/word: Add a new sensitive word.
    • PUT /api/v2/sensitveWords/word/{id}: Update an existing sensitive word.
    • DELETE /api/v2/sensitveWords/word/{id}: Delete a sensitive word by ID.
  • Technologies: Spring Boot, Spring Data JPA, Eureka Client

Load Balancing

The application uses Spring Cloud LoadBalancer to distribute incoming requests across multiple instances of the client-request-service and sensitive-words-service to ensure high availability and scalability.

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Prerequisites

  • Java 11 or higher
  • Maven

Usage

External Users:

  • Endpoint: POST /process
    • Payload
{
  "word": "sample text"
}

Internal Users

Internal users can manage sensitive words through the sensitive-words-service.

  • Endpoints
    • GET /api/v2/sensitveWords/words: Retrieve all sensitive words.
    • GET /api/v2/sensitveWords/word/search: Retrieve a sensitive word by searching the word.
    • POST /api/v2/sensitveWords/words: Add sensitive words from the .txt file.
    • POST /api/v2/sensitveWords/word: Add a new sensitive word.
    • PUT /api/v2/sensitveWords/word/{id}: Update an existing sensitive word.
    • DELETE /api/v2/sensitveWords/word/{id}: Delete a sensitive word by ID.

Configuration

application. Properties

Each service has its own application.properties file located in the src/main/resources directory. Customize these properties as needed.

Eureka Client Configuration

Ensure that each service has the correct Eureka client configuration to register with the Discovery Server:

eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/

Eureka Client Configuration

see application.properties of API Gateway

Conclusion

This Spring Boot microservices application is designed to handle external user requests and internal CRUD operations efficiently, with high availability through load balancing and service discovery. Follow the steps provided to set up and run the application.

Architecture

Alt Text

MIT

bloop-it's People

Contributors

sizwell 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.