Code Monkey home page Code Monkey logo

samplespring's Introduction

Table of Content

About

cover

This project requires local installations of the following

This prototype implementation of a service manager has the following parts

    1. A test harness
    1. The Service Manager framework
    1. A postman collection

Test Harness

This test harness is an inventory api which provides service endpoints with data loaded from json files for stocks, sales and reviews.

For example testing the service manager with, - http://localhost:9090/invoke?brand=iphone gives the stocks, sales, reviews for iphone - http://localhost:9090/invoke?brand=samsung&date=__fromDate:01-10-2023 gives the stocks from the first of october - http://localhost:9090/invoke/aggregateByModel?brand=iphone, gives the aggregated sales and stock data for iphone

All the above test urls are configured in the given postman collection with visualization scripts.

Implementation details of the test harness are inside the InventoryServiceHarness folder

Build and start the Inventory Service Harness

  • The inventory service starts in port 8080
cd InventoryServiceHarness

mvn package

java -jar target/InventoryApi-0.0.1-SNAPSHOT.jar

Service Manager

The Service Manager is implemented as a Spring Boot application, more details on the requirements and design are in the ServiceManager folder. This design looks at the solution to identify services from params as a set intersection problem. There are various set intersection algorithms discussed like List, BitMap in the README.md of the ServiceManager project

Build and start the Service Manager

  • The service manager starts in port 9090 and is preconfigured with endpoints of the inventory harness. The inventory service must be started for the service manager to start successfully
cd ServiceManager

mvn package

java -jar target/ServiceManager-0.0.1-SNAPSHOT.jar

Postman Collection

The postman collection has test scripts with params for category, model, brand, zip, sales, sales amount, available stock. It can test the service manager and visualize from the results, it also has a load test suite Import the collection into postman and test the given APIs

Test with the given postman collection

PostmanTest

samplespring's People

Contributors

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