Giter Club home page Giter Club logo

spring-cloud-microservices-examples's Introduction

Spring cloud microservices examples

Microservices examples using spring cloud netflix integration with spring boot apps

Case Study:

Building a microservice application to track investment portfolio of an user like ET-Portfolio or Money Control. This should track the investments of a user and could show return of investment over a period of time.

Scope this case study is to only track investments of type stock and mutual funds.

Solution:

Micro-Services Description
Portfolio Tracker DB Service Stores user quotes information. Quotes can be of type Stock or Mutual Fund
Portfolio Tracker Pricing Service Talks to an external finance api application World Trading Data like yahoo finance apis to fetch fresh price quotes
Portfolio Tracker Aggregator Service Interacts with both db service and pricing service to process the user portfolio data and fetch investment returns
Portfolio Tracker Registry Service Acts as a service registry and api gateway

micro-service-update

API :

api to save user quotes for a stock.

url: /api/register-portfolio-data/quotes
method:POST
headers:
content-type:application/json

body:
{
  "userId": 102,
  "quote": "AAPL",
  "quantity": 7.6,
  "price": 26.18,
  "type":"stock",
  "date": "2000-11-25"
}

api to fetch portfolio data with returns.

url: /api/investment/portfolio/stock/102
method:GET
headers:
content-type:application/json

response:
{
  "code": "AAPL",
  "description": "Apple Inc.",
  "currentPrice": 191.05,
  "quantity": 7.6,
  "purchasePrice": 26.18,
  "purchaseDate": "2000-11-25T00:00:00.000+0000",
  "totalValue": 1451.98,
  "profitMargin": 1253.012
}

spring-cloud-microservices-examples's People

Contributors

anilpatro83 avatar

Watchers

 avatar  avatar

Forkers

ap010

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.