Git Product home page Git Product logo

cf-springboottrader's Introduction

cf-SpringBootTrader

Microservice version of the Spring Trader app using spring boot

Spring Trader

#Introduction This repository holds a collection of micro services that work together to present a trading application surfaced though a web UI, but more interfaces can be created that re-utilise the microservices.

It was created to support workshops and demonstrations of building and using microservices architectures and running these in Cloud Foundry (although it is possible to run these on other runtimes).

The workshops follow a series of exercises, or labs, and you can find links to the guides for these exercises below.

#Architecture The system is composed of 4 microservices. The relationship between the microservices is illustrated below.

architecture

##1. Quote Microservice This service is a spring boot application responsible for providing up to date company and ticker/quote information. It does this by providing a REST api with 2 calls:

  • /quote/{symbol} Returns an up to date quote for the given symbol.
  • /company/{search} Returns a list of companies that have the search parameter in their names or symbols.

This application has no dependencies apart from an external service - markitondemand - to retrieve the real time data.

##2. Account Microservice This service is a spring boot application responsible for creating and managing user accounts.

It stores the accounts in a RDBMS store and uses a spring JPA respository to accomplish this. It provides several REST api calls for other services to consume its services.

##3. Portfolio Microservice This service is a spring boot application responsible for managing portfolios - these are collections of holdings, which in turn are collection of orders on a particular share.

This service accepts orders (both BUY and SELL) and stores these in a RDBMS store - it does not have to be the same RDBMS as the Account service, but it can be! It provides REST api calls for other services to consume its services.

This service is dependent on the Account service above to ensure the logged in user has enough funds to buy stock as well as keeping the account funds up to date. It is also dependent on the Quote service to retrieve up to date quote information and calculate the current value of portfolios.

##4. Web Microservice This service is a spring boot application providing the web interface.

The web interface is built using bootstrap and Thymeleaf and uses a Spring controller to delegate calls to the relevant services:

  • Account service
  • Quote service
  • Portfolio service

Workshops:

The following guides describe how to setup the environment and deploy the microservices to Cloud Foundry.

At Pivotal we love education, not just educating ourselves, but also educating others. As such, these guides follow the "teaching you how to fish" principle - Rather than giving you line by line/command by command instructions, we provide guidelines and links to documentation where you can read and learn more.

  1. [Setting up the environment] setup
  2. [Creating a discovery service] registry
  3. [Creating a circuit breaker dashboard] circuitbreaker
  4. [Pushing the Quote service] pushquote
  5. [Pushing all the services] pushall
  6. [Scaling the services] scale
  7. [Blue/Green deployments] bluegreen

cf-springboottrader's People

Contributors

davpin avatar

Stargazers

Javier avatar

Watchers

Javier avatar James Cloos 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.